@@ -45,7 +45,7 @@ class GeneralizedLinearPMMLModelExportSuite extends FunSuite{
4545 var pmml = linearModelExport.asInstanceOf [PMMLModelExport ].getPmml()
4646 assert(pmml.getHeader().getDescription() === " linear regression" )
4747 // check that the number of fields match the weights size
48- assert(pmml.getDataDictionary().getNumberOfFields() === linearRegressionModel.weights.size)
48+ assert(pmml.getDataDictionary().getNumberOfFields() === linearRegressionModel.weights.size + 1 )
4949 // this verify that there is a model attached to the pmml object and the model is a regression one
5050 // it also verifies that the pmml model has a regression table with the same number of predictors of the model weights
5151 assert(pmml.getModels().get(0 ).asInstanceOf [RegressionModel ]
@@ -58,7 +58,7 @@ class GeneralizedLinearPMMLModelExportSuite extends FunSuite{
5858 pmml = ridgeModelExport.asInstanceOf [PMMLModelExport ].getPmml()
5959 assert(pmml.getHeader().getDescription() === " ridge regression" )
6060 // check that the number of fields match the weights size
61- assert(pmml.getDataDictionary().getNumberOfFields() === ridgeRegressionModel.weights.size)
61+ assert(pmml.getDataDictionary().getNumberOfFields() === ridgeRegressionModel.weights.size + 1 )
6262 // this verify that there is a model attached to the pmml object and the model is a regression one
6363 // it also verifies that the pmml model has a regression table with the same number of predictors of the model weights
6464 assert(pmml.getModels().get(0 ).asInstanceOf [RegressionModel ]
@@ -71,7 +71,7 @@ class GeneralizedLinearPMMLModelExportSuite extends FunSuite{
7171 pmml = lassoModelExport.asInstanceOf [PMMLModelExport ].getPmml()
7272 assert(pmml.getHeader().getDescription() === " lasso regression" )
7373 // check that the number of fields match the weights size
74- assert(pmml.getDataDictionary().getNumberOfFields() === lassoModel.weights.size)
74+ assert(pmml.getDataDictionary().getNumberOfFields() === lassoModel.weights.size + 1 )
7575 // this verify that there is a model attached to the pmml object and the model is a regression one
7676 // it also verifies that the pmml model has a regression table with the same number of predictors of the model weights
7777 assert(pmml.getModels().get(0 ).asInstanceOf [RegressionModel ]
0 commit comments