From f94650187887f460c87639fa058c8f1c0bfb89b2 Mon Sep 17 00:00:00 2001 From: Nastasia Saby Date: Thu, 28 May 2020 17:27:52 +0200 Subject: [PATCH] Add documentation to deserialize with Scikit-Learn --- scikit-learn/index.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/scikit-learn/index.md b/scikit-learn/index.md index 3bd76e8..96bf487 100644 --- a/scikit-learn/index.md +++ b/scikit-learn/index.md @@ -194,7 +194,21 @@ Coming Soon ### Deserializing -Coming Soon +With a JSON format: + +```python +model = pipeline.deserialize_from_bundle("/tmp/mleap-bundle", "model.json.node") +``` + +If you want to get the model back as a logistic regression: + +```python +from mleap.sklearn.logistic import LogisticRegression + +logistic_regression = LogisticRegression() + +model = logistic_regression.deserialize_from_bundle("/tmp/mleap-bundle", "model.json.node") +``` ## Demos