Skip to content

Commit

Permalink
documentation updates
Browse files Browse the repository at this point in the history
  • Loading branch information
yzhao062 committed Sep 19, 2020
1 parent a273749 commit 94c27ef
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 12 deletions.
12 changes: 6 additions & 6 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -287,14 +287,14 @@ In short, we recommend to use joblib or pickle for saving and loading PyOD model
See `"examples/save_load_model_example.py" <https://github.com/yzhao062/pyod/blob/master/examples/save_load_model_example.py>`_ for an example.
In short, it is simple as below:

.. code-block:: python
.. code-block:: python
from joblib import dump, load
from joblib import dump, load
# save the model
dump(clf, 'clf.joblib')
# load the model
clf = load('clf.joblib')
# save the model
dump(clf, 'clf.joblib')
# load the model
clf = load('clf.joblib')
----
Expand Down
1 change: 1 addition & 0 deletions docs/example.rst
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ Full example: `knn_example.py <https://github.com/yzhao062/Pyod/blob/master/exam

.. code-block:: python
from pyod.utils.data import evaluate_print
# evaluate and print the results
print("\nOn Training Data:")
evaluate_print(clf_name, y_train, y_train_scores)
Expand Down
12 changes: 6 additions & 6 deletions docs/model_persistence.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ In short, we recommend to use joblib or pickle for saving and loading PyOD model
See `"examples/save_load_model_example.py" <https://github.com/yzhao062/pyod/blob/master/examples/save_load_model_example.py>`_ for an example.
In short, it is simple as below:

.. code-block:: python
.. code-block:: python
from joblib import dump, load
from joblib import dump, load
# save the model
dump(clf, 'clf.joblib')
# load the model
clf = load('clf.joblib')
# save the model
dump(clf, 'clf.joblib')
# load the model
clf = load('clf.joblib')

0 comments on commit 94c27ef

Please sign in to comment.