<jupyter_start><jupyter_text>TRAIN TEST SPLITTING<jupyter_code>import numpy as np
def data_split(data,ratio):
    np.random.seed(63)
    shuffled = np.random.permutation(len(data))
    test_set_size = int(len(data) * ratio)
    test_data = shuffled[:test_set_size]
    train_data = shuffled[test_set_size:]
    return data.iloc[train_data],data.iloc[test_data]
train , test = data_split(data,.2)
train
test
X_train = train[['fever','cough','bodyPain','diarrhea','pneumonia','soreThroat','runnyNose','malaise','sputum','Breatlessness','fatigue']].to_numpy()
X_test = test[['fever','cough','bodyPain','diarrhea','pneumonia','soreThroat','runnyNose','malaise','sputum','Breatlessness','fatigue']].to_numpy()
Y_train = train[['probabity']].to_numpy().reshape(2843 ,)
Y_test = test[['probabity']].to_numpy().reshape(710 ,)
Y_train
from sklearn.linear_model import LogisticRegression
clf = LogisticRegression()
clf.fit(X_train,Y_train)
inputFeatures = [0,0,0,0,0,0,0,0,0,-1,0]
probInfo = clf.predict_proba([inputFeatures])[0][1]
probInfo<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.18096135721017909, 'fraction_numerical': 0.021677662582469368, 'mean_word_length': 9.310679611650485, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '553408', 'license': 'BSD-3-Clause', 'n_tokens_mistral': 434, 'n_tokens_neox': 417, 'n_words': 46, 'path': 'covid.ipynb', 'repo_name': 'prabhatmalhan/COVID-19', 'size': '1061'}