<jupyter_start><jupyter_text>Machine Learning BasicsIn this module, you'll be analysing a dataset. You will be using the Cinema Data for the tasks in this module.  **Pipeline:*** Acquiring the data - done* Handling files and formats - done* Data Analysis* Prediction* Analysing results<jupyter_code>import pandas as pd
import matplotlib
import matplotlib.pyplot as plt
plt.rcParams['figure.figsize'] = [15, 10]<jupyter_output><empty_output><jupyter_text>Task 1 - Plotting* Plot the values of occupancy percentage versus number of weeks since release, for all movies in the dataset. * Plot the number of other releases in the week versus occupancy percentage and weeks until the end of lifetime, for all movies.* Plot the number of shows in the week versus occupancy percentage and weeks until the end of lifetime, for all movies.<jupyter_code>df = pd.read_csv('./Data/CinemaData.csv')


fig,ax=plt.subplots()

dfgrp = df.groupby('Movie')

ax.scatter(y=df['OccPer'],x=df['WeeksSinceRelease'],c='yellow')
ax.set_title('All Movies',fontsize=25)
ax.set_xlabel('Weeks Since Release',fontsize=18)
ax.set_ylabel('OccPer',fontsize=18)
plt.show()

fig2,ax2 = plt.subplots()

ax2.scatter(y=dfgrp.get_group('0001000002')['OccPer'],x=dfgrp.get_group('0001000002')['WeeksSinceRelease'],c='red')
ax2.set_title('Movie: 0001000002',fontsize=25)
ax2.set_ylabel('OccPer',fontsize=18)
ax2.set_xlabel('Weeks Since Release',fontsize=18)
plt.show()
fig3,ax3 = plt.subplots()
ax3.scatter(y=df['OtherReleasesInWeek'],x=df['OccPer'])
ax3.set_ylabel('Other Releases in Week',fontsize=18)
ax3.set_xlabel('Occupancy Percentage',fontsize=18)
fig3,ax4 = plt.subplots()
ax4.scatter(x=df['Lifetime']-df['WeeksSinceRelease'],y=df['OtherReleasesInWeek'])
ax4.set_xlabel('Weeks Untill end of lifetime',fontsize=18)
ax4.set_ylabel('Other Releases on Week',fontsize=18)
plt.show()


fig,ax5 = plt.subplots()
ax5.scatter(x= df['OccPer'],y=df['ShowsInWeek'])
ax5.set_xlabel('Occupancy',fontsize=18)
ax5.set_ylabel('No. of Shows in week',fontsize=18)


fig,ax6 = plt.subplots()
ax6.scatter(x=df['Lifetime']-df['WeeksSinceRelease'],y=df['ShowsInWeek'])
ax6.set_xlabel('Weeks untill end of lifetime',fontsize=18)
ax6.set_ylabel('No. of Shows in Week',fontsize=18)
plt.show()
df.head(10)<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.14467897977132807, 'fraction_numerical': 0.03913808267370272, 'mean_word_length': 7.783783783783784, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, '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': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '64500', 'license': 'MIT', 'n_tokens_mistral': 885, 'n_tokens_neox': 824, 'n_words': 182, 'path': 'Module2.ipynb', 'repo_name': 'MaheshBharadwaj/ML-Basics', 'size': '2274'}