Загрузка...

Basic ML Classification in Colab: scikit-learn, XGBoost, PyTorch + Dash web app (80/20 split)

A compact Colab workflow that generates synthetic data (10k samples, 4 features), trains Logistic Regression, Random Forest, XGBoost, sklearn MLP and a PyTorch NN, compares models on an 80/20 test split, saves artifacts, and runs a small Dash app (embedded in Colab) with the two best scikit models plus the PyTorch model for live predictions.

Repository and Colab: https://github.com/cconsta1/ML_classification_YouTube

NumPy: https://numpy.org
Pandas: https://pandas.pydata.org
scikit-learn: https://scikit-learn.org
XGBoost: https://xgboost.readthedocs.io
PyTorch: https://pytorch.org
joblib: https://joblib.readthedocs.io
Dash: https://dash.plotly.com
Plotly: https://plotly.com/python
Matplotlib: https://matplotlib.org
Seaborn: https://seaborn.pydata.org

Brief code summary:

Data: make_classification(10000, 4) → train/test 80/20 → StandardScaler fit on train and saved.
Models: train LogisticRegression, RandomForest, XGBoost, sklearn MLP and a PyTorch SimpleNet (128-64-32).
Evaluation: use test set metrics (accuracy, precision, recall, F1, ROC AUC when available). Collect metrics into a DataFrame and pick top two by accuracy.
Persistence: save scikit models with joblib, save PyTorch state_dict with torch.save.
App: Dash app embedded in Colab. Loads scaler + selected models, accepts 4 numeric inputs, shows predicted class (Yes/No) and probability. Vintage-modern styling with Montserrat font.

#MachineLearning #scikit-learn #PyTorch #XGBoost #Dash #Colab #DataScience #MLTutorial

Видео Basic ML Classification in Colab: scikit-learn, XGBoost, PyTorch + Dash web app (80/20 split) канала Doctor No Does Science
Яндекс.Метрика
Все заметки Новая заметка Страницу в заметки
Страницу в закладки Мои закладки
На информационно-развлекательном портале SALDA.WS применяются cookie-файлы. Нажимая кнопку Принять, вы подтверждаете свое согласие на их использование.
О CookiesНапомнить позжеПринять