
Develop regression skills in Python through hands-on projects, covering exploratory data analysis, simple and multiple linear models, data splitting, regularized regression, feature engineering, and time series forecasting for pricing strategy.
Explore regression modeling and numeric prediction in Python as part two of a five-part series on data science, covering data preparation, EDA, regression, classification, and other modeling concepts.
Explore data science and regression concepts in Python, from data prep and EDA to linear and regularized regression, feature engineering, model evaluation, and time series forecasting in a project-based course.
Explore price data across diamonds, computer prices, and apartment rents by building regression models, visualizing data, preparing features, and evaluating and interpreting results.
Explore the theory and application of linear regression with ordinary least squares, evaluation metrics, and regularized models, then survey time series forecasting methods in Jupyter notebooks.
Install and launch Anaconda to run Jupyter notebooks and create a new Python 3 notebook. Use Google Colab as a cloud alternative that stores files in Google Drive.
Explore what data science is, how it fits into the analytics landscape, and the data science workflow, including supervised and unsupervised learning and the use of regression and classification.
Data science requires a blend of coding, math, and domain expertise, plus curiosity and grit. Mastering all three unlocks real-world machine learning and predictive modeling.
Machine learning uses algorithms to help computers learn from data and make decisions. Supervised learning predicts with historical data; unsupervised learning finds patterns and segments customers.
Explore common machine learning algorithms used in practice, including supervised methods for regression and classification, unsupervised methods like clustering and PCA, and the data science workflow.
Define the project scope, gather and clean data, explore insights, apply models, and share findings with end users, noting the workflow is not linear.
Focus on defining a clear scope for a data science project, decide who it serves, the business problem, whether to use supervised or unsupervised learning, and what data is needed.
Gather data from csv files, spreadsheets, databases, apis, and web sources to build a strong foundation for your models; start with a limited data set and clean the data.
Learn how to clean data effectively, addressing formatting issues, correcting data types, imputing missing data, and restructuring to avoid garbage in, garbage out and enable reliable modeling.
Explore data with exploratory data analysis (EDA) to profile, summarize statistics, and visualize features. Assess how columns impact the target before modeling.
Model data by structuring and preparing it for modeling techniques, including data splitting, feature selection and engineering, and training and validating models to make predictions or discover patterns.
Summarize key findings from your regression modeling and interpret what the results mean for the business. Focus on impact for executives, provide recommendations, and outline next steps, including deployment considerations.
Apply regression modeling to predict numeric variables, and prioritize data prep and exploratory data analysis to maximize model performance within the data science workflow.
Define the data science workflow, apply supervised and unsupervised learning, and develop regression models to predict numeric outcomes such as revenue and website traffic.
Explore regression modeling basics, including target and feature concepts, to predict a numeric variable like diamond price from carat weight, color, and clarity, and understand model training and deployment.
Learn how to set regression goals in the scoping phase, balancing prediction and inference with accuracy and explainability to choose modeling approaches, features, and complexity.
Explore common regression algorithms, including linear and regularized regression, time series forecasting, and a brief preview of tree-based regression, plus notes on logistic regression as a classification model.
Explore the regression modeling workflow within the data science pipeline, including data preparation, feature engineering, train-test splits, model fitting (linear, regularized, time series), evaluation, and model selection for production deployment.
Define project scope, gather and clean data, perform exploratory data analysis, prepare data for modeling, apply algorithms, and share insights, with a focus on regression for predicting numeric values.
Visualize and explore the target and features with eda for regression, quantify linear relationships, and identify target–feature and feature–feature relationships while preparing data for modeling.
Investigate the target variable for regression by exploring its distribution with histograms and box plots, and assess data quality with head, info, and describe to guide modeling.
Explore features after understanding the target variable, visualizing numeric variables with histograms and box plots, and evaluating categorical features with value counts.
Read in computers.csv from the data folder and explore the target price, along with features speed and ram, using histograms and a box plot to reveal distributions.
Explore a computer price dataset by loading a CSV with pandas, inspecting data types and statistics, and visualizing distributions with seaborn histograms and box plots.
Explore linear relationships with regression and data analysis, using scatter plots to link digital spend with site traffic and assess correlation, 0.858 (strong positive) and -0.499 (moderate negative).
Generate a correlation matrix from a diamonds data frame and visualize it with a heatmap. Use divergent color scheme with Vmin, Vmax, and cmap to reveal price predictors like carat.
Identify strong predictors by exploring feature-target relationships with scatter plots, correlations, and bar charts. The diamond data show a 0.92 carat price correlation and a strong smoker effect on charges.
Explore feature feature relationships and the impact of highly correlated features on regression, including data cleaning for zero-valued missing dimensions and visualizing X versus carat and cut versus carat.
Explore all numeric feature-target relationships with seaborn pairplots and lmplots to spot correlations and regression trends. Use hue to reveal how categories like smoker or clarity alter regression slopes.
Explore variable relationships by building a correlation matrix and heat map, creating a pair plot of numeric features, and lm plot of ram versus price to assess premium model impact.
Build a Seaborn heat map of the correlation matrix to show price positively relates to ram, speed, and storage, and use a pairplot to highlight ram–price trends and premium differences.
Consolidate data into a single table at the modeling grain, ensure one row per target value with no missing values, and encode categoricals as numeric for the first regression model.
Explore feature target relationships with histograms, box plots, bar charts, and scatter plots to identify predictors, then prepare a single numeric table and handle missing values before simple linear regression.
Explore simple linear regression in Python, fitting a line via least squares, evaluating with metrics and tests, and using the model to predict price from a single feature.
Explain the linear regression model y_hat = beta0 + beta1 x, with beta0 as the intercept and beta1 as the slope, and how residuals quantify the gap to actual values.
See how least squared error drives linear regression by minimizing the sum of squared error, and how ordinary least squares fits the best line in Python.
Compare regression in Python using statsmodels for inference and scikit-learn for prediction, fit models with pandas and numpy, and interpret coefficients and model summaries.
Learn to build regression models with Statsmodels by importing the API, creating X and Y, adding a constant, fitting OLS, and interpreting the model summary for insights.
Compare linear regression's interpretability, using the model y = -2256 + 7756 times carat to predict price and interpret the slope as a $7,756 per carat increase.
Use the predict method to generate predictions for single points or data frames by adding a constant term and carat values, yielding estimated price and noting R squared.
Explore r-squared, the coefficient of determination, which measures how much the model beats the mean, using SSE and SST; in simple regression it equals the correlation squared and ranges 0–1.
Explore how hypothesis tests evaluate regression models, using the F test to determine if the model adds value beyond the mean, by setting alpha and interpreting P values.
Assess the f statistic and p value: f compares explained to unexplained variability, relates to R squared, and with alpha guides rejecting the null to predict a diamond's price.
Explore how t statistics and p-values assess each coefficient in regression, the F test measures overall model effectiveness, and p-values indicate useful predictors like carat weight.
Visualize residuals to assess how well a regression model fits across prediction ranges. Identify patterns around the zero line and under- or over-prediction to improve model performance.
Explore an end-to-end health insurance pricing case study that builds a simple linear regression using age, the most correlated predictor of charges, to predict prices.
Build a simple linear regression model to predict price using the most correlated feature, interpret the coefficients, and visualize the residuals for predictions.
Build a simple linear regression model predicting price from ram with an intercept of 1687 and a 64 per MB slope, explains 0.38 of variance, and predicts Ram 0–64 MB.
Build linear regression models in Python using statsmodels for inference or scikit-learn for prediction, apply least squares to fit a line, and interpret R-squared and F-test p-values.
Extend simple linear regression to multiple regression with features, fit and interpret models in Python, perform variable selection, and compare accuracy using mean absolute error and root mean squared error.
Learn to fit multiple linear regression in python, using correlation screening, feature selection, and interpretation of r-squared, f statistics, and coefficients for age, bmi, and charges.
Analyze multiple linear regression by interpreting coefficients for carat weight and length, interpret the intercept, and hold other features constant to assess each variable's impact on diamond price.
Learn how to select features in regression to balance accuracy and interpretability, using p-values and R-squared, with alpha 0.05 and adjusted R-squared as guides.
Build and interpret two multiple linear regression models using speed, HD, RAM, screen size, trend, and ads; evaluate coefficient signs, residuals, and model fit across price ranges.
Build a multiple linear regression model to predict price from ram, speed, hard drive, screen size, ads, and trend, while evaluating correlation, R-squared, and residuals.
Learn mean absolute error and root mean squared error as intuitive, unit-based metrics for regression, enabling cross-model comparisons and clearer business communication of model fit.
Compare regression performance using age, bmi, and children to predict charges, emphasizing mean absolute error, mean squared error, and root mean squared error, with R squared interpretation from sklearn metrics.
Explore how adjusted r-squared penalizes added features in regression, compare it with r-squared when random noise is included, and use p-values to assess feature significance.
Calculate the mean absolute error (MAE) and RMSE for the simple Ram model and for the six-feature price model to clearly demonstrate the improvement in model fit to stakeholders.
Evaluate regression models using mean absolute error and mean squared error on ram predicting price. Propose a regression function to compute errors and streamline metrics.
Explore how adding features in multiple linear regression impacts coefficients and regression equation, with p-values under 0.05 guiding feature selection. Compare adjusted R-squared and MAE/RMSE to assess fit and assumptions.
Explore the five core assumptions of linear regression—linearity, independence, normality, no perfect multicollinearity, and equal variance of errors—and learn to diagnose, fix violations, and handle outliers with Python.
Diagnose linearity in regression using scatter and residual plots, then transform non-linear relationships with polynomial terms, such as carat squared, to improve model fit and maintain lower-order terms.
Assess independence of errors using the Durbin-Watson test to detect autocorrelation in residuals; randomizing data order can fix violations, with time series modeling as a potential remedy.
Explore how linear regression assumes normal residuals, diagnose with q-q plots, and improve normality via log transforming the target, while recognizing JB tests can mislead.
Explore non-normal residuals in insurance data, test log transforms and feature engineering—smoker flag and BMI interaction—to improve R squared and move residuals closer to normal.
Transforming the target makes coefficients multiplicative and requires inverting the transformation to express results in units. Exponentiate log-based predictions to obtain prices in units and interpret effects as multiplicative.
Diagnose no perfect multicollinearity using variance inflation factor (VIF), drop or combine correlated features, and apply regularized regression to stabilize coefficient estimates.
Diagnose equal variance of errors, or homoscedasticity, and detect heteroscedasticity by inspecting residual plots for consistent errors across predictions. Use log transformation to stabilize variance and improve model fit.
Diagnose how outliers and influential points affect regression using Cook's distance, and explore fixes such as removal, feature engineering, or robust regression.
Explore the key assumptions of linear regression, learn how to diagnose violations, and apply practical fixes—from transformations to time series modeling—to improve model accuracy and reliability.
evaluate model assumptions for a computer price regression, assess linearity, independence of errors, normality, multicollinearity, equal variance, and influential points; implement fixes and trade-offs to settle on a final model.
Assess regression assumptions by inspecting the correlation matrix, multicollinearity, and residuals, using feature engineering and potential log transforms to improve model fit.
Learn the five linear regression assumptions—linearity, dependence of errors, normality, no multicollinearity, and equal variance—and diagnose with residuals, q-q plots, Durbin-Watson, and VIF.
Learn to split data into training, validation, and test sets, apply cross-validation, tune and refit models, and evaluate performance on unseen data to combat overfitting.
Split data into training and test sets to validate model performance. Randomly sample rows for an 80/20 split using train_test_split to ensure representative, reproducible out-of-sample evaluation with X and y.
Assess model validity by comparing training and test performance to detect overfitting and underfitting; use data splitting and metrics like R-squared, MAE, and RMSE to improve generalization and bias-variance trade-off.
Explore the bias-variance tradeoff in regression, balancing training and out-of-sample performance to prevent overfitting and underfitting, with insights on model complexity and validation.
Learn how validation data from the training set, derived with train_test_split, guides model tuning to reduce overfitting, balance bias and variance, and inform feature choices and outlier handling.
Explore model tuning by comparing a baseline three-feature model to a 20-variable model and a three-plus-square model, highlighting bias-variance trade-offs and validation r-squared.
Tune and evaluate models through feature engineering and validation, then refit on combined training and validation data before testing, reporting the final test R-squared for out-of-sample performance.
Explore cross-validation by splitting data into k folds, training on training folds, validating on each fold, and averaging scores to gauge generalization and model variance.
Compare simple validation and cross validation, weigh reliability, data size, and compute costs, and learn when to apply each method for regression and forecasting tasks.
Split data into training and test sets, apply cross validation with train_test_split from scikit-learn, fit the model, and report squared values for each fold and the test score.
Split data with train_test_split, run five-fold cross-validation on numeric features, and report r-squared and mean absolute error for training/test sets.
Data splitting uses training, validation, and test sets to estimate accuracy. Report test performance for stakeholders, avoid peeking to prevent bias, and use validation or cross validation for tuning.
Explore feature engineering for regression models using Python, including dummy variables, interaction terms, binning, and categorical mappings, to boost model accuracy while balancing overfitting risk.
Explore feature engineering techniques for regression and forecasting, including polynomial terms, interactions, dummy variables, binning, date-time features, and scaling, guided by domain knowledge.
Explore how polynomial terms, from squared to cubic, improve regression fit when relationships bend, while balancing complexity with cross-validation to avoid overfitting.
Combine features to address multicollinearity with arithmetic operations, sums, products, and ratios. Explore examples from diamonds and insurance data, and compare R-squared and MAE outcomes.
Explore how interaction terms capture relationships that change with another feature, and see how carat, clarity, and smoker BMI illustrate when these terms improve model fit.
Convert categorical features to numeric indicators with binary columns, such as one for smoker and zero otherwise, and interpret how these flags shift the regression intercept without changing the slope.
Represent categorical data with dummy variables using one-hot encoding via pandas get_dummies, drop the first category to avoid multicollinearity, and interpret coefficients relative to the reference level (diamonds clarity).
Explore creating dummy variables with get_dummies, drop first, and analyze how region, sex, and smoker features affect regression fit, emphasizing feature selection and model interpretation.
Learn how binning categorical data reduces model variance and overfitting by grouping categories into fewer bins and creating meaningful dummy variables.
Bin numeric data with Pandas cut to convert continuous features into categories, including a missing-value category, for interpretable non-linear trends.
Explore diverse feature engineering ideas for regression and forecasting, including date-based features like days since last purchase and totals from price times quantity, plus aggregated metrics.
Apply feature engineering on numeric and categorical features, including polynomial features for hard drive, CD and multi combinations, ram binning, and dummy encoding, then evaluate and select improving model features.
Apply feature engineering with dummy yes/no variables and squared or cubic terms to boost R-squared from 0.712 toward 0.803, while maintaining minimal overfitting.
Turn raw data into useful model features through feature engineering to boost accuracy, applying numeric enhancements, polynomial and interaction terms, and converting categorical variables with dummy variables, with cross-validation.
Predict San Francisco apartment rental prices using a linear regression model, guided by eda, cross-validation, and feature engineering, with interpretability of coefficients and a thousand-row dataset.
Guide regression and forecasting with feature engineering, dummy encoding, and outlier handling to boost cross-validated accuracy. Compare log-transform benefits and interpretability versus predictive power.
This is a hands-on, project-based course designed to help you master the foundations for regression analysis and forecasting with Python.
We’ll start by reviewing the Python data science workflow, discussing the primary goals & types of regression analysis, and do a deep dive into the regression modeling steps we’ll be using throughout the course.
You’ll learn to perform exploratory data analysis (EDA), fit simple & multiple linear regression models, and build an intuition for interpreting models and evaluating their performance using tools like hypothesis tests, residual plots, and error metrics. We’ll also review the assumptions of linear regression, and learn how to diagnose and fix each one.
From there, we’ll cover the model testing & validation steps that help ensure our models perform well on new, unseen data, including the concepts of data splitting, tuning, and model selection. You’ll also learn how to improve model performance by leveraging feature engineering techniques and regularized regression algorithms.
Throughout the course, you'll play the role of Associate Data Scientist for Maven Consulting Group on a team that focuses on pricing strategy for their clients. Using the skills you learn throughout the course, you'll use Python to explore their data and build regression models to help firms accurately predict prices and understand the variables that impact them.
Last but not least, you'll get an introduction to time series analysis & forecasting techniques. You’ll learn to analyze trends & seasonality, perform decomposition, and forecast future values.
COURSE OUTLINE:
Intro to Data Science with Python
Introduce the fields of data science and machine learning, review essential skills, and introduce each phase of the data science workflow
Regression 101
Review the basics of regression, including key terms, the types and goals of regression analysis, and the regression modeling workflow
Pre-Modeling Data Prep & EDA
Recap the data prep & EDA steps required to perform modeling, including key techniques to explore the target, features, and their relationships
Simple Linear Regression
Build simple linear regression models in Python and learn about the metrics and statistical tests that help evaluate their quality and output
Multiple Linear Regression
Build multiple linear regression models in Python and evaluate the model fit, perform variable selection, and compare models using error metrics
Model Assumptions
Review the assumptions of linear regression models that need to be met to ensure that the model’s predictions and interpretation are valid
Model Testing & Validation
Test model performance by splitting data, tuning the model with the train & validation data, selecting the best model, and scoring it on the test data
Feature Engineering
Apply feature engineering techniques for regression models, including dummy variables, interaction terms, binning, and more
Regularized Regression
Introduce regularized regression techniques, which are alternatives to linear regression, including Ridge, Lasso, and Elastic Net regression
Time Series Analysis
Learn methods for exploring time series data and how to perform time series forecasting using linear regression and Facebook Prophet
__________
Ready to dive in? Join today and get immediate, LIFETIME access to the following:
8.5 hours of high-quality video
14 homework assignments
10 quizzes
3 projects
Data Science in Python: Regression & forecasting ebook (230+ pages)
Downloadable project files & solutions
Expert support and Q&A forum
30-day Udemy satisfaction guarantee
If you're a business intelligence professional or aspiring data scientist looking for an introduction to the world of regression modeling and forecasting with Python, this is the course for you.
Happy learning!
-Chris Bruehl (Data Science Expert & Lead Python Instructor, Maven Analytics)
__________
Looking for our full business intelligence stack? Search for "Maven Analytics" to browse our full course library, including Excel, Power BI, MySQL, Tableau and Machine Learning courses!
See why our courses are among the TOP-RATED on Udemy:
"Some of the BEST courses I've ever taken. I've studied several programming languages, Excel, VBA and web dev, and Maven is among the very best I've seen!" Russ C.
"This is my fourth course from Maven Analytics and my fourth 5-star review, so I'm running out of things to say. I wish Maven was in my life earlier!" Tatsiana M.
"Maven Analytics should become the new standard for all courses taught on Udemy!" Jonah M.