Skip to content
| Marketplace
Sign in
Visual Studio Code>Data Science>ML MentorNew to Visual Studio Code? Get it now.
ML Mentor

ML Mentor

Muhammad Sarab Rafique

|
1 install
| (0) | Free
AI-powered Machine Learning mentor for VS Code. Analyzes ML models, detects overfitting, calculates metrics, generates code, and teaches best practices.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

ML Mentor 🧠

Like Grammarly, but for Machine Learning.

ML Mentor is an intelligent, AI-powered VS Code extension that helps students, beginners, and data scientists analyze, evaluate, debug, and improve their ML models automatically right from their editor.

Instead of just displaying raw metrics, ML Mentor acts as a personal tutor: it reviews your entire ML workflow, computes missing metrics, detects data leakage, diagnoses overfitting, generates ready-to-use Python code snippets, and provides a professional UI.


🌟 Key Features

  1. Automatic Metric Detection

    • Automatically detects whether your task is Classification or Regression.
    • Calculates missing metrics and generates code for you to paste into your script.
  2. Model Health Score

    • Provides a score out of 10 based on Performance, Generalization, Dataset Quality, and Evaluation Completeness.
  3. Overfitting & Underfitting Detection

    • Analyzes your train vs. test scores.
    • Recommends actionable fixes (e.g., regularization, pruning, cross-validation).
  4. Dataset Quality Analyzer

    • Scans your loaded Pandas DataFrames for missing values, duplicates, outliers, and constant columns.
    • Checks for proper scaling and categorical encoding.
  5. Data Leakage Detection

    • Warns you if you are leaking test data into your training pipeline (e.g., fitting a scaler on the entire dataset).
  6. Class Imbalance Alerts

    • Automatically detects imbalanced classes and recommends solutions like SMOTE or class_weight.
  7. Algorithm Reviewer

    • A built-in knowledge base outlining the pros, cons, best use cases, and common mistakes for your chosen model.
    • Inspects your current hyperparameters and suggests optimal values.
  8. AI Recommendation Engine

    • Prioritizes issues and provides a step-by-step Improvement Roadmap.
  9. Code Generator

    • One-click copy & insert for cross-validation, feature scaling, encoding, missing metrics, and hyperparameter tuning (GridSearchCV).
  10. Project Report Generator

    • Automatically generates a complete, professional Markdown report of your ML project for university submissions or portfolio inclusion.
  11. Interview Mode

    • Quizzes you on fundamental ML concepts tailored specifically to your chosen algorithm and dataset characteristics.

🚀 Getting Started

Prerequisites

You need Python installed on your system with the following libraries: ```bash pip install scikit-learn numpy pandas xgboost lightgbm catboost imbalanced-learn matplotlib ```

How to use

  1. Open a Python file containing your Machine Learning code (e.g., using scikit-learn, xgboost, tensorflow, etc.).
  2. Click the ML Mentor icon in the Activity Bar (sidebar).
  3. Click ▶ Analyze (or press `Ctrl+Shift+P` and type `ML Mentor: Analyze Current File`).
  4. Navigate through the dashboard panels to see metrics, dataset issues, recommendations, and generated code!

🛠 Supported Libraries & Algorithms

Libraries

  • scikit-learn
  • xgboost
  • lightgbm
  • catboost
  • pandas & numpy
  • tensorflow & keras (basic static support)

Models

  • Random Forest, Decision Trees
  • Logistic & Linear Regression
  • Support Vector Machines (SVC, SVR)
  • K-Nearest Neighbors
  • Gradient Boosting, XGBoost, LightGBM, CatBoost
  • Naive Bayes

⚙️ Extension Settings

This extension contributes the following settings:

  • mlMentor.pythonPath: Path to your Python executable (default: python).
  • mlMentor.autoAnalyze: Automatically run static analysis when opening a Python file.
  • mlMentor.showInlineHints: Show warnings inside the code editor (e.g., when cross-validation is missing).
  • mlMentor.theme: Set sidebar theme (auto, dark, light).

🧑‍💻 Architecture & Privacy

ML Mentor uses a dual-engine architecture:

  1. Static Analyzer (TypeScript): Instant regex-based parsing to detect models and evaluate patterns locally.
  2. Dynamic Analyzer (Python): Safely spawns a Python child process to calculate exact metrics and examine real pandas dataframes.

Privacy-first: All analysis is performed 100% locally on your machine. Your code or data is never sent to external servers or AI APIs. The "AI" recommendations use an embedded rule-based expert system.


📝 License

MIT License

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft