Data are.
  • About
  • Code
  • CV

    James LeDoux

    Data scientist and armchair sabermetrician

    • New York, NY
    • Email
    • Twitter
    • LinkedIn
    • GitHub

    Code Snippets

    This is a running list of code snippets that I find helpful in my daily work, implemented in Python and R.

    Machine Learning

    • Splitting Data into Train and Test Sets
    • Tune Hyperparameters Using Random Search
    • Tune Hyperparameters Using Grid Search
    • K-Fold Cross Validation

    Preprocessing

    • Impute Missing Values
    • Drop Duplicate Values
    • Drop Columns
    • Rename Columns in a Pandas DataFrame
    • Standardizing/Scaling Features
    • Convert date strings into datetime format

    Feature Engineering

    • Dummy Variables
    • Get the Number of Days Between Two Dates
    • Extract Month, Year, and Day from Date
    • Group by Columns to Create Aggregate Features

    SQL

    • Simplify Complex Queries with Common Table Expressions (CTEs)
    • Follow:
    • GitHub
    • Feed
    © 2024 James LeDoux. Powered by Jekyll & Minimal Mistakes.

    Support this site by shopping on Amazon using this link.