Linear Regression is implemented to identify the relationship between profit of a bike sharing company and population of different cities. The main objective is to find the next city in which a new outlet should be opened which results in optimal profitability.
-
Visualization of the cost function by plotting the cost over a 2-dimensional grid of 𝜃_0 and 𝜃_1 values. The cost function J(𝜃) is bowl-shaped and has a global minimum.
-
Implementation of gradient descent algorithm from scratch in Python without the use of machine learning frameworks such as scikit-learn and statsmodels. Ran the algorithm over 2000 iterations to minimize the cost J(θ). With each step of batch gradient descent, the parameters 𝜃_j come closer to the optimal values that will achieve the lowest cost J(𝜃). The plot of convergence is shown below:
- matplotlib
- numpy
- pandas
- seaborn
- mpl_toolkits