Never Forget Another Line of Code

Datasnips is a free code snippet hosting platform for Data Science & AI. It enables your code snippets to be organized, searchable & shareable.

LOGIN
PUBLIC SNIPPETS
LATEST SNIPPETS
TOP SNIPPETS
SNIPPET COLLECTIONS
ML CODE BUILDER
BLOG
POPULAR TAGS
#XGBOOST
#LIGHTGBM
#CATBOOST
#TENSORFLOW
#PANDAS
#MATPLOTLIB
#SEABORN
LOGIN
PUBLIC SNIPPETS
LATEST SNIPPETS
TOP SNIPPETS
SNIPPET COLLECTIONS
ML CODE BUILDER
BLOG

Data Preparation For Machine Learning Collection

Code snippets for preparing data for machine learning

Data Preparation
SCALING

Scale Data Using Standard Scaler in Sklearn

SPLITTING DATA

Tensorflow - Splitting Record Files Into Train & Validation Sets

Sklearn Stratified K-Fold - Splitting Data & Saving to File

Train-Test Splitting with Stratification using Scikit-Learn

SAMPLING

Pandas Undersampling for Imbalanced Binary Classification

FEATURES

Create Dummy Variables with Pandas

Using Sklearn RFE to Select Features