The Traditional Model page (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/Gurneet1928/TryMLEasy/llms.txt
Use this file to discover all available pages before exploring further.
pages/4_traditional_model.py) is where TryMLEasy assembles a scikit-learn Pipeline, fits it to your training data, and displays a full suite of evaluation metrics and charts. The pipeline automatically incorporates any preprocessing and decomposition steps you selected during Feature Selection, chaining them together with your chosen model in the correct order — all without writing a single line of code.
Choosing a Model Type
At the top of the page, a selectbox asks you to choose between Classification and Regression. This choice determines which sub-models are listed in the second selectbox below it:- Choose Classification if your target column contains discrete class labels (e.g., categories, binary flags, or integer class IDs).
- Choose Regression if your target column contains continuous numeric values (e.g., prices, scores, measurements).
Classification Models
When Classification is selected, TryMLEasy offers the following six scikit-learn models:Logistic Regression
A linear model that predicts class probabilities using the logistic function. Works well for linearly separable data and serves as a strong baseline.
Decision Tree Classifier
Learns axis-aligned decision boundaries by recursively splitting the feature space. Easy to interpret but can overfit without pruning.
Gaussian Naive Bayes
A probabilistic classifier that assumes features follow a Gaussian distribution and are conditionally independent given the class label.
Support Vector Classification
Finds the maximum-margin hyperplane separating classes. Effective in high-dimensional spaces; uses an RBF kernel by default.
K-Nearest Neighbors
Classifies each sample by majority vote among its
k nearest neighbours. Non-parametric and simple, but can be slow on large datasets.Stochastic Gradient Descent Classifier
Implements linear classifiers (SVM, logistic regression) fitted with Stochastic Gradient Descent. Scales efficiently to very large datasets.
Regression Models
When Regression is selected, the following four models are available:Linear Regression
Fits a linear relationship between features and target using Ordinary Least Squares. The standard starting point for continuous prediction tasks.
Support Vector Regressor
Extends SVM concepts to regression by finding a function that deviates from target values by at most epsilon (ε-insensitive loss).
Ridge Regression
Linear regression with L2 regularisation. Penalises large coefficients to reduce overfitting, especially useful when features are correlated.
Least Angle Regression
A stepwise regression algorithm (LARS) that is computationally efficient and suitable for high-dimensional datasets with sparse solutions.
The regression model dropdown in the UI displays “Rigde Regression” (a typo in the source) instead of “Ridge Regression”. This is a known spelling error in the current version of TryMLEasy. Select that option in the dropdown to use scikit-learn’s
Ridge class.How Training Works
When you click Train Model on {model_name}, TryMLEasy dynamically constructs a scikit-learnPipeline from the steps you configured earlier. The pipeline is assembled in this order:
- Scaler (if you selected one on the Feature Selection page)
- Decomposition (if you selected one on the Feature Selection page)
- Model (the one you just chose)
None are simply omitted from the list, so if you chose no scaler or decomposer the pipeline contains only the model itself. After fitting, TryMLEasy prints a diagram of the full pipeline directly on the page using scikit-learn’s set_config(display="diagram").
Evaluation Results
After training completes, TryMLEasy presents a full set of results without any extra clicks. Model Scoremodel.score(X_test, y_test) is printed first. For classifiers this is accuracy; for regressors this is the R² coefficient of determination.
Per-Metric Breakdown
- Classification Metrics
- Regression Metrics
The following metrics are computed between
y_hat (predictions on the test set) and y_test:| Metric | Function |
|---|---|
| Accuracy | accuracy_score(y_hat, y_test) |
| F1 Score | f1_score(y_hat, y_test) |
| Precision | precision_score(y_hat, y_test) |
| Recall | recall_score(y_hat, y_test) |
matplotlib scatter plot is rendered showing predicted values on the x-axis and true values on the y-axis. A perfect model would place all points along the diagonal reference line (drawn in blue). Deviations from this line reveal where the model under- or over-predicts.