@@ -45,7 +45,7 @@ class GeneralizedLinearPMMLModelExportSuite extends FunSuite{
45
45
var pmml = linearModelExport.asInstanceOf [PMMLModelExport ].getPmml()
46
46
assert(pmml.getHeader().getDescription() === " linear regression" )
47
47
// 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 )
49
49
// this verify that there is a model attached to the pmml object and the model is a regression one
50
50
// it also verifies that the pmml model has a regression table with the same number of predictors of the model weights
51
51
assert(pmml.getModels().get(0 ).asInstanceOf [RegressionModel ]
@@ -58,7 +58,7 @@ class GeneralizedLinearPMMLModelExportSuite extends FunSuite{
58
58
pmml = ridgeModelExport.asInstanceOf [PMMLModelExport ].getPmml()
59
59
assert(pmml.getHeader().getDescription() === " ridge regression" )
60
60
// 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 )
62
62
// this verify that there is a model attached to the pmml object and the model is a regression one
63
63
// it also verifies that the pmml model has a regression table with the same number of predictors of the model weights
64
64
assert(pmml.getModels().get(0 ).asInstanceOf [RegressionModel ]
@@ -71,7 +71,7 @@ class GeneralizedLinearPMMLModelExportSuite extends FunSuite{
71
71
pmml = lassoModelExport.asInstanceOf [PMMLModelExport ].getPmml()
72
72
assert(pmml.getHeader().getDescription() === " lasso regression" )
73
73
// 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 )
75
75
// this verify that there is a model attached to the pmml object and the model is a regression one
76
76
// it also verifies that the pmml model has a regression table with the same number of predictors of the model weights
77
77
assert(pmml.getModels().get(0 ).asInstanceOf [RegressionModel ]
0 commit comments