This is a full scikit-learn course for the Swiftener scikit-learn editor. NumPy is already imported as np. Pandas is pd. Matplotlib is plt. You import sklearn modules in each script (from sklearn…). Press Ctrl+Enter (or Cmd+Enter), print metrics, and call plt.show() when you draw a figure.
You do not install Python, pip, or Jupyter. Code and uploaded files stay in your browser.
Tables belong in Learn pandas. Raw plots belong in Learn matplotlib. Statistical models (OLS, inference) belong in Learn statsmodels. This course stays on estimators: fit, predict, and evaluate.
Finish every chapter by running the copy-paste blocks in the workbench. The last chapter is a small kiosk classifier you can reuse.
How to take the course
- Keep this tutorial tab and the scikit-learn workbench side by side.
- Wait until the workbench status says scikit-learn is ready. The first load pulls a large library and can take a minute.
- Copy an exercise, paste it as the whole editor, run it, then read the console (and the Plot panel if the script calls
plt.show()). Each shaded block is a complete script — it does not rely on leftover variables. - When a chapter asks for a file, download it from the buttons above, then click Add files in the workbench.
The workbench Snippets menu is a cheat sheet. Prefer the exercises here — they are written for this editor.
What this editor can and cannot do
- Can:
np,pd,plt, scikit-learn,print, CSV uploads,plt.show(),plt.savefigandjoblib.dumpto/uploads, downloads. - Cannot: Jupyter magics,
fetch_openml/ downloading datasets, GPU training,n_jobs=-1multiprocessing, installing extra PyPI packages beyond what the app already loads (numpy,pandas,matplotlib,scikit-learn). - Always
print(...)for metrics. Alwaysplt.show()for figures. Keep samples small (a few hundred rows) so Run stays snappy.
City names in the examples are Nairobi, Mombasa, Kisumu (then Nakuru and Eldoret on the sample files).
Sample files
Download any of these from the banner, then attach them with Add files:
kiosk.csv— city, product, units, price, weekend, and ahighlabel (1 = high revenue)sales.csv— tiny city × product snapshot withrevenuepoints.csv— 2-Dx,ypoints in three clusters
Chapter list
Work in order the first time. After that, jump around from the sidebar.