Skip to content
Felix
  • Topics
    • My List
    • Felix Guide
    • Asset Management
    • Coding and Data Analysis
      • Data Analysis and Visualization
      • Financial Data Tools
      • Python
      • SQL
    • Credit
      • Credit Analysis
      • Restructuring
    • Financial Literacy Essentials
      • Financial Data Tools
      • Financial Math
      • Foundations of Accounting
    • Industry Specific
      • Banks
      • Chemicals
      • Consumer
      • ESG
      • Insurance
      • Oil and Gas
      • Pharmaceuticals
      • Project Finance
      • Real Estate
      • Renewable Energy
      • Technology
      • Telecoms
    • Introductory Courses
    • Investment Banking
      • Accounting
      • Financial Modeling
      • M&A and Divestitures
      • Private Debt
      • Private Equity
      • Valuation
      • Venture Capital
    • Markets
      • Economics
      • Equity Markets and Derivatives
      • Fixed Income and Derivatives
      • Introduction to Markets
      • Options and Structured Products
      • Other Capital Markets
      • Securities Services
    • Microsoft Office
      • Excel
      • PowerPoint
      • Word & Outlook
    • Professional Skills
      • Career Development
      • Expert Interviews
      • Interview Skills
    • Risk Management
    • Transaction Banking
    • Felix Live
  • Pathways
    • Investment Banking
    • Asset Management
    • Equity Research
    • Sales and Trading
    • Commercial Banking
    • Engineering
    • Operations
    • Private Equity
    • Credit Analysis
    • Restructuring
    • Venture Capital
    • CFA Institute
  • Certified Courses
  • Ask An Instructor
  • Support
  • Log in
  • Topics
    • My List
    • Felix Guide
    • Asset Management
    • Coding and Data Analysis
      • Data Analysis and Visualization
      • Financial Data Tools
      • Python
      • SQL
    • Credit
      • Credit Analysis
      • Restructuring
    • Financial Literacy Essentials
      • Financial Data Tools
      • Financial Math
      • Foundations of Accounting
    • Industry Specific
      • Banks
      • Chemicals
      • Consumer
      • ESG
      • Insurance
      • Oil and Gas
      • Pharmaceuticals
      • Project Finance
      • Real Estate
      • Renewable Energy
      • Technology
      • Telecoms
    • Introductory Courses
    • Investment Banking
      • Accounting
      • Financial Modeling
      • M&A and Divestitures
      • Private Debt
      • Private Equity
      • Valuation
      • Venture Capital
    • Markets
      • Economics
      • Equity Markets and Derivatives
      • Fixed Income and Derivatives
      • Introduction to Markets
      • Options and Structured Products
      • Other Capital Markets
      • Securities Services
    • Microsoft Office
      • Excel
      • PowerPoint
      • Word & Outlook
    • Professional Skills
      • Career Development
      • Expert Interviews
      • Interview Skills
    • Risk Management
    • Transaction Banking
    • Felix Live
  • Pathways
    • Investment Banking
    • Asset Management
    • Equity Research
    • Sales and Trading
    • Commercial Banking
    • Engineering
    • Operations
    • Private Equity
    • Credit Analysis
    • Restructuring
    • Venture Capital
    • CFA Institute
  • Certified Courses
Felix
  • Data
    • Company Analytics
    • My Filing Annotations
    • Market & Industry Data
    • United States
    • Relative Valuation
    • Discount Rate
    • Building Forecasts
    • Capital Structure Analysis
    • Europe
    • Relative Valuation
    • Discount Rate
    • Building Forecasts
    • Capital Structure Analysis
  • Models
  • Account
    • Edit my profile
    • My List
    • Restart Homepage Tour
    • Restart Company Analytics Tour
    • Restart Filings Tour
  • Log in
  • Ask An Instructor
    • Email Our Experts
    • Felix User Guide
    • Contact Support

Liquidity Regressors in Python

Practice splitting data into training and testing sets, constructing model pipelines, and performing hyperparameter tuning. As well as cross-validating alternative models to find the top performer

Unlock Your Certificate   
 
0% Complete

30 Lessons (55m)

