🏘️ This script receives as a training set information such as area, number of bedrooms, etc. and price about several houses in California.
🏠 Based on this data, the model is trained and uses linear regression and is able to estimate the price of a new house.
- Loading the house data from a text file.
- Normalizing the data using Z-score normalization.
- Fitting a Linear Regression model using Stochastic Gradient Descent.
- Making predictions using the trained model.
- Plotting the predictions against the original features to visualize the model's performance.
This visualization presents a comparison between actual and predicted housing prices from a linear regression model. The plots demonstrate the model’s predictions (in red) 🔴 against the actual values (in blue) 🔵
These graphs show the decreasing cost over iterations for a multiple variable linear regression model, indicating optimization of the model's parameters. The detailed view on the right highlights the tail end of this process, where the cost reduction slows as the model approaches its best fit.
🗒️ Admission is based on two tests and the training set contains the old results of several applicants and whether they were accepted or rejected.
- Loading historical exam and admission data.
- Applying logistic regression to estimate admission probabilities.
- Optimizing the model with gradient descent.
- Making predictions and evaluating the model's accuracy.
With this model, you can then predict if a new student will be admitted based on their scores on the two exams.