Data Analysis From Scratch With Python: Step By Step Guide


y_pred = regressor.predict(X_test)



Download 2,79 Mb.
Pdf ko'rish
bet31/60
Sana30.05.2022
Hajmi2,79 Mb.
#620990
1   ...   27   28   29   30   31   32   33   34   ...   60
Bog'liq
Data Analysis From Scratch With Python Beginner Guide using Python, Pandas, NumPy, Scikit-Learn, IPython, TensorFlow and... (Peters Morgan) (z-lib.org)

y_pred = regressor.predict(X_test)
y_pred (predicted Profit values on the
X_test) will be like this: 
However, is that all there is? Are all the variables (R&D Spend, Administration,
Marketing Spend, State) responsible for the target (Profit). Many data analysts
perform additional steps to create better models and predictors. They might be
doing Backward Elimination (e.g. eliminating variables one by one until there’s
one or two left) so we’ll know which of the variables is making the biggest
contribution to our results (and therefore more accurate predictions).
There are other ways of making the making the model yield more accurate
predictions. It depends on your objectives (perhaps you want to use all the data
variables) and resources (not just money and computational power, but also time
constraints).
Decision Tree
The Regression method discussed so far is very good if there’s a linear
relationship between the independent variables and the target. But what if there’s
no linearity (but the dependent variables can still be used to predict the target)?
This is where other methods such as Decision Tree Regression comes in. Note
that it sounds different from Simple Linear Regression and Multiple Linear
Regression. There’s no linearity and it works differently. Decision Tree
Regression works by breaking down the dataset into smaller and smaller subsets.
Here’s 
an 
illustration 
that 
better 
explains 
it: 


http://chem-eng.utoronto.ca/~datamining/dmc/decision_tree_reg.htm
Instead of plotting and fitting a line, there are decision nodes and leaf nodes.
Let’s quickly look at an example to see how it works (using
Position_Salaries.csv): The dataset: 
Position,Level,Salary
Business Analyst,1,45000

Download 2,79 Mb.

Do'stlaringiz bilan baham:
1   ...   27   28   29   30   31   32   33   34   ...   60




Ma'lumotlar bazasi mualliflik huquqi bilan himoyalangan ©hozir.org 2024
ma'muriyatiga murojaat qiling

kiriting | ro'yxatdan o'tish
    Bosh sahifa
юртда тантана
Боғда битган
Бугун юртда
Эшитганлар жилманглар
Эшитмадим деманглар
битган бодомлар
Yangiariq tumani
qitish marakazi
Raqamli texnologiyalar
ilishida muhokamadan
tasdiqqa tavsiya
tavsiya etilgan
iqtisodiyot kafedrasi
steiermarkischen landesregierung
asarlaringizni yuboring
o'zingizning asarlaringizni
Iltimos faqat
faqat o'zingizning
steierm rkischen
landesregierung fachabteilung
rkischen landesregierung
hamshira loyihasi
loyihasi mavsum
faolyatining oqibatlari
asosiy adabiyotlar
fakulteti ahborot
ahborot havfsizligi
havfsizligi kafedrasi
fanidan bo’yicha
fakulteti iqtisodiyot
boshqaruv fakulteti
chiqarishda boshqaruv
ishlab chiqarishda
iqtisodiyot fakultet
multiservis tarmoqlari
fanidan asosiy
Uzbek fanidan
mavzulari potok
asosidagi multiservis
'aliyyil a'ziym
billahil 'aliyyil
illaa billahil
quvvata illaa
falah' deganida
Kompyuter savodxonligi
bo’yicha mustaqil
'alal falah'
Hayya 'alal
'alas soloh
Hayya 'alas
mavsum boyicha


yuklab olish