Show lesson playlist
  • Description & Objectives

  • 1. Liquidity Regressor Learning Objectives

    00:21
  • 2. Case Study Overview

    03:01
  • 3. Importing Data Workout

    01:09
  • 4. Metadata

    01:09
  • 5. Metadata Workout

    00:35
  • 6. Splitting Your Data

    01:57
  • 7. Splitting Your Data Workout

    02:04
  • 8. Train Test Split

    02:46
  • 9. Unpacking Lists

    01:51
  • 10. Unpacking Lists Workout

    01:24
  • 11. Progress Checkpoint

    00:13
  • 12. Model Pipelines

    04:38
  • 13. Model Pipelines Workout

    01:59
  • 14. Progress Checkpoint 1

    00:44
  • 15. Hyperparameter Tuning

    04:32
  • 16. Hyperparameter Grid Workout 1

    02:21
  • 17. Hyperparameter Grid Workout 2

    02:27
  • 18. Aggregating Hyperparameter Grids

    00:50
  • 19. Progress Checkpoint 2

    00:42
  • 20. Cross Validation

    02:06
  • 21. Creating Untrained Models

    02:13
  • 22. Creating Untrained Models Workout

    03:49
  • 23. Training and Tuning Models

    00:55
  • 24. Training and Tuning Models Workout

    02:29
  • 25. Model Evaluation

    02:02
  • 26. Model Evaluation Workout

    03:00
  • 27. Progress Checkpoint 3

    00:31
  • 28. Visualizing Model Predictions

    01:22
  • 29. Visualizing Model Predictions Workout

    01:04
  • 30. Using Your Model

    00:57

Prev: Regression Algorithms in Python Next: Classification Algorithms

Model Pipelines

  • Notes
  • Questions
  • Transcript
  • 04:38

How to create and evaluate multiple regression models, including Lasso, Ridge, Elastic Net, Random Forest, and Gradient Booster.

Downloads

No associated resources to download.

Glossary

elastic net gradient booster lasso Machine Learning Python random forest ridge
Back to top
Financial Edge Training

© Financial Edge Training 2025

Topics
Introduction to Finance Accounting Financial Modeling Valuation M&A and Divestitures Private Equity
Venture Capital Project Finance Credit Analysis Transaction Banking Restructuring Capital Markets
Asset Management Risk Management Economics Data Science and System
Request New Content
System Account User Guide Privacy Policy Terms & Conditions Log in
Transcript

Later on in this lesson, you're going to create several competing versions of the lasso, ridge, elastic net, random forest, and gradient booster regression models. You're going to evaluate each version against the others to find the model with the best performance. Prior to this model competition, it's necessary to define the process you'll repeat for each class. This process is called the model pipeline. For this liquidity regressor algorithm, the pipeline for each model class will be a simple two-step process. First, standardize the training data to a common scale, and then second, apply the model class to the training data with a given random state. Standardizing the data to a common scale prevents your machine learning algorithms from overemphasizing input features with a larger scale. That is to say just because input features have larger values doesn't mean that they should have a greater influence on your model. But if you don't standardize, that's what's going to happen. The scikit-learn package includes a function for creating model pipelines called make pipeline and a standardization function called StandardScaler, which is case sensitive.

You can indicate the model class of each pipeline with the format that you see here, and that accepts the argument random state equals whatever number. So just as we did with traintest split, make sure to set the random state to one when you have the chance so that your results match the results that you'll see in this lesson.

You're going to store your model pipelines in the dictionary, object named pipelines. Follow along with the code here to import the necessary functions from the scikit- learn package and also create model pipelines for the lasso and ridge model classes. Here we're going into the scikit-learn linear model module, and we're importing the lasso machine learning model and the ridge machine learning model. We're going into the pipeline module to import the make pipeline function, and then we're going into the pre-processing module to import the standard scaler function. Now we're creating a new dictionary called Pipeline, so pipelines and then open curly brace. And then each of these items is going to represent one of the models that we're going to use. The key that I'm using is lasso a string, and then remember that colon we're using the make pipeline function, and then we're passing two arguments. First, the standard scaler function to tell the pipeline that the first step is to use that standard scaler to put all of our data on a standard scale. And then we're telling it that the model associated with this item lasso is the lasso model that we imported from scikit-learn. And then inside that lasso model, we're passing it the random state one. And that's so your results match the ones that you're going to see in this video, and then remember to put the comma after the end of that item.

And then the next item we're calling ridge again using the make pipeline function, the StandardScaler function as your first argument and then a comma. And for the second argument, the ridge model from scikit- learn again with the random state one, and then close curly brace. Execute that cell And now you have pipelines for the lasso model and the ridge model.

