<jupyter_start><jupyter_text>load all data<jupyter_code>df_train = pd.read_csv('datatraining.txt', header=0, index_col=1, parse_dates=True, squeeze=True)
df_test = pd.read_csv('datatest.txt', header=0, index_col=1, parse_dates=True, squeeze=True)
df_test2 = pd.read_csv('datatest2.txt', header=0, index_col=1, parse_dates=True, squeeze=True)<jupyter_output><empty_output><jupyter_text>EDA<jupyter_code>df_train.shape, df_test.shape, df_test2.shape
df_train.head()
df_train.isna().sum()<jupyter_output><empty_output><jupyter_text>Task 1 **Q. Can you write a for loop to automate this?**<jupyter_code># your code here<jupyter_output><empty_output><jupyter_text>Task 2 **Q Write a function to print.**<jupyter_code># your code here<jupyter_output><empty_output><jupyter_text>**Observations**Write your thoughts  Task 3 **Visualize all column contents**Which axis will contain what? Plot one feature. Notice that the index of the dataframe contains the date in datetime format. Use appropriate values.<jupyter_code># your code here<jupyter_output><empty_output><jupyter_text>Can you look through all the columns?Use **enumerate** function.<jupyter_code>colors = ['red', 'green', 'yellow', 'blue', 'black', 'orange', 'brown']

# your code here<jupyter_output><empty_output><jupyter_text>Task 4 Check correlations<jupyter_code># your code here<jupyter_output><empty_output><jupyter_text>**Observations**Note your observations here  Task 5 Get day of the week, month and actual date of the date.<jupyter_code># your code here<jupyter_output><empty_output><jupyter_text>Task 6Check target class balance<jupyter_code># your code here<jupyter_output><empty_output><jupyter_text>Task 7Do you need to balance the data?  ML Model Training  Task 1Select the required features and target<jupyter_code># intialise two lists containing features and target

# your code here<jupyter_output><empty_output><jupyter_text>Task 2 Prepare the train test split<jupyter_code># your code here<jupyter_output><empty_output><jupyter_text>Task 3Decide which classifier to use and apply<jupyter_code># your code here<jupyter_output><empty_output><jupyter_text>Task 4Analyze the feature importances<jupyter_code># your code here<jupyter_output><empty_output><jupyter_text>Task 5Can you put them all in one dataframe and sort?<jupyter_code># your code here<jupyter_output><empty_output><jupyter_text>More Tasks -1. Use GridSearch to improve.2. Apply logistic regression/SVM/KNN and find if they work better or worse3. Use your model on the test data4. Use the top 3 most important features and see how the model works<jupyter_code># your code here<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.09947049924357035, 'fraction_numerical': 0.009833585476550681, 'mean_word_length': 8.514388489208633, 'pattern_counts': {'":': 0, '<': 61, '<?xml version=': 0, '>': 61, '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': '15', 'dir': 'jupyter-structured-clean-dedup', 'id': '331453', 'license': 'MIT', 'n_tokens_mistral': 915, 'n_tokens_neox': 890, 'n_words': 239, 'path': 'Week10/Day1/Time_Series_Tasks_TO_DO_NR.ipynb', 'repo_name': 'royn5618/WAIA_Teaching_Materials', 'size': '2644'}