This project implements a machine learning model using Linear Regression to convert temperatures from Celsius to Fahrenheit. The model demonstrates a practical application of linear regression for a simple temperature conversion task.
- pandas
- seaborn
- scikit-learn
- numpy
The project uses a dataset stored in 'celsius.csv' containing temperature values in both Celsius and Fahrenheit scales.
The project utilizes a simple Linear Regression model from scikit-learn to learn the relationship between Celsius and Fahrenheit temperatures.
- Load the data using pandas
- Visualize the relationship using seaborn's scatterplot
- Process input data (X) and target data (y) by reshaping them for model compatibility
- Train the Linear Regression model
The model is trained using the sklearn.linear_model.LinearRegression class and the processed temperature data.
- Ensure all dependencies are installed
- Place the 'celsius.csv' file in the project directory
- Run the notebook cells sequentially
- Use the trained model to predict Fahrenheit temperatures from Celsius inputs
The model's performance can be evaluated using the built-in score method, which calculates the R² score of the predictions.
notebook.ipynb: Main Jupyter notebook containing the model implementationcelsius.csv: Dataset with temperature values (required for running the model)
This project serves as a basic introduction to Linear Regression, demonstrating how machine learning can be applied to solve simple real-world problems. The linear relationship between Celsius and Fahrenheit makes this an ideal case for Linear Regression.