ML: Classification vs Regression

Objectives: ML: Classification vs Regression

ML: Classification vs Regression

Machine Learning: Classification vs Regression

1. Introduction | Utangulizi

Machine Learning (ML) is a field of AI that allows systems to learn patterns from data and make predictions. Mashine Learning (ML) ni eneo la AI linalowezesha mifumo kujifunza mifumo kutoka kwa data na kutoa utabiri.

2. Classification | Uainishaji

Classification is a type of supervised learning where the goal is to predict **categorical labels**. Uainishaji ni aina ya kujifunza kwa usaidizi ambapo lengo ni kutabiri lebo za kategoria.

2.1 Formula / Fomula

For a dataset D with features X and labels Y:

hθ(X) = P(Y = c | X)

Meaning:
hθ(X) = predicted probability of class c given input X
hθ(X) = uwezekano unaotabiriwa wa darasa c ukitolewa data ya X

2.2 Example | Mfano

Predict whether an email is Spam or Not Spam based on features like keywords, sender, and time. Tabiri ikiwa barua pepe ni Spam au Si Spam kulingana na maneno, mtumaji, na wakati.

2.3 Visual Example | Mfano wa Picha

Class A Class B

Here we visually separate two classes. Hapa tunaonyesha darasa mbili kivitendo.

3. Regression | Utabiri wa Mthabari

Regression is a type of supervised learning where the goal is to predict **continuous numerical values**. Utabiri wa Mthabari ni aina ya kujifunza kwa usaidizi ambapo lengo ni kutabiri nambari za kuendelea.

3.1 Formula / Fomula

y = f(X) + ε

Meaning:
y = predicted value
f(X) = function mapping input features to prediction
ε = error/noise
y = thamani inayotabiriwa, f(X) = kazi ya kubadilisha vipengele vya ingizo, ε = makosa/kelele

3.2 Example | Mfano

Predict house prices based on features like area, number of rooms, and location. Tabiri bei ya nyumba kulingana na ukubwa, idadi ya vyumba, na eneo.

3.3 Visual Example | Mfano wa Picha

Predicted trend

Here we see a continuous output trend for a regression problem. Hapa tunaona mwelekeo endelevu wa matokeo kwa tatizo la regression.

4. Key Differences | Tofauti Kuu

Aspect | Kipengele Classification | Uainishaji Regression | Utabiri wa Mthabari
Output | Matokeo Discrete labels (categories) | Lebeli zisizoendelea Continuous numeric values | Thamani za nambari zinazoendelea
Example | Mfano Email spam detection | Kutambua spam ya barua pepe Predicting house prices | Kutabiri bei ya nyumba
Evaluation | Uthibitisho Accuracy, F1-score | Usahihi, F1-score Mean Squared Error (MSE), RMSE | MSE, RMSE
Goal | Lengo Assign category/class | Kugawa kategoria/darasa Predict exact numeric value | Kutabiri thamani kamili

5. Summary | Muhtasari

Classification predicts what category something belongs to, while Regression predicts how much/continuous value. Uainishaji unatahiri ni kategoria gani kitu kinachohusu, wakati Regression inatabiri thamani endelevu.

Reference Book: N/A

Author name: SIR H.A.Mwala Work email: biasharaboraofficials@gmail.com
#MWALA_LEARN Powered by MwalaJS #https://mwalajs.biasharabora.com
#https://educenter.biasharabora.com

:: 1::