Let's Explore IT !

Kata mbah Bardolo, IT tidak hanya teknik.. IT tidak hanya sains..
Tetapi IT adalah juga seni, humanisme dan cinta....

Thursday 18 October 2018

[Python for Machine Learning] Contoh Prediksi Sederhana dengan Simple Regresi Linear

Ada banyak cara melakukan prediksi menggunakan machine learning. Salah satunya yang paling sederhana adalah menggunakan Regresi Linear.

Simple Regresi Linear adalah salah satu metode yang biasa digunakan untuk menguji sejauh mana hubungan sebab akibat antara dua buah variabel. Kedua variabel tersebut sering disebut sebagai variabel faktor penyebab (X) terhadap variabel akibat (Y). Variabel X seringkali disebut sebagai Predictor, sedangkan variabel Y sering kali disebut sebagai Response.

Simple Regresi Linear seringkali dipergunakan untuk melakukan prediksi atau peramalan baik tentang karakteristik baik yang bersifat kualitas maupun yang kuantitas.  Selanjutnya model persamaan Simple Regresi Linear adalah seperti berikut ini :

Y = a + bX
Dimana :
  • Y = variabel akibat atau response yang juga disebut sebagai dependent variable.
  • X = variabel penyebab atau predictor yang juga merupakan independent variable. 
  • a  = konstanta
  • b = koefisien regresi, yaitu besaran response yang ditimbulkan oleh predictor.
Berikut adalah studi kasus sederhana untuk membuat machine learning dengan menerapkan metode Simple Regresi Linear.  Sebuah penelitian dilakukan untuk mengetahui pengaruh biaya promosi terhadap pendapatan penjualan sebuah perusahaan.  Simple regresi linear akan digunakan untuk memprediksi nilai penjualan yang akan diperoleh berdasarkan beaya promosi yang dikeluarkan. Disamping itu hasil machine learning juga akan bisa melihat korelasi antara Biaya Promosi  dengan nilai penjualan yang diperoleh. Output lain yang bisa diperoleh adalah grafik korelasinya antara kedua variabel tersebut.

Berikut adalah kode-kode programnya.





Bacaan lengkap tentang topik ini ada di buku Fundamental of Python for Machine Learning, Penerbit Gava Media Yogyakarta, 2018.

19 comments:

Anonymous said...

Thank you for sharing your thoughts. I really appreciate
your efforts and I will be waiting for your further post thank you once again.

Anonymous said...

Incredible quest there. What happened after?
Good luck!

Anonymous said...

You havе made some decent points there. I looked on the web ttⲟ find out more aƅοht tһe issue and found most individuals will go along with your views on this website.

Anonymous said...

For the reason that the admin of this site is working, no question very soon it will be renowned,
due to its quality contents.

Anonymous said...

After I initially left a comment I appear to have clicked the -Notify me when new comments are added- checkbox and from now on each time a comment is added I
recieve four emails with the same comment. Is there a means you can remove me
from that service? Thank you!

Anonymous said...

Fabulous, what a web site it is! This weblog gives valuable
information to us, keep it up.

Anonymous said...

Εveryone loves whаt you guys are սp too. This sort of cⅼever wοrk and exposᥙre!

Keep up the wonderful works gսys I've included you guys to οur blogroll.

Anonymous said...

Hello vеry nice site!! Guy .. Beautiful .. Amazing ..
I'll bookmark yߋur blog and tae thee feeds additionally?

І'm satisfied to seek ouut ѕo many ᥙseful info hefe witһin tthe
publish, we need develop mоre strategies ᧐n this regard, tanks
for sharing. . . . . .

Anonymous said...

Thanks in favor of sharing such a nice idea, post is nice, thats why i have read
it fully

Anonymous said...

I am trulу delikghted tto glance at this blog pots whicһ includeѕ lօts of valuablee datа, thanks for providing such infoгmation.

Anonymous said...

At this moment I am going to do my breakfast,
when having my breakfast coming again to read additional news.

Anonymous said...

Thanks in support of sharing such a nice thinking, piece of writing is nice, thats why i have read it fully

Anonymous said...

Thank you fߋr sharingg your thoսghts. I realⅼy appreciate your effߋrts and I will Ье waiting for yoiur
further рost thank you once again.

Anonymous said...

Hello! This is my first visit to your blog! We are a
collection of volunteers and starting a new project in a community in the same niche.

Your blog provided us beneficial information to work on. You
have done a marvellous job!

Anonymous said...

I blog quite often and I truly thank you for
your content. This article has really peaked my interest.
I will take a note of your website and keep checking for new information about once
a week. I subscribed to your RSS feed too.

Anonymous said...

If you wish for to get a great deal from this post then you have to apply
these techniques to your won weblog.

Anonymous said...

Thanks for sharing your thoughts on Golden Goose Super Star Sneakers Womens.
Regards

Anonymous said...

Everything is very open with a precise explanation of the challenges.
It was really informative. Your site is useful.
Thank you for sharing!

Anonymous said...

Wow, amazing blog layout! How long have you been blogging for?
you made blogging look easy. The overall look
of your web site is magnificent, as well as the content!

Post a Comment

Silakan masukkan komentar Anda... Bebas kok :-)

 
Design by Free WordPress Themes | Bloggerized by Lasantha - Premium Blogger Themes | Hot Sonakshi Sinha, Car Price in India