Skip to content

ssabiescu/MachineLearning

Repository files navigation

ML Project - Supervised Learning

ai

1. Linear Regression

Description

🏘️ 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.

The key steps in the script include:

  • 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.
a) The normal Linear Regression

lin_reg

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) 🔵

b) The multiple variable Linear Regression

lin_reg_mul

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.

2. Logistic Regression

Description

🏫 This logistic regression model predict whether a student gets admitted into a university.
🗒️ Admission is based on two tests and the training set contains the old results of several applicants and whether they were accepted or rejected.

Essential steps in the script:

  • 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.

university

With this model, you can then predict if a new student will be admitted based on their scores on the two exams.

Releases

No releases published

Packages

No packages published

Languages