Skip to content

Commit

Permalink
[SPARK-8511][pyspark] Modify a test to remove a saved model in `regre…
Browse files Browse the repository at this point in the history
…ssion.py`
  • Loading branch information
yu-iskw committed Jun 21, 2015
1 parent a1e3649 commit 4a01c9e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions python/pyspark/mllib/regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,8 +133,9 @@ class LinearRegressionModel(LinearRegressionModelBase):
True
>>> abs(sameModel.predict(SparseVector(1, {0: 1.0})) - 1) < 0.5
True
>>> from shutil import rmtree
>>> try:
... os.removedirs(path)
... rmtree(path)
... except:
... pass
>>> data = [
Expand Down Expand Up @@ -275,8 +276,9 @@ class LassoModel(LinearRegressionModelBase):
True
>>> abs(sameModel.predict(SparseVector(1, {0: 1.0})) - 1) < 0.5
True
>>> from shutil import rmtree
>>> try:
... os.removedirs(path)
... rmtree(path)
... except:
... pass
>>> data = [
Expand Down Expand Up @@ -389,8 +391,9 @@ class RidgeRegressionModel(LinearRegressionModelBase):
True
>>> abs(sameModel.predict(SparseVector(1, {0: 1.0})) - 1) < 0.5
True
>>> from shutil import rmtree
>>> try:
... os.removedirs(path)
... rmtree(path)
... except:
... pass
>>> data = [
Expand Down

0 comments on commit 4a01c9e

Please sign in to comment.