Skip to content
Bayanii
Learning Center

ML Glossary

Every metric and concept Bayanii shows you, defined in plain language with a tiny worked example. Arabic terms follow the official SDAIA AI glossary.

← Back to the Learning Center

Metrics

R² (coefficient of determination)

How much of the variation in the target your model explains, compared with always guessing the average. 1.0 is perfect, 0 means no better than the average, and negative means worse than the average.

Example

For the five houses in the regression lesson, the model reaches an R² of about 0.994 — it explains 99.4% of the differences between house prices.

MAE (mean absolute error)

متوسط الخطأ المطلق

The average size of the model's mistakes, in the same units as the target. It treats a big miss and several small ones the same as long as they add up alike.

Example

Prediction errors of 0, 20,000, 0, 0 and 20,000 SAR average out to an MAE of 8,000 SAR — the model is off by about that much on a typical row.

RMSE (root mean squared error)

جذر متوسط الخطأ التربيعي

Like MAE, but each error is squared before averaging, so a few big misses raise it sharply. It is always at least as large as MAE; a wide gap between the two hints at occasional big errors.

Example

The same five errors give an RMSE of about 12,650 SAR — higher than the 8,000 MAE, because the two 20,000-SAR misses weigh in squared.

MSE (mean squared error)

متوسط الخطأ التربيعي

The average of the squared errors — RMSE before taking the square root. It ranks models the same way as RMSE but is measured in squared units, which makes it harder to read directly.

Example

Errors of 0, −20,000, 0, 0 and +20,000 SAR give an MSE of 160,000,000; its square root is the RMSE.

MAPE (mean absolute percentage error)

The average error as a percentage of the true value — "off by 13% on a typical row". Easy to compare across different series, but it explodes when true values get close to zero.

Example

Actual values 100, 200 and 50 against predictions 110, 180 and 60 give percentage errors of 10%, 10% and 20% — a MAPE of 13.3%.

sMAPE (symmetric MAPE)

A symmetric cousin of MAPE: each error is divided by the average of the actual and predicted values instead of the actual alone, which keeps the score bounded when true values approach zero.

Example

For the same three rows, sMAPE weighs each miss against the average of the two numbers — so a near-zero actual value cannot blow the score up.

Accuracy

دقة

The share of predictions that were right. Simple and intuitive, but misleading when one category dominates — always predicting the common category can score high while catching nothing.

Example

The churn model got 8 of 10 test customers right — accuracy 0.80.

Precision

إحكام

Of the rows the model flagged as positive, how many really were. High precision means few false alarms.

Example

The model flagged 4 customers as likely to churn and 3 of them actually did — precision 3/4 = 0.75.

Recall

استدعاء

Of the rows that really were positive, how many the model caught. High recall means few missed cases.

Example

4 customers actually churned and the model caught 3 of them — recall 3/4 = 0.75.

F1 score

نتيجة F1

A single number that balances precision and recall (their harmonic mean). Useful when false alarms and missed cases both matter.

Example

Precision 0.75 and recall 0.75 combine to an F1 of 0.75; if either one drops, F1 drops with it.

Balanced accuracy

الدقة المتوازنة

The average of each category's recall, so a rare category counts as much as a common one. Prefer it over plain accuracy when the data is imbalanced.

Example

Recall of 0.75 on churners and about 0.83 on stayers averages to a balanced accuracy of roughly 0.79.

ROC AUC

مساحة تحت منحنى دقّة الأداء

The probability that the model ranks a randomly chosen positive above a randomly chosen negative. 1.0 is a perfect ranking, 0.5 is a coin flip. It judges the model's scores, not just its final yes/no.

Example

An AUC of 0.90 means: pick one churner and one stayer at random, and 90% of the time the churner gets the higher risk score.

Core concepts

Model

نموذج

A formula the computer wrote by studying your data: it takes the feature columns in and returns a prediction for the target. In Bayanii, the winning model is saved and ready to use from the Models page.

Training

تدريب

The process of fitting a model to your data: make a guess, measure the error, adjust, and repeat until the error stops shrinking.

Example

From 1,000 rows, Bayanii learns the pattern on most of them and keeps some aside to test the result honestly.