In the next exercise, you're going to add a couple of new pipelines to this pipelines dictionary. And if you remember back to our dictionary lesson, the way that you do that is by starting with the dictionary name and then in square brackets the key name of the new item you want to create, and then set that equal to whatever the value is for that item, which in this case is the make pipeline function. So for example, and go ahead and copy this in your code because you are going to need this pipeline as well. So follow along with me here. We're going to import from the linear model module of scikit-learn. We're going to import the elastic net model.

Then we're adding a new item to pipelines and the key for that item where we're going to make enet short for elastic net, and the value for that item is the make pipeline function. And then StandardScaler as the first argument, the elastic net model as the second argument. And we're giving that elastic net model a random state of one so that your results match the results in this video. When you execute that cell, now the elastic net pipeline has been added to your pipeline's dictionary. Make sure that you followed along and copied all of the code that you see here because you're going to need it later in the lesson.

Content Requests and Questions

You are trying to access premium learning content.

Discover our full catalogue and purchase a course Access all courses with our premium plans or log in to your account
Help

You need an account to contact support.

Create a free account or log in to an existing one

Sorry, you don't have access to that yet!

You are trying to access premium learning content.

Discover our full catalogue and purchase a course Access all courses with our premium plans or log in to your account

You have reached the limit of annotations (10) under our premium subscription. Upgrade to unlock unlimited annotations.

Find out more about our premium plan

You are trying to access content that requires a free account. Sign up or login in seconds!

Create a free account or log in to an existing one

You are trying to access content that requires a premium plan.

Find out more about our premium plan or log in to your account

Only US listed companies are available under our Free and Boost plans. Upgrade to Pro to access over 7,000 global companies across the US, UK, Canada, France, Italy, Germany, Hong Kong and more.

Find out more about our premium plan or log in to your account

A pro account is required for the Excel Add In

Find out more about our premium plan

Congratulations on completing

This field is hidden when viewing the form
Name(Required)
This field is hidden when viewing the form
Rate this course out of 5, where 5 is excellent and 1 is terrible.
Were the stated learning objectives met?(Required)
Were the stated prerequisite requirements appropriate and sufficient?(Required)
Were the program materials, including the qualified assessment, relevant and did they contribute to the achievement of the learning objectives?(Required)
Was the time allotted to the learning activity appropriate?(Required)
Are you happy for us to use your feedback and details in future marketing?(Required)

Thank you for already submitting feedback for this course.

CPE

What is CPE?

CPE stands for Continuing Professional Education, by completing learning activities you earn CPE credits to retain your professional credentials. CPE is required for Certified Public Accountants (CPAs). Financial Edge Training is registered with the National Association of State Boards of Accountancy (NASBA) as a sponsor of continuing professional education on the National Registry of CPE Sponsors.

What are CPE credits?

For self study programs, 1 CPE credit is awarded for every 50 minutes of elearning content, this includes videos, workouts, tryouts, and exams.

CPE Exams

You must complete the CPE exam within 1 year of accessing a related playlist or course to earn CPE credits. To see how long you have left to complete a CPE exam, hover over the locked CPE credits button.

What if I'm not collecting CPE credits?

CPE exams do not count towards your FE certification. You do not need to complete the CPE exam if you are not collecting CPE credits, but you might find it useful for your own revision.


Further Help
  • Felix How to Guide walks you through the key functions and tools of the learning platform.
  • Playlists & Tryouts: Playlists are a collection of videos that teach you a specific skill and are tested with a tryout at the end. A tryout is a quiz that tests your knowledge and understanding of what you have just learned.
  • Exam: If you are collecting CPE points you must pass the relevant CPE exam within 1 year to receive credits.
  • Glossary: A glossary can be found below each video and provides definitions and explanations for terms and concepts. They are organized alphabetically to make it easy for you to find the term you need.
  • Search function: Use the Felix search function on the homepage to find content related to what you want to learn. Find related video content, lessons, and questions people have asked on the topic.
  • Closed Captions & Transcript: Closed captions and transcripts are available on videos. The video transcript can be found next to the closed captions in the video player. The transcript feature allows you to read the transcript of the video and search for key terms within the transcript.
  • Questions: If you have questions about the course content, you will find a section called Ask a Question underneath each video where you can submit questions to our expert instructor team.