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
的?