<jupyter_start><jupyter_text>EDA<jupyter_code>%matplotlib inline
import pandas as pd
import seaborn as sns
from palmerpenguins import load_penguins
import matplotlib.pyplot as plt
penguins = load_penguins()
sns.set()
sns.set_style('whitegrid')
plt.figure(figsize = [10,7])
g = sns.boxplot(x = 'island',
            y ='body_mass_g',
            hue = 'species',
            data = penguins,
            palette=['#FF8C00','#159090','#A034F0'],
            linewidth=0.3)
g.set_xlabel('Island')
g.set_ylabel('Body Mass')


g = sns.lmplot(x="flipper_length_mm",
               y="body_mass_g",
               hue="species",
               height=7,
               data=penguins,
               palette=['#FF8C00','#159090','#A034F0'])
g.set_xlabels('Flipper Length')
g.set_ylabels('Body Mass')<jupyter_output><empty_output><jupyter_text>Machine Learning<jupyter_code>from sklearn.model_selection import train_test_split
from sklearn.pipeline import FeatureUnion, make_pipeline
from sklearn.metrics import confusion_matrix
### To deal with missing values
from sklearn.experimental import enable_iterative_imputer
from sklearn.impute import IterativeImputer
from sklearn.tree import DecisionTreeClassifier

X,y = load_penguins(return_X_y = True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=100,
                                            random_state=0)

imp = IterativeImputer(max_iter=10, random_state=0)
clf = make_pipeline(imp, DecisionTreeClassifier())
clf = clf.fit(X_train, y_train)
y_pred = clf.predict(X_test)
confusion_matrix(y_test,y_pred,labels=['Adelie','Chinstrap','Gentoo'])<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1152439024390244, 'fraction_numerical': 0.02378048780487805, 'mean_word_length': 4.144200626959248, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '208179', 'license': 'CC0-1.0', 'n_tokens_mistral': 603, 'n_tokens_neox': 584, 'n_words': 102, 'path': 'notebooks/example.ipynb', 'repo_name': 'mcnakhaee/palmerpenguins', 'size': '1640'}