<jupyter_start><jupyter_text>General Population<jupyter_code>from imblearn.over_sampling import SMOTE
sm = SMOTE(random_state = 42)
co_train_gpop_sm,out_train_cardio_gpop_sm = sm.fit_resample(co_train_gpop,out_train_cardio_gpop)

best_clf = lasso(co_train_gpop_sm, out_train_cardio_gpop_sm)

cross_val(co_train_gpop_sm, out_train_cardio_gpop_sm)

print()

scores(co_train_gpop, out_train_cardio_gpop, best_clf)

print()

scores(co_validation_gpop, out_validation_cardio_gpop, best_clf)

comb = []<jupyter_output>Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
0.6575134685315666
0.6574492568153737
0.6574633974044177
0.7162889275123352
0.6690847094225706

0.6473107600633128
0.45322245276298334
0.4698179524486719
0.6983040624826088
0.7156447312318922

0.58047467092142
0.2779542747121642
0.2813614054420715
0.6336823515839121
0.8973226475197592<jupyter_text>High Continuity<jupyter_code>from imblearn.over_sampling import SMOTE
sm = SMOTE(random_state = 42)
co_train_high_sm,out_train_cardio_high_sm = sm.fit_resample(co_train_high,out_train_cardio_high)

best_clf = lasso(co_train_high_sm, out_train_cardio_high_sm)

cross_val(co_train_high_sm, out_train_cardio_high_sm)

print()

scores(co_train_high, out_train_cardio_high, best_clf)

print()

scores(co_validation_high, out_validation_cardio_high, best_clf)

#comb = [] 
#for i in range(len(predictor_variable)):
    #comb.append(predictor_variable[i] + str(best_clf.best_estimator_.coef_[:,i:i+1]))
#comb<jupyter_output>Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
0.6820201638497895
0.6818672213626513
0.6819277254937423
0.7424054227134982
0.6986714808670154

0.7043068480076354
0.47219872268621815
0.493175211614097
0.7306726795173979
0.7849268947851495

0.6727918145750679
0.45024238273821143
0.4600323763967786
0.664524322770712
0.9110208548256542<jupyter_text>Low Continuity<jupyter_code>from imblearn.over_sampling import SMOTE
sm = SMOTE(random_state = 42)
co_train_low_sm,out_train_cardio_low_sm = sm.fit_resample(co_train_low,out_train_cardio_low)

best_clf = lasso(co_train_low_sm, out_train_cardio_low_sm)

cross_val(co_train_low_sm, out_train_cardio_low_sm)

print()

scores(co_train_low, out_train_cardio_low, best_clf)

print()

scores(co_validation_low, out_validation_cardio_low, best_clf)

#comb = [] 
#for i in range(len(predictor_variable)):
    #comb.append(predictor_variable[i] + str(best_clf.best_estimator_.coef_[:,i:i+1]))
#comb<jupyter_output>Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
Fitting 5 folds for each of 20 candidates, totalling 100 fits
0.6631832162565358
0.463810617943885
0.4638680405898283
0.721405753769485
0.6630623194427312

0.6578249336870027
0.31368690754211753
0.32958785021284204
0.6963347803486736
0.7084788491452185

0.5883756442069097
0.2833518850814099
0.28802466449841957
0.6023802624267082
0.9594174740678622
{'fraction_non_alphanumeric': 0.062115127175368136, 'fraction_numerical': 0.2358768406961178, 'mean_word_length': 7.529680365296803, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, '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': '3', 'dir': 'jupyter-structured-clean-dedup', 'id': '288327', 'license': 'MIT', 'n_tokens_mistral': 2030, 'n_tokens_neox': 1473, 'n_words': 325, 'path': 'EHR_Only/Lasso/Cardio_ND_SMOTE.ipynb', 'repo_name': 'shreyaskar123/EHR-Discontinuity', 'size': '3735'}