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

Investor Classifiers in Python - Part 2

Use stratified random sampling to select proportionate samples from categorical data. Understand the confusion matrix. Build and finalize a machine learning classifier from start to finish.

Unlock Your Certificate   
 
0% Complete

24 Lessons (25m)

Show lesson playlist
  • Description & Objectives

  • 1. Investor Classifiers Part 2 Learning Objectives

    00:25
  • 2. Import Packages and Data

    00:38
  • 3. .drop Workout

    00:48
  • 4. Dummy Variables

    00:54
  • 5. Dummy Variables Workout

    00:36
  • 6. Remove Redundant Target

    00:45
  • 7. Splitting Data

    02:50
  • 8. Splitting Data Workout

    00:51
  • 9. Model Pipelines

    00:38
  • 10. Model Pipelines Workout

    01:39
  • 11. Validating Pipelines

    00:17
  • 12. Hyperparameter Tuning

    01:13
  • 13. Hyperparameters Workout

    00:32
  • 14. Validating Hyperparameter Grids

    00:13
  • 15. Cross Validation

    00:57
  • 16. Cross-Validation Workout

    01:13
  • 17. Fitting Untrained Models

    00:28
  • 18. Fitting Untrained Models Workout

    01:13
  • 19. AUROC

    01:27
  • 20. Confusion Matrix

    02:52
  • What the area under the ROC curve (AUROC) is, and its importance in evaluating the performance of a model.

    " data-html="true" >

    21. Perfect AUROC

    01:32
  • 22. Calculating AUROC

    00:10
  • 23. Calculating AUROC Workout

    01:33
  • 24. Investor Classifiers Part 2 Review

    00:19

Prev: Investor Classifiers in Python - Part 1

Confusion Matrix

  • Notes
  • Questions
  • Transcript
  • 02:52

Understand binary classification in predictive modeling, including true positives, true negatives, false positives, and false negatives.

Downloads

No associated resources to download.

Glossary

and false negatives binary classification false positives Matrix true negatives true positives
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

In binary classification such as your investor classifier, where you're trying to distinguish between two classes, there are four possible results of any prediction. You can correctly predict a positive, which in our case would be predicting a decline. That's called a true positive. Or you can correctly predict a negative, which in our case would be correctly predicting a commit that's called a true negative. Or there are two possible results that are mistakes. You could incorrectly predict a decline when the investor actually is going to commit. That's called a false positive. Or you can incorrectly predict a commit when the investor is actually going to decline. That's called a false negative. For a perfect model, every decline prediction would be a true positive, and every commit prediction would be a true negative. Anything else is an error. Let's take a look at the confusion matrix for one of our classifier models. Follow along with the code that you see here. We're importing the confusion matrix function, and we're making predictions with our L one logistic regression classifier model. Then we're printing the confusion matrix, comparing our predictions to the actual test results, and below that you see the output, which is our confusion matrix.

What that means is out of 1,146, actual commits, which is our negative class in the test set, the model correctly identified 1,124. Those are true negatives. Then out of 301 actual declines, which is our positive class in the test set, the model correctly identified 278. Those are our true positives.

The true positive rate is the number of true positive predictions divided by all actual positive observations.

And then the false positive rate is the number of false positive predictions divided by all actual negative observations.

There's an important relationship between the true positive rate, the false positive rate, and the probability threshold of your model. As you know, classification models can create curved predictions that give the probability that an observation is positive or negative.

To make a prediction, your model compares the probability of a positive observation with a probability threshold. The default threshold for the predict function is 0.5, meaning that the model will make a positive prediction if the probability is greater than 50%. As you lower the threshold, your model will make a greater number of positive predictions increasing both the true positive rate and the false positive rate. Your model will get more actual positives, right, and it will also get more actual negatives wrong.

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.