File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -699,7 +699,7 @@ class LinearSVC(
699
699
>>> model_path = temp_path + "/svm_model"
700
700
>>> model.save(model_path)
701
701
>>> model2 = LinearSVCModel.load(model_path)
702
- >>> model.coefficients[0] == model2.coefficients[0]
702
+ >>> bool( model.coefficients[0] == model2.coefficients[0])
703
703
True
704
704
>>> model.intercept == model2.intercept
705
705
True
@@ -1210,7 +1210,7 @@ class LogisticRegression(
1210
1210
>>> model_path = temp_path + "/lr_model"
1211
1211
>>> blorModel.save(model_path)
1212
1212
>>> model2 = LogisticRegressionModel.load(model_path)
1213
- >>> blorModel.coefficients[0] == model2.coefficients[0]
1213
+ >>> bool( blorModel.coefficients[0] == model2.coefficients[0])
1214
1214
True
1215
1215
>>> blorModel.intercept == model2.intercept
1216
1216
True
@@ -2038,9 +2038,9 @@ class RandomForestClassifier(
2038
2038
>>> result = model.transform(test0).head()
2039
2039
>>> result.prediction
2040
2040
0.0
2041
- >>> numpy.argmax(result.probability)
2041
+ >>> int( numpy.argmax(result.probability) )
2042
2042
0
2043
- >>> numpy.argmax(result.newRawPrediction)
2043
+ >>> int( numpy.argmax(result.newRawPrediction) )
2044
2044
0
2045
2045
>>> result.leafId
2046
2046
DenseVector([0.0, 0.0, 0.0])
You can’t perform that action at this time.
0 commit comments