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

Train Test Split

  • Notes
  • Questions
  • Transcript
  • 02:46

How to use the train test split function in Python to divide a dataset into training and testing sets.

Downloads

No associated resources to download.

Glossary

Machine Learning Python Train Test
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

Our next step is to use the train test split function like you see in this cell right here. You'll want to pass the train test split function four arguments in total. First your inputs data frame for the second argument, your target series. For the third argument, the proportion of the data to set aside for testing, which in this case is 20%. And finally, the random state because the function splits observations using random selection, and you want to be able to reproduce the results that you see in this video. The train test split function will return a list starting with your training inputs, and then second your testing inputs. Third, your training target values. And then fourth, your testing target values. Follow along in the code that I have right here. So I'm creating this new object called results, and that's going to be equal to train test split with my inputs data frame, my target series, the test side's argument of 0.2, and then a random state of one. Make sure and get that random state the same so that your results are the same as mine. When I execute that cell trained test split is going to create this new results object. That's going to be a list and we want to check and make sure that that list contains the proper objects that we want. So I want you to copy this as well. And when you execute the cell, make sure that your answers match mine. First, print the object type of results. Your answers should be that it's a list. Then print the length of results. You should see that it contains four objects. Here I have a little spacer just for readability. And then we're gonna create a quick for loop that says, for every item in the list results, print the shape of that item. When I execute that, I can see that the class of results is a list and it contains four objects. The first object contains my training inputs, and you should see that that has 641 rows and 7 features. Second, I have my testing inputs, which contains that 20% that I'm setting aside, and it's 161 rows and 7 features.

Third is my training target values. So these are the available liquidity values that I'm using to train my model, and there should be 641 of those.

And then finally, I have my testing target values, and those are the available liquidity values that I'm going to use to evaluate my model after it's trained. If your answers do not match this, go back and double check your code. If your answers do match this, then let's go ahead and move on.

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.