pushing files to the repo from the example!
Browse files- README.md +3 -3
- config.json +1 -1
- init_repo_MLstructureMining.py +5 -2
- xgb_model_bayse_optimization_00000.bin +3 -0
README.md
CHANGED
@@ -4,7 +4,7 @@ tags:
|
|
4 |
- sklearn
|
5 |
- skops
|
6 |
- tabular-classification
|
7 |
-
model_file:
|
8 |
widget:
|
9 |
structuredData:
|
10 |
area error:
|
@@ -188,7 +188,7 @@ The model is trained with below hyperparameters.
|
|
188 |
|
189 |
The model plot is below.
|
190 |
|
191 |
-
<style>#sk-
|
192 |
|
193 |
## Evaluation Results
|
194 |
|
@@ -207,7 +207,7 @@ Use the code below to get started with the model.
|
|
207 |
import joblib
|
208 |
import json
|
209 |
import pandas as pd
|
210 |
-
clf = joblib.load(
|
211 |
with open("config.json") as f:
|
212 |
config = json.load(f)
|
213 |
clf.predict(pd.DataFrame.from_dict(config["sklearn"]["example_input"]))
|
|
|
4 |
- sklearn
|
5 |
- skops
|
6 |
- tabular-classification
|
7 |
+
model_file: xgb_model_bayse_optimization_00000.bin
|
8 |
widget:
|
9 |
structuredData:
|
10 |
area error:
|
|
|
188 |
|
189 |
The model plot is below.
|
190 |
|
191 |
+
<style>#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 {color: black;background-color: white;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 pre{padding: 0;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-toggleable {background-color: white;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 label.sk-toggleable__label {cursor: pointer;display: block;width: 100%;margin-bottom: 0;padding: 0.3em;box-sizing: border-box;text-align: center;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 label.sk-toggleable__label-arrow:before {content: "▸";float: left;margin-right: 0.25em;color: #696969;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 label.sk-toggleable__label-arrow:hover:before {color: black;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-estimator:hover label.sk-toggleable__label-arrow:before {color: black;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-toggleable__content {max-height: 0;max-width: 0;overflow: hidden;text-align: left;background-color: #f0f8ff;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-toggleable__content pre {margin: 0.2em;color: black;border-radius: 0.25em;background-color: #f0f8ff;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 input.sk-toggleable__control:checked~div.sk-toggleable__content {max-height: 200px;max-width: 100%;overflow: auto;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {content: "▾";}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {background-color: #d4ebff;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 input.sk-hidden--visually {border: 0;clip: rect(1px 1px 1px 1px);clip: rect(1px, 1px, 1px, 1px);height: 1px;margin: -1px;overflow: hidden;padding: 0;position: absolute;width: 1px;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-estimator {font-family: monospace;background-color: #f0f8ff;border: 1px dotted black;border-radius: 0.25em;box-sizing: border-box;margin-bottom: 0.5em;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-estimator:hover {background-color: #d4ebff;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-parallel-item::after {content: "";width: 100%;border-bottom: 1px solid gray;flex-grow: 1;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-label:hover label.sk-toggleable__label {background-color: #d4ebff;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-serial::before {content: "";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 2em;bottom: 0;left: 50%;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-serial {display: flex;flex-direction: column;align-items: center;background-color: white;padding-right: 0.2em;padding-left: 0.2em;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-item {z-index: 1;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-parallel {display: flex;align-items: stretch;justify-content: center;background-color: white;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-parallel::before {content: "";position: absolute;border-left: 1px solid gray;box-sizing: border-box;top: 2em;bottom: 0;left: 50%;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-parallel-item {display: flex;flex-direction: column;position: relative;background-color: white;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-parallel-item:first-child::after {align-self: flex-end;width: 50%;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-parallel-item:last-child::after {align-self: flex-start;width: 50%;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-parallel-item:only-child::after {width: 0;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-dashed-wrapped {border: 1px dashed gray;margin: 0 0.4em 0.5em 0.4em;box-sizing: border-box;padding-bottom: 0.4em;background-color: white;position: relative;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-label label {font-family: monospace;font-weight: bold;background-color: white;display: inline-block;line-height: 1.2em;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-label-container {position: relative;z-index: 2;text-align: center;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-container {/* jupyter's `normalize.less` sets `[hidden] { display: none; }` but bootstrap.min.css set `[hidden] { display: none !important; }` so we also need the `!important` here to be able to override the default hidden behavior on the sphinx rendered scikit-learn.org. See: https://github.com/scikit-learn/scikit-learn/issues/21755 */display: inline-block !important;position: relative;}#sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0 div.sk-text-repr-fallback {display: none;}</style><div id="sk-fb87c2a1-e870-4bce-b725-6b0e13c3bba0" class="sk-top-container" style="overflow: auto;"><div class="sk-text-repr-fallback"><pre>HalvingGridSearchCV(estimator=HistGradientBoostingClassifier(), n_jobs=-1,param_grid={'max_depth': [2, 5, 10],'max_leaf_nodes': [5, 10, 15]},random_state=42)</pre><b>Please rerun this cell to show the HTML repr or trust the notebook.</b></div><div class="sk-container" hidden><div class="sk-item sk-dashed-wrapped"><div class="sk-label-container"><div class="sk-label sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="c32330b7-e133-407a-a526-cff8a85d5a1a" type="checkbox" ><label for="c32330b7-e133-407a-a526-cff8a85d5a1a" class="sk-toggleable__label sk-toggleable__label-arrow">HalvingGridSearchCV</label><div class="sk-toggleable__content"><pre>HalvingGridSearchCV(estimator=HistGradientBoostingClassifier(), n_jobs=-1,param_grid={'max_depth': [2, 5, 10],'max_leaf_nodes': [5, 10, 15]},random_state=42)</pre></div></div></div><div class="sk-parallel"><div class="sk-parallel-item"><div class="sk-item"><div class="sk-serial"><div class="sk-item"><div class="sk-estimator sk-toggleable"><input class="sk-toggleable__control sk-hidden--visually" id="6f86c69b-4613-4478-8703-ffd0c308d213" type="checkbox" ><label for="6f86c69b-4613-4478-8703-ffd0c308d213" class="sk-toggleable__label sk-toggleable__label-arrow">HistGradientBoostingClassifier</label><div class="sk-toggleable__content"><pre>HistGradientBoostingClassifier()</pre></div></div></div></div></div></div></div></div></div></div>
|
192 |
|
193 |
## Evaluation Results
|
194 |
|
|
|
207 |
import joblib
|
208 |
import json
|
209 |
import pandas as pd
|
210 |
+
clf = joblib.load(xgb_model_bayse_optimization_00000.bin)
|
211 |
with open("config.json") as f:
|
212 |
config = json.load(f)
|
213 |
clf.predict(pd.DataFrame.from_dict(config["sklearn"]["example_input"]))
|
config.json
CHANGED
@@ -189,7 +189,7 @@
|
|
189 |
]
|
190 |
},
|
191 |
"model": {
|
192 |
-
"file": "
|
193 |
},
|
194 |
"task": "tabular-classification"
|
195 |
}
|
|
|
189 |
]
|
190 |
},
|
191 |
"model": {
|
192 |
+
"file": "xgb_model_bayse_optimization_00000.bin"
|
193 |
},
|
194 |
"task": "tabular-classification"
|
195 |
}
|
init_repo_MLstructureMining.py
CHANGED
@@ -13,7 +13,7 @@ from sklearn.datasets import load_breast_cancer
|
|
13 |
from sklearn.ensemble import HistGradientBoostingClassifier
|
14 |
from sklearn.experimental import enable_halving_search_cv # noqa
|
15 |
from sklearn.model_selection import HalvingGridSearchCV, train_test_split
|
16 |
-
|
17 |
from skops import card, hub_utils
|
18 |
|
19 |
# Data
|
@@ -43,9 +43,12 @@ _, pkl_name = mkstemp(prefix="skops-", suffix=".pkl")
|
|
43 |
with open(pkl_name, mode="bw") as f:
|
44 |
pickle.dump(model, file=f)
|
45 |
|
|
|
|
|
46 |
local_repo = mkdtemp(prefix="skops-")
|
47 |
hub_utils.init(
|
48 |
-
model=pkl_name,
|
|
|
49 |
requirements=[f"scikit-learn={sklearn.__version__}", f"xgboost={xgboost.__version__}"],
|
50 |
dst=local_repo,
|
51 |
task="tabular-classification",
|
|
|
13 |
from sklearn.ensemble import HistGradientBoostingClassifier
|
14 |
from sklearn.experimental import enable_halving_search_cv # noqa
|
15 |
from sklearn.model_selection import HalvingGridSearchCV, train_test_split
|
16 |
+
import shutil
|
17 |
from skops import card, hub_utils
|
18 |
|
19 |
# Data
|
|
|
43 |
with open(pkl_name, mode="bw") as f:
|
44 |
pickle.dump(model, file=f)
|
45 |
|
46 |
+
|
47 |
+
|
48 |
local_repo = mkdtemp(prefix="skops-")
|
49 |
hub_utils.init(
|
50 |
+
#model=pkl_name,
|
51 |
+
model="xgb_model_bayse_optimization_00000.bin",
|
52 |
requirements=[f"scikit-learn={sklearn.__version__}", f"xgboost={xgboost.__version__}"],
|
53 |
dst=local_repo,
|
54 |
task="tabular-classification",
|
xgb_model_bayse_optimization_00000.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:f5277043ae9aa8979ddc253997128d53b37bc17599f53191d02c5c161c8d2985
|
3 |
+
size 30283
|