Skip to content

Commit

Permalink
doctest ml
Browse files Browse the repository at this point in the history
  • Loading branch information
xinrong-meng committed Oct 7, 2024
1 parent 40d00d0 commit 35aa966
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/pyspark/ml/classification.py
Original file line number Diff line number Diff line change
Expand Up @@ -699,7 +699,7 @@ class LinearSVC(
>>> model_path = temp_path + "/svm_model"
>>> model.save(model_path)
>>> model2 = LinearSVCModel.load(model_path)
>>> model.coefficients[0] == model2.coefficients[0]
>>> bool(model.coefficients[0] == model2.coefficients[0])
True
>>> model.intercept == model2.intercept
True
Expand Down Expand Up @@ -1210,7 +1210,7 @@ class LogisticRegression(
>>> model_path = temp_path + "/lr_model"
>>> blorModel.save(model_path)
>>> model2 = LogisticRegressionModel.load(model_path)
>>> blorModel.coefficients[0] == model2.coefficients[0]
>>> bool(blorModel.coefficients[0] == model2.coefficients[0])
True
>>> blorModel.intercept == model2.intercept
True
Expand Down Expand Up @@ -2038,9 +2038,9 @@ class RandomForestClassifier(
>>> result = model.transform(test0).head()
>>> result.prediction
0.0
>>> numpy.argmax(result.probability)
>>> int(numpy.argmax(result.probability))
0
>>> numpy.argmax(result.newRawPrediction)
>>> int(numpy.argmax(result.newRawPrediction))
0
>>> result.leafId
DenseVector([0.0, 0.0, 0.0])
Expand Down

0 comments on commit 35aa966

Please sign in to comment.