Feature

خاصية

An input column the model is allowed to use when predicting — like size, city, or age. Bayanii can also build new features out of your columns, such as splitting dates into parts.

Example

To predict a house's price, its size in square meters and its neighborhood are features.

Target column

العمود الهدف

The column you want to predict — the answer the model learns to produce. Every training row must have it filled in; predictions fill it for new rows.

Dataset

مجموعة البيانات

Your table of data — one row per example, one column per attribute, uploaded as a CSV file.

Regression

انحدار

Predicting a number: a price, a duration, a quantity. Judged by how large the errors are (MAE, RMSE) and by R².

Example

Given a house's size and location, predict its price in SAR.

Classification

تصنيف

Predicting a category: yes/no, churn/stay, A/B/C. Judged with accuracy, precision, recall and F1, all read off a confusion matrix.

Example

Given a customer's history, predict whether they will cancel next month.

Forecasting

التنبؤ الزمني

Predicting future values of something measured over time, where the order of rows matters — next month's sales, next week's demand. The model uses lags of past values and predicts a horizon ahead.

Example

From 24 months of sales history, predict the next 3 months.

Prediction

تنبؤ

The model's answer for a row it has not seen before — a number for regression, a category for classification, future values for forecasting.

Example

Feed the model a 130 m² house and it predicts a price of 530,000 SAR.

Overfitting

فرط التخصيص

When a model memorizes the training data instead of learning the pattern — excellent scores on data it has seen, poor scores on new data. Bayanii guards against it with held-back test data and cross-validation.

Example

A student who memorizes past exam answers aces every practice test and fails the real one.

Underfitting

فرط التعميم

When a model is too simple to capture the real pattern — it scores poorly on the training data and on new data alike.

Example

Predicting "every house costs 500,000 SAR" regardless of size misses the pattern entirely.

Confusion matrix

مصفوفة الدقة

A small table comparing predictions with reality: true positives, false positives, false negatives and true negatives. Accuracy, precision and recall are all read directly off it.

Example

3 churners caught, 1 false alarm, 1 missed churner and 5 correct "stays" fill the four cells of the matrix in the classification lesson.

Cross-validation

تحقق تقاطعي

Instead of one single test, the data is split into several folds and each fold takes a turn as the test set; the scores are averaged. Bayanii uses it so the winning model is not just lucky on one split.

Example

Five folds produce five scores; their average decides the leaderboard.

Hyperparameter

مُعامِل ضبط

A setting of the learning process itself — like how deep a tree may grow — chosen before training rather than learned from the data. Bayanii tunes these automatically for the top models.

Example

Trying a tree depth of 4 versus 8 and keeping whichever cross-validates better.

Lags

الإزاحات

Past values of a time series used as inputs when forecasting. With 3 lags, the model predicts each month from the previous three months.

Example

Inputs [Aug 150, Sep 145, Oct 160] are the three lags used to predict November.

Forecast horizon

أفق التنبؤ

How far ahead the forecast goes, counted in time steps. Bayanii predicts one step at a time and feeds each answer back in — so the further out a step is, the more uncertainty it carries.

Example

A horizon of 3 on monthly sales means forecasts for the next three months.

Data leakage

تسرُّب البيانات

When information that will not exist at prediction time sneaks into training — like a column recorded after the outcome happened. It inflates scores during training and collapses in real use; Bayanii's data checks flag likely leaks.

Example

A "refund issued" column that almost perfectly matches "order cancelled" — using it to predict cancellations is leakage.

Class imbalance

عدم توازن الأصناف

When one category vastly outnumbers the others — say 95 customers stay for every 5 who churn. Plain accuracy becomes misleading; Bayanii applies balanced class weights and reports balanced accuracy.

Example

A model that always predicts "stays" scores 95% accuracy on that data yet catches zero churners.

Outlier

قيمة شاذة

A value far outside the usual range — a 10,000 m² "house", an age of 300. A few outliers can drag averages and models off course; the dataset report flags suspicious ones.

Example

In a salary column of 4,000–6,000 SAR values, a row with 4,000,000 SAR is an outlier — possibly a typo.