Discover gists
View load_adult.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import pandas as pd | |
from sklearn.preprocessing import OneHotEncoder, LabelEncoder, StandardScaler | |
dataset = pd.read_csv("../../data/Karan/DataGenerationRaw/adult.csv") | |
dataset.drop(labels = ["education"], axis = 1, inplace = True) | |
dataset.dropna(how = "any", inplace = True) | |
Y_VAR = "income" | |
def preprocess_dataset(raw_dataset: pd.DataFrame): |
View label_encoded_varibles.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
import pandas as pd | |
# Scikit-learn | |
from sklearn.base import ClassifierMixin | |
from sklearn.svm import SVC | |
from sklearn.base import clone | |
from sklearn.ensemble import RandomForestClassifier | |
from sklearn.linear_model import LogisticRegression | |
from sklearn.model_selection import train_test_split |
View public.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
this is public |