<jupyter_start><jupyter_text>Exploratory Data Analysis<jupyter_code>import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
# load the training data
train = pd.read_csv("..\dataset\train.csv")
test = pd.read_csv("..\dataset\test.csv")
train.head()
# Quick correlation heatmap
cm = sns.light_palette("red", as_cmap=True)
corr_heat = train.corr().style.background_gradient(cmap=cm)
corr_heat
print("The Highest Correlating features with Chance of Admit are :")
train.corr()["Chance of Admit "].sort_values(ascending=False)[1:][:-1]
# Check the cardinality of the features
def check_cardinality(dataframe):
    for c in list(dataframe.columns):
        print("Column Name :", c)
        print(dataframe[c].value_counts().count())
    return check_cardinality

check_cardinality(train)<jupyter_output>Column Name : Serial No.
400
Column Name : GRE Score
49
Column Name : TOEFL Score
28
Column Name : University Rating
5
Column Name : SOP
9
Column Name : LOR 
9
Column Name : CGPA
159
Column Name : Research
2
Column Name : Chance of Admit 
57<jupyter_text>- GRE Score, TOEFL Score have high cardinalities- CGPA has very high cardinalities- Research is binary<jupyter_code>def train_test_dist(train, test, shade_train=False, shade_test=False):
    cols = list(set(train.columns).intersection(set(test.columns)))
    for c in cols:
        sns.kdeplot(train[c], label="Train Set", shade=shade_train)
        sns.kdeplot(test[c], label="Test Set", shade=shade_test)
        plt.title("Train vs Test Distribution for "+c)
        plt.xlabel("Samples")
        plt.ylabel("Probability")
        plt.show()
        
    return None

# call
train_test_dist(train, test, True)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11156542056074767, 'fraction_numerical': 0.010514018691588784, 'mean_word_length': 4.579804560260587, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '124887', 'license': 'MIT', 'n_tokens_mistral': 599, 'n_tokens_neox': 563, 'n_words': 153, 'path': 'notebooks/Exploratory Data Analysis.ipynb', 'repo_name': 'ry05/data-project-framework', 'size': '1712'}