Skip to content

Instantly share code, notes, and snippets.


Shayan Amani SHi-ON

View GitHub Profile
SHi-ON /
Created Mar 10, 2019
An expirement to show how stratify option works
# Experiment to confirm the effect of stratify option in Scikit Learn, tran_test_split() method.
# by Shayan Amani
from sklearn.model_selection import train_test_split
import pandas as pd
raw_data = pd.read_csv("codebase/adrel/dataset/train.csv")
cnt = raw_data.groupby('label').count()
''' experiment begins '''
You can’t perform that action at this time.