text_plain_output_3.png text_plain_output_2.png text_plain_output_1.png image_output_3.png image_output_2.png image_output_1.png
import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import seaborn as sns

train_df = pd.read_csv('../input/train.csv')
test_df = pd.read_csv('../input/test.csv')
sample_sub_df = pd.read_csv('../input/train.csv')

train_df[train_df.id_code == '5d024177e214']

classes_dist = pd.DataFrame(train_df['diagnosis'].value_counts()/train_df.shape[0]).reset_index()

# barplot 
ax = sns.barplot(x="index", y="diagnosis", data=classes_dist)

# Imbalanced dataset with 49% - no DR, 8% proliferative - i.e most severe DR
# Model Building - Need to do oversampling for minority classes

train_df.columns
train_df['image_path'] = '../input/train_images/' + train_df['id_code']
train_df.head(3)