<jupyter_start><jupyter_text><jupyter_code>!pip install pycaret[full]
!pip install shap
!pip install pyyaml==5.4.1
"""
    Import library
"""
##-- PyCaret
import pycaret
from pycaret.classification import *
##-- Pandas
import pandas as pd
from pandas import Series, DataFrame
##-- Scikit-learn
import sklearn
import pandas as pd
from string import ascii_letters
import numpy as np
import seaborn as sns
import matplotlib.pyplot as plt
url = 'https://raw.githubusercontent.com/kdemertzis/Earthquakes/main/1_3class.csv'
# load the dataset
df = pd.read_csv(url)
df
sns.set_theme(style="white")

# Compute the correlation matrix
corr = df.corr()

# Generate a mask for the upper triangle
mask = np.triu(np.ones_like(corr, dtype=bool))

# Set up the matplotlib figure
f, ax = plt.subplots(figsize=(11, 9))

# Generate a custom diverging colormap
cmap = sns.diverging_palette(230, 20, as_cmap=True)

# Draw the heatmap with the mask and correct aspect ratio
sns.heatmap(corr, mask=mask, cmap=cmap, vmax=.3, center=0,
            square=True, linewidths=.5, cbar_kws={"shrink": .5})

# setup the dataset
grid = setup(data=df, target=df.columns[-1], html=False, silent=True, verbose=False)
best = compare_models(cross_validation=True, n_select = 1, turbo=False) 
evaluate_model(best)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11647509578544062, 'fraction_numerical': 0.014559386973180077, 'mean_word_length': 5.3707317073170735, 'pattern_counts': {'":': 1, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 1, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '246851', 'license': 'MIT', 'n_tokens_mistral': 489, 'n_tokens_neox': 459, 'n_words': 127, 'path': 'Code_Conf/Class_new.ipynb', 'repo_name': 'kdemertzis/Earthquakes', 'size': '1305'}