Session 1 Coding - Supervised Learning Recap and Code
Session 1 Coding - Supervised Learning Recap and Code
● Linear Regression
● Polynomial Regression
● Ridge Regression
● Lasso Regression
Types of Classification Algorithms
Choosing the Right Category
● Logistic Regression
● Decision Trees
● Support Vector Machines
● K-Nearest Neighbors
Linear Regression
Measuring Success
Discussion on metrics:
● Accuracy
● Precision
● Recall
● F1 Score
LET’S CODE
Setting the Stage
Explanation: We're grabbing some tools to make our coding journey smooth. numpy for numerical
operations, matplotlib for plotting, and LinearRegression from scikit-learn for our star prediction
model.
Preparing the Data
Explanation: Time to put our model to the test! We're giving it new hours
to study, and it's predicting the corresponding exam scores. It's like
asking our ML fortune teller for predictions.
Visualizing the Regression Line
Caption: Time to draw the line between reality and our predictions!"
Explanation: Let's visualize how well our predictions align with reality.
The scatter plot shows our actual data, and the red line represents our
model's predictions - it's like drawing the best-fit line through our data
points.
Visualizing the regression line
LOGISTIC REGRESSION CODING
Import and clean
Split