Giter Club home page Giter Club logo

ga-ds829-train-test-split-and-bias-variance's Introduction

Train-Test-Split & Bias/Variance

Unit 3: Required


Materials We Provide

Topic Description Link
Lesson Bias and Variance Lesson Here
Practice Train Test Split and Cross Validation Lab (includes solutions) Here
Datasets Average weight of the body and the brain for 62 mammal species Here

In this lesson, we use the Boston housing dataset (imported from scikit-learn) and the average weight of mammal bodies/brains (included). These datasets are appropriate for linear modeling based on their generally intuitive features.


Learning Objectives

After this lesson, students will be able to:

  • Describe what error due to bias is and what error due to variance is
  • Identify the bias-variance tradeoff
  • Describe what overfitting and underfitting means in the context of model building
  • Explain problems associated with over and underfitting
  • Grasp why train, test split is necessary
  • Explore kfolds, LOOCV, and three split methods

Student Requirements

Before this lesson(s), students should already be able to:

  • Read into data using the Pandas library
  • Perform statistical exploration with Pandas
  • Create simple data visualizations with matplotlib
  • Define the basic parameters of sampling and experimental design

Lesson Outline

TOTAL (170 min)

  • Bias and Variance Trade-off (35 min)
    • Bias? Variance? (10 min)
    • Exploring the Bias-Variance Tradeoff (15 min)
    • Brain and body weight mammal dataset (5 min)
    • Making a prediction (5 min)
  • Making a prediction from a sample (15 min)
    • Let's try something completely different
  • Balancing Bias and Variance (10 min)
  • Train-test-split (50 min)
    • Evaluation procedure #1: Train and test on the entire dataset (do not do this)
    • Problems with training and testing on the same data
    • Evaluation procedure #2: Train/test split
    • Comparing test performance with a null baseline
  • K-folds cross-validation (45 min)
    • Leave-one-out-cross-validation
    • Intro to cross validation with the Boston data
  • Three way data split (15 min)
  • Additional Resources

Additional Resources

For more information on this topic, check out the following resources:

ga-ds829-train-test-split-and-bias-variance's People

Contributors

danwilhelm avatar lasisioo avatar samuel-stack avatar hboyan avatar richardjonathonharris avatar rickyhennessy avatar aegorenkov avatar cjc2238 avatar messiest avatar claireoliver avatar

Watchers

James Cloos avatar Aidan Connolly avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.