Të dhëna & IA

Linear regression

Në shqip: Regresioni linear

ShpjegimiSQ

Regresioni linear gjen vijën e drejtë që i përshtatet më mirë pikave — p.sh. çmimi i shtëpisë sipas sipërfaqes. Modeli më i thjeshtë i ML-së, dhe ende shumë i dobishëm sepse kuptohet lehtë.

EnglishEN

Linear regression finds the straight line that best fits the points — e.g. house price by floor area. The simplest ML model, and still very useful because it's easy to understand.

Si ta mendosh

Si të vizatosh me vizore vijën që kalon sa më afër të gjitha pikave.

Lexoje në anglisht

Like drawing with a ruler the line passing closest to all the dots.

Shembull kodipython

from sklearn.linear_model import LinearRegression
m = LinearRegression().fit([[50], [80], [120]], [60_000, 95_000, 140_000])
print(m.predict([[100]]))

Terma të lidhur