3
我正在实现一个自定义的估计器,它遇到了访问参数ava.util.NoSuchElementException: Failed to find a default value for isInList
的麻烦。它的定义如下:自定义估算器为什么最终会覆盖Nothing类型?
trait PreprocessingParams extends Params {
final val isInList = new Param[Array[String]](this, "isInList", "list of isInList items")
}
为了更好地调试的问题,我创建了一个小例子,这里https://gist.github.com/geoHeil/8dc7a6b6938a517f068e7fd6a981ed12的ExampleTrans
作品就好了。但是,我宁愿将变压器的功能包括在执行一些数据清理的估算器中。
但现在我面对奇怪的编译问题overriding method has wrong type - expecting Nothing
什么是错的返回类型我ExampleEstimator
的?