With skore, data scientists can:
- Track and visualize their ML/DS results.
- Get assistance when developing their ML/DS projects.
- Scikit-learn compatible
skore.cross_validate()
andskore.train_test_split()
provide insights and checks on cross-validation and train-test-split.
- Scikit-learn compatible
These are only the first features: skore is a work in progress and aims to be an end-to-end library for data scientists. Stay tuned! Feedbacks are welcome: please feel free to join our Discord.
First of all, we recommend using a virtual environment (venv). You need python>=3.9
.
Then, you can install skore by using pip
:
pip install -U skore
Note: For more information on how and why to use skore, see our documentation.
- From your Python code, create and load a skore project, here named
my_project
:
import skore
my_project = skore.create("my_project")
This will create a skore project directory named my_project.skore
in your current working directory.
- Start storing some items, for example you can store an integer:
my_project.put("my_int", 3)
or the result of a scikit-learn grid search:
import numpy as np
from sklearn.datasets import load_diabetes
from sklearn.linear_model import Ridge
from sklearn.model_selection import GridSearchCV
diabetes = load_diabetes()
X = diabetes.data[:150]
y = diabetes.target[:150]
gs_cv = GridSearchCV(
Ridge(),
param_grid={"alpha": np.logspace(-3, 5, 50)},
scoring="neg_root_mean_squared_error",
)
gs_cv.fit(X, y)
my_project.put("my_gs_cv", gs_cv)
- Finally, from your shell (in the same directory), start the UI locally:
skore launch "my_project"
This will automatically open a browser at the UI's location:
- On the top left, by default, you can observe that you are in a View called
default
. You can rename this view or create another one. - From the Items section on the bottom left, you can add stored items to this view, either by clicking on
+
or by dragging an item to the right. - In the skore UI on the right, you can drag-and-drop items to re-order them, remove items, etc.
By using skore.cross_validate()
:
import skore
my_project = skore.create("my_project")
from sklearn.datasets import load_iris
from sklearn.svm import SVC
X, y = load_iris(return_X_y=True)
clf = SVC(kernel="linear", C=1, random_state=0)
cv_results = skore.cross_validate(clf, X, y, cv=5, project=my_project)
You will automatically be able to visualize some key metrics (although you might have forgotten to specify all of them):
There is also a train-test split function that enhances scikit-learn. See more in our documentation.
Thank you for your interest! See CONTRIBUTING.rst.
Type | Platforms |
---|---|
🐛 Bug reports | GitHub Issue Tracker |
✨ Feature requests and ideas | GitHub Issue Tracker & Discord |
💬 Usage questions, discussions, contributions, etc | Discord |
Brought to you by