
Explore linear regression theory, mathematics, and implementation in Python, deriving equations and coding regression from first principles, then compare manual methods with scikit-learn in practical exercises.
The course presents four sections on simple, multiple, and polynomial regression, covering least squares, gradient descent, overfitting, regularization, and Python implementations.
Learn essential Python modules for this course, including arithmetic with Python, working with arrays, plotting and visualizing data, using lists, and applying conditional statements and loops.
Install python using the Anaconda individual edition by downloading the exe from anaconda.com and running the installer. Launch Anaconda Navigator and Jupyter notebook to start a new project.
Learn to open and rename a Jupyter notebook, create and run Python cells, and comment with hash marks. Manage markdown cells, insert or delete cells, and restart or clear outputs.
Learn how Python acts as a calculator for addition, subtraction, multiplication, and division, then handle exponent, square root, and order of operations with parentheses and modulo operator.
Learn variable assignment to simplify code and update values in one place, with power demonstrations for 3 and 4, and explore comparison and logical operators.
Explore conditional statements in Python by using if, else, elif, and logical operators such as and or with comparison terms on variables like x and y to control output.
Learn to use numpy arrays in Python, creating one-dimensional and two-dimensional arrays, inspecting shape and dtype, and finding maximum and minimum values with their indices using argmax and argmin.
Explore numpy arrays by using arange and linspace to create 1d arrays with lower and upper bounds and intervals, and reshape to 2d arrays while preserving element count.
Explore generating zeros, ones, and identity matrices with numpy, creating random numbers and integers, and mastering 1d and 2d indexing, slicing, and submatrix extraction.
Plot and visualize data with matplotlib.pyplot, generate x and y using numpy linspace, and customize color, size, labels, legend, and title for clear insights.
Explore plotting basics with numpy and matplotlib: set x and y axis limits, customize ticks, remove axes, apply styles, and enhance plots with grids, markers, and legends.
Learn to create and arrange multiple plots with subplots in Python using NumPy and Matplotlib, control spacing with layout, and compare continuous and discrete sine waves in a 2x2 grid.
Learn plotting and visualization with Matplotlib rc parameters, controlling line width, line style, and figure size globally across subplots, with x and y label sizing and a dark background style.
Explore Python lists, distinguish them from numpy arrays, and master indexing, slicing, and common methods like append, pop, reverse, and sort, including nested lists and matrices.
Master Python for loops with range, indentation, and if statements to print sequences, filter numbers by divisibility, build lists with append, and compute sums.
Master nested for loops in Python by examining outer and inner loop execution, building matrices with NumPy zeros, and generating a checkerboard with the x plus y formula.
Explore the slope-intercept form y = mx + b, identifying slope m and intercept b from data. See how a linear model fits salary versus experience and makes predictions.
Define regression as the relationship between a feature x and a dependent target y, expressed as y = w0 + w x, noting two cases with or without bias.
Define regression as the relationship between features and target, replacing intercept with bias and slope with weight. Introduce multiple regression with two features and feature matrix notation X and x.
Derive the bias and parameters for a least squares linear regression model using y = w0 + w x, and discuss error terms and how to minimize them.
Learn how to derive regression parameters using the least squares loss, expand errors, and solve via gradient to obtain the matrix form and bias term.
Explore least square regression by deriving equation 16, implement it in Python with and without sklearn, and compare results to understand the mathematics behind regression.
Implement least squares regression in Python to estimate the intercept and the weight. Use salary experience data and visualize results with numpy, pandas, and matplotlib.
Learn to implement linear regression in Python using sklearn, compare its results with manual least squares, and extract the intercept and coefficient from experience and salary data.
Learn to implement multiple regression in Python with two features x1 and x2 (experience and education), form the design matrix with an intercept, compute least-squares parameters, and predict a sample.
Demonstrates multiple regression in Python on a housing dataset with length and width features to predict price, including data cleaning, train-test split, and coefficient interpretation.
Explore feature engineering by turning length and width into the area feature to convert a two-feature regression into a simple price model. Assess RMSE impact.
Expand linear regression to polynomial regression by adding x, x^2, and x^3 terms to fit complex data, covering R1 and R2 and addressing underfitting and overfitting.
Learn to implement polynomial regression in python, using least squares and sklearn, to fit a curve to the experience salary data set and compare degrees up to four.
Polynomial regression remains linear regression by adding square and higher powers to features, transforming the x matrix into a polynomial feature matrix and using the least squares method in Python.
Apply gradient descent to regression when least squares fail, derive mean square error, and update weights and bias using learning rate alpha across varying feature counts.
Demonstrate gradient descent with a pictorial view of mean square error as the loss, and explain how learning rate alpha and gradient steer toward the convex global minimum.
Compare gradient descent and least squares for regression, highlighting convex loss, iterative updates, learning rate considerations, and how data size and x^T x invertibility shape method choice.
Apply gradient descent to solve a regression problem in Python using numpy, pandas, and matplotlib; train on an experience–salary dataset and compare performance with least squares.
Explore regression with gradient descent in python using a randomly generated dataset, tuning learning rate (alpha) and iterations to achieve an optimal model comparable to least squares.
Examine how overfitting harms generalization to unseen data and how regularization with a lambda term in the loss function shrinks weights and standardizes features to improve performance.
Explain ridge regression as a regularized, squared penalty on weights that balances two loss terms via lambda, showing its relation to least squares and lambda extremes.
Compare ridge regression with ordinary least squares in Python using the Boston dataset, standardize data, and explore how alpha influences coefficients and rmse, highlighting overfitting prevention.
•The focus of the course is to solve Regression problem in python with the understanding of theory and Mathematics as well.
• All the mathematical equations for Regression problem will be derived and during coding in python we will code these equations step by step to see the implementation of mathematics of Regression in python.
• This course is for everyone. A high school student, a university student and
a researcher in machine learning.
• The course starts from the fundamentals of Regression and then we will
move on to next levels with a decent pace so that every student can follow
along easily.
• In this course you will learn about the theory of the Regression,
mathematics of Regression with proper derivations and following all the
steps. Finally, you will learn how to code Regression in python by following
the equations of Regression learned in the theory.
Who this course is for ?
Students learning Data Science, Machine Learning and Applied Statistical Analytics.
Students and Researchers who want to switch from Matlab and Other Programming Languages to Python.
Students and Researchers who know about the theory of Regression Analysis but don't know how to implement in Python.
Every individual who wants to learn Simple, Multiple and Polynomial Regression Analysis from scratch.