Why this technology is relevant and what the scope.
Computers transformed the way we interact with things in our daily life. We have a software in almost everything we use, from toaster to our cars. We are witnessing an age where it is being taken to the next level by integrating AI to our daily life things and thereby solving a vast majority of problems we face in medical science to space exploration. AI is the next big thing.
AI will create 133 million jobs by 2025.
After following this resource what you will learn.
numpy
, matplotlib
and sklearn
used for ML.Summary of what learn to get started.
Details about the technology and learning materials.
Linear regression is a statistical approach for modelling relationship between a dependent variable with a given set of independent variables.
<aside> 💡 In Linear Regression, we try to find a linear function that predicts the response value(y) as accurately as possible as a function of the feature or independent variable(x).
</aside>
A scatter plot of above dataset looks like,
Now, the task is to find a line which fits best in above scatter plot so that we can predict the response for any new feature values. (i.e a value of x not present in dataset)
Here, we are going to use the sklearn ****to do that.
<aside> 💡 These are helper packages used for doing machine learning
</aside>
<aside> 💡 Numpy provides arrays and tools for working with this arrays in python.
</aside>
We import numpy in python like this
import numpy as np
and use it like this
array = np.zeros([5, 5])
print(array)
"""
array([[ 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0.],
[ 0., 0., 0., 0., 0.]])
"""
# we just created an array of shape 5x5 full of zeros!
<aside> 💡 Matplotlib help us to create plots from data
</aside>
We import matplotlib like this
import matplotlib.pyplot as plt
Then create data
# Prepare the data
x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]
y = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
And plot like this,
# Plot the data
plt.plot(x, y, label='linear')
# Add a legend
plt.legend()
# Show the plot
plt.show()
The plot looks like this.
To install python check out this resource
To install numpy try this command in terminal
pip install numpy
To install matplotlib
pip install matplotlib
To install sklearn
pip install sklearn
<aside> 💡 Sklearn or sci-kit learn is a tool for machine learning and data analysis
</aside>
We are going to build a linear regression model using sklearn for the above dataset