This project implements linear regression using batch gradient descent. It includes Jupyter Notebook exercises (C1_W2_Linear_Regression.ipynb
) and a dataset file (ex1data1.txt
). The goal is to learn the optimal parameters for a linear regression model that predicts the profit of a restaurant based on the population of a city.
- Open
C1_W2_Linear_Regression.ipynb
in a Jupyter Notebook environment. - Run the cells in the notebook to execute the code and see the results.
- The notebook includes sections for loading data, implementing cost functions, running gradient descent, and visualizing the results.
The dataset (ex1data1.txt
) contains two columns: population of a city and the corresponding profit of a restaurant. This dataset is used to train the linear regression model.
Ensure that you have Python and Jupyter Notebook installed. Open the C1_W2_Linear_Regression.ipynb
notebook in a Jupyter environment and execute the cells sequentially. Adjust parameters and experiment as needed.
Feel free to contribute by creating issues or submitting pull requests. Any improvements or feedback are highly appreciated.