Я пытаюсь вычислить значение pValue, используя GeneralizedLinearRegression и получаю исключение ниже.
val assembler = new VectorAssembler()
.setInputCols(final_columns)
.setOutputCol("Feature")
val glr = new GeneralizedLinearRegression()
.setFamily("binomial")
.setLink("logit")
.setMaxIter(1)
.setRegParam(0.0)
.setFeaturesCol("Feature")
.setLabelCol("LM_2")
//.setSolver("auto")
val pipeline = new Pipeline().setStages(Array(assembler,glr))
val lrModel_general = pipeline.fit(indexedDF)
val sum = lrModel_general.stages.last.asInstanceOf[GeneralizedLinearRegressionModel].summary.pValues
Exception in thread "main" java.lang.UnsupportedOperationException: No p-value available for this GeneralizedLinearRegressionModel
at org.apache.spark.ml.regression.GeneralizedLinearRegressionTrainingSummary.pValues$lzycompute(GeneralizedLinearRegression.scala:1480)
at org.apache.spark.ml.regression.GeneralizedLinearRegressionTrainingSummary.pValues(GeneralizedLinearRegression.scala:1468)
at com.cvs.scala.ml.model.LR_SqlDB_LocalMessageGrouping$.main(LR_SqlDB_LocalMessageGrouping.scala:172)
at com.cvs.scala.ml.model.LR_SqlDB_LocalMessageGrouping.main(LR_SqlDB_LocalMessageGrouping.scala)