
Derive the line of best fit for linear regression by minimizing the sum of squared errors with respect to a and b, using y hat = a x + b.
Start coding a one-dimensional linear regression in Python, import numpy and matplotlib, load data from csv, compute a and b, and visualize the regression line.
Explore descriptive and inferential statistics, including mean, median, mode, and p-values, to understand regression and statistical significance in machine learning.
Understand R-squared as the coefficient of determination that quantifies how well linear regression explains variance, while noting residual plots, bias, and model limitations.
Explore how multiple linear regression uses two predictors: miles traveled and deliveries, to estimate travel time, while warning about overfitting and multicollinearity and the need for prep work.
Interpret how each unit change in a predictor, holding others constant, affects sales in a multiple regression; example uses capital investment and marketing spend in thousands of dollars.
Prepare a multiple regression model to predict delivery time using miles traveled, number of deliveries, and gas price as independent variables; assess scatter plots and correlations to select best-fit model.
Explore checking linearity and multicollinearity by examining relationships among independent variables, such as miles traveled and deliveries, and assess gas price to avoid redundancy in regression.
Analyze correlations among travel time and variables, highlighting strong links with miles traveled and deliveries, noting gas price as non-significant, and flagging multicollinearity between miles traveled and deliveries for regression.
Analyze single-variable regressions of travel time on miles traveled, deliveries, and gas price, compare model performance using r-squared, standard error, and p-values to identify significant predictors.
Examine multi-variable regression using travel time, miles, and deliveries to diagnose model strength with R-squared and F-statistics, and detect multicollinearity via the variance inflation factor to guide variable selection.
Assess multiple regression models by comparing r-squared adjusted and predicted, p-values, and variance inflation factors to select the simplest, best-fitting model, often a single-variable choice.
Learn how to use dummy variables to encode categorical data in regression, including one fewer dummy, with examples like exemplary high schools and regional categories.
Learn to perform multiple linear regression in Excel to predict factory costs from product quantities A, B, and C, including p-value screening and model refinement.
Learn how to perform multiple linear regression in Python to predict stock price using interest rate and unemployment rate, including data import, linearity checks, and assumption validation.
Define dependent and independent variables, then perform multiple linear regression in Python using cycle layer and stats models to predict stock price from interest rate and unemployment rate.
Learn to prepare a Python 3 multivariate regression model to predict human life expectancy by cleaning data, encoding country with label and one-hot encoding, and setting features and target.
Apply multiple linear regression in Python to predict human life expectancy from a dataset with dummy variables, using a train-test split and model evaluation.
Explore ridge regression as a regularized alternative to multiple linear regression, using the Boston housing dataset to compare training versus test performance and avoid overfitting.
Explore ridge regression, an L2 regularization method that shrinks coefficients to improve generalization on the Boston housing data by balancing training and test performance.
Learn how alpha regularization affects ridge regression coefficients in Python 3, comparing models with different alpha values to visualize coefficient magnitudes and the impact of regularization on a business problem.
Explore how L1 regularization in lasso regression drives coefficients to zero, enabling automatic feature selection and guiding alpha to balance bias and variance on the Boston housing dataset.
Explore residual plots for a least squares regression, defining residuals as actual minus expected, and learn to interpret scattered versus patterned residuals to assess model fit.
Explore non linear regression with polynomial and quadratic models, compare linear versus quadratic fits, analyze residuals, explain variance, and improve predictions for real data.
Understand overfitting in regression by comparing linear, quadratic, and higher-order polynomials, and learn how quadratic models balance fit and generalization for new data in Python.
This lecture shows polynomial regression in Python to model non-linear data, using quadratic data and polynomial features with a linear model, and discusses overfitting and data splitting.
Explore decision trees and regression trees to predict continuous targets using root and leaf nodes. Learn how splits use impurity, notably Gini impurity, to build accurate predictions.
Implement a decision tree regression model in Python to predict petrol consumption from features like gas taxes, income, highways, and population; evaluate with mean absolute error.
Develop a regression tree to predict travel time from miles traveled, deliveries, and gas price using train-test split; visualize the tree and tune max depth to curb overfitting.
Explore random forests, built from bootstrap samples of decision trees, to improve accuracy through bagging, variable subsetting, and ensemble voting for regression and classification tasks.
Artificial Intelligence has become prevalent recently. People across different disciplines are trying to apply AI to make their tasks a lot easier. For example, economists are using AI to predict future market prices to make a profit, doctors use AI to classify whether a tumor is malignant or benign, meteorologists use AI to predict the weather, HR recruiters use AI to check the resume of applicants to verify if the applicant meets the minimum criteria for the job, etcetera. The impetus behind such ubiquitous use of AI is machine learning algorithms. For anyone who wants to learn ML algorithms but hasn’t gotten their feet wet yet, you are at the right place. The rudimental algorithm that every Machine Learning enthusiast starts with is a linear regression algorithm. Therefore, we shall do the same as it provides a base for us to build on and learn other ML algorithms.
Before knowing what is linear regression, let us get ourselves accustomed to regression. Regression is a method of modeling a target value based on independent predictors. This method is mostly used for forecasting and finding out the cause and effect relationship between variables. Regression techniques mostly differ based on the number of independent variables and the type of relationship between the independent and dependent variables.
Want to learn more about regression? Don't hesitate and join us to begin the journey of learning!