Menjelma Lagu

ingin menjelma lagu-lagu itu yang tanpa disadari merampas hari kerjamu, akhir pekanmu, atau menenggelamkanku pada sungai deras pikiranmu yang (entah mengapa) seringkali membahayakan hidupku


独家优惠奖金 100% 高达 1 BTC + 180 免费旋转

Linear Regression

.. with Stochastic Gradient Descent

This code builds a simple Linear Regression Model based on Stochastic Gradient Descent method, to predict the son’s height given the father’s height. Here we shall use the SGDRegressor from scikit-learn.

Top 5 rows of the data set

x = dataset[‘Father’].values.reshape(-1,1)
y = dataset[‘Son’].values.reshape(-1,1)

plt.scatter(x, y, color=’g’) # Scatter-plot of X & Y as in Step 3
plt.xlabel(‘Height: Father’)
plt.ylabel(‘Height: Son’)

Scatter plot for prediction of Son’s height based on Father’s height

Add a comment

Related posts:

Interested Challenges

Our society tends to place an emphasis on romantic relationships. We think that just finding that right person will make us happy and fulfilled. But research shows that friends are actually even more…

The Ending Time

Inspired by the Jk Mansi’s wonderful prompt Counting Time!. “The Ending Time” is published by AK (Aaska Aejaz) in Chalkboard.

Is Writing On Medium A Waste Of Time?

It has been more than six months since I first heard of Medium and joined the partner program. I started with high hopes and perhaps with unrealistic expectations. A person who is very successful on…