<jupyter_start><jupyter_text>display(dfc)<jupyter_code>from src.features.recalculate_percentage import replaceAll

#dfc = replaceAll(dfc)
#dfc = dfc.drop(['FGA', 'MIN'], axis=1)
# Enabling any combination of the above did not achieve a higher score
from sklearn.model_selection import train_test_split

X_train, X_test, y_train, y_test = train_test_split(dfc, target, test_size=0.2, random_state=5)
X_train, X_valid, y_train, y_valid = train_test_split(X_train, y_train, test_size=0.2, random_state=10)
from sklearn.preprocessing import StandardScaler
from src.features.minMaxScaling import scale

scaler = StandardScaler()
X_train = scaler.fit_transform(X_train)
X_test = scaler.transform(X_test)
from sklearn.linear_model import LogisticRegression

log_reg = LogisticRegression(max_iter=8_000)

log_reg.fit(X_train, y_train)
from src.models.eval_model import eval_model

model, roc_score_train, roc_score_valid = eval_model(log_reg, X_train, y_train, X_valid, y_valid)
from src.models.save_predictions import save_predictions

test_data = pd.read_csv('../data/raw/test.csv')
test_data = test_data.loc[:, 'GP':'TOV']
test_data = scaler.transform(test_data)

save_predictions('au-ron_week-1_0.70974.csv', log_reg, test_data)

pd.read_csv('../data/predictions/au-ron_week-1_0.70974.csv')<jupyter_output>Predictions saved to ../data/predictions/au-ron_week-1_0.70974.csv
{'fraction_non_alphanumeric': 0.1111111111111111, 'fraction_numerical': 0.02412280701754386, 'mean_word_length': 7.296969696969697, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, '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': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '436354', 'license': 'MIT', 'n_tokens_mistral': 529, 'n_tokens_neox': 514, 'n_words': 94, 'path': 'notebooks/au_ron-week1_logistic_regression.ipynb', 'repo_name': 'ronvoluted/kaggle-nba', 'size': '1368'}