Machine Learning

تعلم الآلة

Abbreviation: ML

Definition

A branch of artificial intelligence in which algorithms learn patterns from data to improve their performance on a task without being explicitly programmed for each case.

Definition

Machine learning is a subfield of AI that develops algorithms which learn patterns from data and improve their performance on a task with experience, instead of being explicitly programmed with rules.

Practical examples

Code example Python
from sklearn.datasets import load_iris
from sklearn.model_selection import train_test_split
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import accuracy_score

X, y = load_iris(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(
    X, y, test_size=0.2, random_state=42, stratify=y)

model = LogisticRegression(max_iter=1000)
model.fit(X_train, y_train)          # التعلم من البيانات
pred = model.predict(X_test)         # التنبؤ ببيانات جديدة
print("Accuracy:", round(accuracy_score(y_test, pred), 3))

Expected output

Accuracy: 0.967

Scientific sources

References and scientific sources

Learn and review

Suggested terms to learn next