# ---
# jupyter:
#   jupytext:
#     text_representation:
#       extension: .py
#       format_name: light
#       format_version: '1.5'
#       jupytext_version: 1.14.4
#   kernelspec:
#     display_name: Python 3
#     language: python
#     name: python3
# ---

import pickle
import pandas as pd
import sys
sys.path.insert(0,'..')
from classification import classification as cl

filename = '../data/svm_model.sav'
model = pickle.load(open(filename, 'rb'))

df = pd.read_pickle("../data/Features.pkl")

df.shape

df.describe()

rs = cl.standardize(df)

rs.shape

rs.describe()

cl.evaluate_training(rs)

rs['CLASS_1'].head()



rs['CLASS_1'].head(15)



rs['CLASS_1'] = rs['CLASS_1'].astype('category')
cat_column = rs.select_dtypes(['category']).columns
rs[cat_column] = rs[cat_column].apply(lambda x: x.cat.codes)

rs[cat_column].head(15)

df.head()

new = df['CLASS_1']

new.head()

new_df = df.drop(['CLASS_1'], axis=1)

new_df.head()

new.to_list()

new_df.insert (2, 'NEW_CLASS', new.tolist())

new_df.head()



StarcoderdataJupyterScriptsDedupFiltered