Të dhëna & IA

Classification

Në shqip: Klasifikim

ShpjegimiSQ

Klasifikimi është një detyrë e IA-së ku modeli vendos në cilën kategori bën pjesë diçka — p.sh. nëse një email është spam, nëse në foto ka mace apo qen, ose nëse një koment është pozitiv apo negativ.

EnglishEN

Classification is an AI task where the model decides which category something belongs to — whether an email is spam, whether a photo shows a cat or a dog, or whether a comment is positive or negative.

Si ta mendosh

Si punonjësi i postës që i ndan letrat sipas qytetit: Prishtinë, Tiranë, Shkup — çdo letër në thesin e duhur.

Lexoje në anglisht

Like a postal worker sorting letters by city: Prishtina, Tirana, Skopje — every letter into the right bag.

Shembull kodipython

from sklearn.tree import DecisionTreeClassifier
X = [[3, 1], [0, 0], [5, 1], [0, 1]]  # [sa herë „FALAS“, ka lidhje]
y = ["spam", "jo", "spam", "jo"]
modeli = DecisionTreeClassifier().fit(X, y)
print(modeli.predict([[4, 1]]))      # ['spam']

Terma të lidhur