<jupyter_start><jupyter_text>RQ1 Exploratory Data Analysis (EDA) Since the dataset is very large and to make a good exploring data analysis it is necessary to work with all columns, to answer the question RQ1 we will proceed by loading a sample of the complete dataset. Later on, when we answer the following questions, we will use the whole dataset.<jupyter_code>import random

data = pd.concat([pd.read_csv(name, skiprows = lambda i: i>0 and random.random() > 0.3) for name in names],ignore_index = True)
#Let's first have a look at what kind of data we are dealing with
#data.shape
data.info()
data.head()
#And let's see if we have any duplicated row
index=0
for i in data.duplicated():
    if i==True: print(index, "is duplicated")
    index+=1
    
#this is just to have an idea of how big every column of our dataset is
data.memory_usage( )
#the following command allows us to check wheter there are 
#null values or not (and in case fix those)
data.isnull().sum()
#let's visually see how many null values are there
sns.heatmap(data.isnull(),cbar = False,cmap = 'viridis')
#Replace null values with mean of the column
data["author.playtime_at_review"]=pd.to_numeric(data["author.playtime_at_review"])
data["author.playtime_at_review"].fillna(data["author.playtime_at_review"].mean(), inplace=True)

sns.heatmap(data.isnull(),cbar=False,cmap='viridis')
#Visualize how related are the entries
plt.figure(figsize = (15,15))
sns.heatmap(data.corr(),cbar = True,annot=True,cmap='Greens')
#we notice a high correlation between timestamp updated and created--->
#--->compare timestamp created vs updated
plt.figure(figsize=(10,10))
plt.scatter(x='timestamp_created',y='timestamp_updated',data=data)
plt.xlabel('timestamp_created')
plt.ylabel('timestamp_updated')<jupyter_output><empty_output><jupyter_text>RQ2  Plot the number of reviews for each application in descending order<jupyter_code>#Here we just handle the data in order to plot it in the following cell
col = ["app_name","review","weighted_vote_score"]
data = pd.concat([pd.read_csv(name, usecols = col) for name in names],ignore_index = True)
s = data.dropna(how = 'any',axis = 0) 
s = s["app_name"].value_counts()
percent = 1/100*data.shape[0]
s = s.groupby(np.where(s >= percent,s.index, 'other games' )).sum()
s = s.sort_values(axis = 0, ascending = False, ignore_index = False)
#We opted for grouping all the games with a low number of reviews into a single column
ax = s.plot(kind = 'bar', figsize = (40,20), legend = True, fontsize = 30)
ax.set_xlabel("Game name", fontsize = 40)
ax.set_ylabel("# Reviews", fontsize = 40)
plt.title("# reviews per game", fontsize = 50)
plt.show()<jupyter_output><empty_output><jupyter_text>What applications have the best Weighted Vote Score?<jupyter_code>#It's not clear whether we have to take the games with the highest weighted score or do some sort of operation for every game (like a mean) 
#and then take the ones with the highest values -----> we'll implement both approaches
#Here we just pick the 10 games with the highest absolute score
data[["app_name", "weighted_vote_score"]].nlargest(10, "weighted_vote_score")
#MEAN METHOD 
app_vote_mean = data[["app_name", "weighted_vote_score"]].groupby('app_name').mean()
app_vote_mean.nlargest(10, "weighted_vote_score").round(3)<jupyter_output><empty_output><jupyter_text>Which applications have the most and the least recommendations? How many of these applications were purchased, and how many were given for free?<jupyter_code>#the 2 questions are done together let's first reduce our dataset to the columns needed
col = ["app_name","recommended","steam_purchase", "received_for_free"]
rec = pd.concat([pd.read_csv(name, usecols = col) for name in names],ignore_index = True)
#now let's group the reviews by game name ("app_name")
rec_count = rec.groupby("app_name").aggregate(sum)
rec_count
#Plot the ones with the highest number of recommendations
most_rec = rec_count.nlargest(10, "recommended")
most_rec.plot(kind = 'bar')
#Plot the ones with the lowest number of recommendations
least_rec = rec_count.nsmallest(10, "recommended")
least_rec.plot(kind = 'bar')<jupyter_output><empty_output><jupyter_text>We decided to use bar plots in order to view the data because in this particular case they can summarise all the info we care about and make it readable right away.<jupyter_code>del s
del rec<jupyter_output><empty_output><jupyter_text>RQ3   What is the most common time the authors review an application?<jupyter_code>col = ["timestamp_created"]
data = pd.concat([pd.read_csv(name, usecols = col) for name in names],ignore_index = True)

#convert all timestamp datas in dates and get only time
timestamp = [x for x in data.timestamp_created if not pd.isnull(x)]
t = [dt.fromtimestamp(x).time() for x in timestamp]
#count occurances
most_common_time = Counter(t).most_common(1)[0]

print("\nThe most common time of reviews is:", most_common_time[0],"with", most_common_time[1], "occurances.\n")
def reviewPerIntervals(interval): #plot the number of reviews for each of the intervals in times
    #get hour from our time_datas
    h = [x.hour for x in t]
    #create the intervals of time
    trange = [dt.strptime(x[:][0],"%H:%M:%S").hour for x in intervals]
    #add the las interval of time manually otherwise we miss to count the review between 20-24
    trange.append(24)
    trange = sorted(trange)
    #create the bin to count and plot the occurances in each interval
    count = pd.cut(h, trange)
    #plot the result
    count.value_counts().plot(kind='bar',rot = 0, color = "b" )
    plt.xlabel('Time intervals')
    plt.ylabel('Number of reviews')
#plot the number of reviews in each given interval
intervals = [["06:00:00","10:59:59"],
             ["11:00:00","13:59:59"],
             ["14:00:00","16:59:59"],
             ["17:00:00","19:59:59"],
             ["20:00:00","23:59:59"],
             ["00:00:00","02:59:59"],
             ["03:00:00","05:59:59"]]

reviewPerIntervals(intervals)
del t
del timestamp<jupyter_output><empty_output><jupyter_text>RQ4  What are the top 3 languages used to review applications?<jupyter_code>col =  ["language","votes_helpful","votes_funny"]
data = pd.concat([pd.read_csv(name, usecols = col) for name in names],ignore_index = True)

languages = data.language
#get the 3 most used languages
most_common_len = Counter(languages).most_common(3)

print("\nThe most common languages used to review applications are:\n",
     "-",most_common_len[0][0],"with", most_common_len[0][1], "occurances\n",
     "-",most_common_len[1][0],"with", most_common_len[1][1], "occurances\n",
     "-",most_common_len[2][0],"with", most_common_len[2][1], "occurances\n",)
def languageFilter(data, languages):
    return data[data.language.isin(languages)]<jupyter_output><empty_output><jupyter_text>How many of them were voted as funny?<jupyter_code>top3 = [most_common_len[0][0],most_common_len[1][0],most_common_len[2][0]]

#filtering data in order to get reviews in specific languages
top3df = languageFilter(data, top3)
#get the percentage of funny reviews
perc_f = len(top3df[top3df.votes_funny > 0])/len(top3df)

print("\nThe", round(perc_f*100,2),"% of the reviews were voted as funny.")<jupyter_output>The 11.81 % of the reviews were voted as funny.<jupyter_text>How many of them were voted as helpful?<jupyter_code>#get the percentage of helpful reviews
perc_h = len(top3df[top3df.votes_helpful > 0])/len(top3df)

print("\nThe", round(perc_h*100,2),"% of the reviews were voted as helpful.")
del top3df
del languages<jupyter_output><empty_output><jupyter_text>RQ5  Top 10 most popular rewievers based on the number of reviews made<jupyter_code>pd.set_option('display.float_format', lambda x: "%d" %x)
col = ["author.num_reviews","author.steamid","steam_purchase","received_for_free","recommended","app_name"]
data = pd.concat([pd.read_csv(name, usecols = col) for name in names],ignore_index = True)

top10 = data.sort_values(by = "author.num_reviews", ascending = False)
top10[["author.steamid", "author.num_reviews"]].drop_duplicates(keep = 'first', ignore_index = True)[:10]<jupyter_output><empty_output><jupyter_text>Application reviewed by the most popular author:<jupyter_code>#looking for the most popular author based on the number of reviews done
most_popular = data[data["author.num_reviews"] == data["author.num_reviews"].max()]
#memorizing the steamid of the most popular author
author_id = int(most_popular["author.steamid"])

games = data[data["author.steamid"] == author_id].app_name
print(*list(games.drop_duplicates()), sep = "\n")<jupyter_output>Don't Starve
Rocket League
Papers, Please
Senren*Banka
GRIS
DUSK
Outlast
The Elder Scrolls V: Skyrim
The Room
FTL: Faster Than Light
There Is No Game: Wrong Dimension
Dying Light
American Truck Simulator
Saints Row: The Third
STAR WARS� Empire at War: Gold Pack
Ori and the Will of the Wisps
BeamNG.drive
The Room Two
Age of Empires II (2013)
Ravenfield
Super Hexagon
BioShock Infinite
Just Shapes & Beats
DOOM
Black Mesa
Finding Paradise
Tabletop Simulator
Keep Talking and Nobody Explodes
Duck Game
STEINS;GATE
Danganronpa: Trigger Happy Havoc
Mark of the Ninja
Phoenix Wright: Ace Attorney Trilogy
Batman: Arkham Asylum GOTY Edition
Gunpoint
The Binding of Isaac
Danganronpa 2: Goodbye Despair
HuniePop
Grimm's Hollow
Grand Theft Auto V
PLAYERUNKNOWN'S BATTLEGROUNDS
Monster Hunter: World
The Elder Scrolls Online
Total War: WARHAMMER II
Cities: Skylines
Assassin's Creed Origins
Stellaris
Black Desert Online
Kingdom Come: Deliverance
Jurassic World Evolution
ARK: Survival Evolved
No Man's Sky
S[...]<jupyter_text>Applications purchased and got for free by the most popular author<jupyter_code>purch = data[data["author.steamid"] == author_id]
count_purchase = 0
count_free = 0
total = 0

#iterate the purch DataFrame created to check if the games where purchased or not
for index, row in purch.iterrows():
    if(row["steam_purchase"]):
        count_purchase += 1
    if(row["received_for_free"]):
        count_free += 1
    total += 1

#using the total number of games, i will calculate the percentage for the values
perc_purch = (count_purchase/total)*100
perc_free = (count_free/total)*100

print("The number of games PURCHASED by the most popular author is:\t", str(count_purchase),"[in percentage:", round(perc_purch, 2),"%]"
      "\nInstead, the number of games he RECEIVED FOR FREE is:\t\t", str(count_free), "[in percentage:", round(perc_free, 2),"%]")<jupyter_output>The number of games PURCHASED by the most popular author is:	 4966391 [in percentage: 79.51 %]
Instead, the number of games he RECEIVED FOR FREE is:		 177318 [in percentage: 2.84 %]<jupyter_text>Number of positive and negatives reviews for both games purchased and got for free<jupyter_code>#using the iterator as in the last cell, we will check and count every review and store the results in different variables
p_purch = 0
n_purch = 0
tot_purch = 0

p_free = 0
n_free = 0
tot_free = 0

for index, row in purch.iterrows():
    if(row["steam_purchase"]):
        if(row["recommended"]): p_purch += 1
        else: n_purch += 1
        tot_purch += 1
    if(row["received_for_free"]):
        if(row["recommended"]): p_free += 1
        else: n_free += 1
        tot_free += 1

if tot_purch == 0: tot_purch = 0
perc_purch_p = (p_purch/tot_purch)*100
perc_purch_n = (n_purch/tot_purch)*100

if tot_free == 0: tot_free = 1
perc_free_p = (p_free/tot_free)*100
perc_free_n = (n_free/tot_free)*100

print("PURCHASED:","\n\tThe number of POSITIVE (recommended) games is:\t\t", str(p_purch), "[in percentage:", round(perc_purch_p, 2) ,"%]"
     "\n\tThe number of NEGATIVE (not recommended) games is:\t", str(n_purch), "[in percentage:", round(perc_purch_n, 2) ,"%]")
print("\nRECEIVED FOR FREE:","\n\tThe number of POSITIVE (recommended) games is:\t\t", str(p_free), "[in percentage:", round(perc_free_p, 2) ,"%]",
     "\n\tThe number of NEGATIVE (not recommended) games is:\t", str(n_free), "[in percentage:", round(perc_free_n, 2) ,"%]")<jupyter_output>PURCHASED: 
	The number of POSITIVE (recommended) games is:		 3906290 [in percentage: 78.65 %]
	The number of NEGATIVE (not recommended) games is:	 1060101 [in percentage: 21.35 %]

RECEIVED FOR FREE: 
	The number of POSITIVE (recommended) games is:		 139592 [in percentage: 78.72 %] 
	The number of NEGATIVE (not recommended) games is:	 37726 [in percentage: 21.28 %]<jupyter_text>RQ6  Average time a user lets pass before updating a review<jupyter_code>import time

col = ["timestamp_created","timestamp_updated","author.steamid"]
data = pd.concat([pd.read_csv(name, usecols = col) for name in names],ignore_index = True)

created_timestamp = [x for x in data.timestamp_created if not pd.isnull(x)]
updated_timestamp = [x for x in data.timestamp_updated if not pd.isnull(x)]
comb = zip(created_timestamp, updated_timestamp)
diff = []

for c, u in comb:
    if (c != u):
        diff.append(u-c)
mean = 0
for i in diff:
    mean += i
mean = mean//len(diff)
day = mean // (24 * 3600)
mean = mean % (24 * 3600)
hour = mean // 3600
mean %= 3600
minute = mean // 60
minute += hour*60

print("\nThe average time a user lets pass before updating a review is:", day, "days and", minute, "minutes")<jupyter_output>The average time a user lets pass before updating a review is: 183.0 days and 1392.0 minutes<jupyter_text>Top 3 authors that usually update their reviews<jupyter_code>up = data[data["timestamp_created"] != data["timestamp_updated"]]
#The authors with most updated reviews, and the number of times they updated a review
out = up["author.steamid"].value_counts().nlargest(n = 3, keep = 'first')
out
#plot the result
out.plot.barh(color = "pink")
plt.ylabel("author.steamid")
plt.xlabel("# of updated reviews")
plt.yticks(np.arange(3), list(map(int,out.index)) )
plt.show()
del out
del up
del comb
del created_timestamp
del updated_timestamp<jupyter_output><empty_output><jupyter_text>RQ7  What’s the probability that a review has a Weighted Vote Score equal to or bigger than 0.5?To calculate the probability that a review has a weighted vote score greater than or equal to 0.5, we will use the classic definition of probability, favorable cases over possible cases.<jupyter_code>pd.set_option('display.float_format', lambda x: repr(x))
col = ["weighted_vote_score","votes_funny"]
data = pd.concat([pd.read_csv(name, usecols = col) for name in names],ignore_index = True)

prob = len(data[data.weighted_vote_score >= 0.5]) / len(data.weighted_vote_score)
print("\nThe probability is equal to:", round(prob,3))<jupyter_output>The probability is equal to: 0.218<jupyter_text>What’s the probability that a review has at least one vote as funny given that the Weighted Vote Score is bigger than 0.5?To calculate the probability that a review has at least one vote as funny given that the Weighted Vote Score is bigger than 0.5, we will use the definition of Conditional probability:$$\mathbb{P}(A|B)=\frac{\mathbb{P}(A\cap B)}{\mathbb{P}(B)}$$$A$ = "the review has at least one vote as funny" $B$ = "the Weighted Vote Score is bigger than 0.5"<jupyter_code>pB = len(data[data.weighted_vote_score > 0.5]) / len(data.weighted_vote_score)
B = data[data.weighted_vote_score > 0.5]
pAB = len(B[B.votes_funny > 0]) / len(data)

print("\nThe probability is equal to:", round(pAB/pB,3))<jupyter_output>The probability is equal to: 0.191<jupyter_text>Is the probability that “a review has at least one vote as funny” independent of the “probability that a review has a Weighted Vote Score equal or bigger than 0.5”?To say if the two probabilities are independent we will use the definition:$$\mathbb{P}(A\cap B)=\mathbb{P}(A)\mathbb{P}(B)$$So if this definition is true we can say that the event “a review has at least one vote as funny” and the event “a review has a Weighted Vote Score equal or bigger than 0.5” are indipendent, otherwise they are dipendent.<jupyter_code>pA = len(data[data.votes_funny > 0]) / len(data.weighted_vote_score)

if pA*pB == pAB:
    print("\nThe events are indipendent!")
else:
    print("\nThe events are dipendent!")
del B<jupyter_output><empty_output><jupyter_text>RQ8  Is there a significant difference in the Weighted Vote Score of reviews made in Chinese vs the ones made in Russian?<jupyter_code>col = ["weighted_vote_score","language","timestamp_created","timestamp_updated"]
data = pd.concat([pd.read_csv(name, usecols = col) for name in names],ignore_index = True)

#filtering the dataset
Russia = data[data['language']=='russian'].weighted_vote_score
China = data[data['language']=='schinese'].weighted_vote_score

#let's have a first look at mean and variance
print("\nThe Russian mean is :",round(np.mean(Russia),3))
print("The Chinese mean is :",round(np.mean(China),3))
print("\nThe Russian variance is :",round(np.var(Russia),3))
print("The Chinese variance is :",round(np.var(China),3))<jupyter_output>The Russian mean is : 0.212
The Chinese mean is : 0.141

The Russian variance is : 0.066
The Chinese variance is : 0.056<jupyter_text>Now that we’ve taken a first look at the mean and the variance of the two populations, we can run a t-test to determine if the two sets are significantly different from each other.<jupyter_code>#t-test
ttest = stats.ttest_ind(Russia, China, equal_var=False)
print("\nThe p-valuee of the t-test is:",ttest.pvalue)<jupyter_output>The p-valuee of the t-test is: 0.0<jupyter_text>As you might expect the p-value of the t-test is very low so the difference in the group is remarkable so the two populations are different.<jupyter_code>#a look of the distribution of the votes for each istance
plt.figure(figsize = (15,8))
plt.hist(China, bins = 100, alpha = 1, label = "Chinese")
plt.hist(Russia, bins = 100, alpha = 0.8, label = "Russian")

plt.xlabel("Data", size = 20)
plt.ylabel("Count", size = 20)
plt.title("Comparing Weighted Vote Score", size=30)
plt.legend(loc='upper right',fontsize = 20)
plt.show()
del China
del Russia<jupyter_output><empty_output><jupyter_text>Can you find any significant relationship between the time that a user lets pass before he updates the review and the Weighted Vote Score? Use an appropriate statistical test or technique and support your choice.<jupyter_code>#as before, reduce our dataset with just the entries we need
col = ["timestamp_created","timestamp_updated","weighted_vote_score","recommended"]
tab = pd.concat([pd.read_csv(name, usecols = col) for name in names],ignore_index = True)
#we observe that there are many rows with weight 0, we want to remove those
tab = tab[tab.weighted_vote_score != 0]
tab<jupyter_output><empty_output><jupyter_text>Now it's time to convert the 2 timestamp columns into a readable way and do$\text{timestamp_updated} - \text{timestamp_created}$ (it's the variable we care about!)<jupyter_code>tab = tab.assign(timestamp_diff = (tab.timestamp_updated-tab.timestamp_created)*1/(60*60*24)) #convert to days unit of meaasure
tab = tab.drop(columns = ['timestamp_updated', 'timestamp_created'])
tab #We made it!
#it's time to plot and see what we have here before we start working on this data
plt.figure(figsize = (10,10))
plt.scatter(x = 'weighted_vote_score',y = 'timestamp_diff',data = tab)
plt.xlabel('WVS')
plt.ylabel('time diff [days]')<jupyter_output><empty_output><jupyter_text>Looking at the structure of our data we can already suppose that there is no linear relation between the weighted vote score and the time that a user lets pass before he updates the review, but let's check that<jupyter_code>x = tab["weighted_vote_score"]
y = tab["timestamp_diff"]

#Pearson test
correlation = stats.pearsonr(x,y)
print("Pearson's correlation coefficent is:", round(correlation[0],4))<jupyter_output>Pearson's correlation coefficent is: 0.0148<jupyter_text>Since the coefficent obtained is very low, we can assert that there is no linear correlation between the time that a user lets pass before he updates the review and the weighted vote score.But there might be a higher degree correlation, we can check that by running some fits on our data<jupyter_code>#In this cell we define all the functions we need to run fits on our data
from scipy.stats import t

def tt(x,n):
    return t.pdf(x,n)
def gaus(x, a, x0, sigma):
    return a*np.exp(-(x-x0)**2/(2*sigma**2))
def poli(x,a,b,c):
    return a+b*x+c*x*x
def line(x,a,b):
    return a+b*x
#Here we compute the parameters for the fit
param_t, param_cov_t = curve_fit(tt, x, y) #Student T
param_g, param_cov_g = curve_fit(gaus,x,y) #Gaussian
param_p, param_cov_p = curve_fit(poli,x,y) #Poly of order 2
# ans stores the new y-data according to
# the coefficients given by curve-fit() function
import matplotlib as mpl
mpl.rcParams['agg.path.chunksize'] = 10000

plt.figure(figsize = (10,10))

ans_t = t.pdf(x,param_t[0])
plt.plot(x, ans_t, '--', color ='red', label ="Student T")

ans_g = param_g[0]*exp(-(x-param_g[1])**2/(2*param_g[2]**2))
plt.plot(x, ans_g, '--', color ='green', label ="Gaussian")

ans_p = param_p[0]+param_p[1]*x+param_p[2]*x**2
plt.plot(x, ans_p, '--', color = 'orange', label ="Poli of order 2")

plt.scatter(x = 'weighted_vote_score',y = 'timestamp_diff',data=tab)

plt.legend()
plt.show()<jupyter_output><empty_output><jupyter_text>Regardless of the function we use for our fit we are always obtaining very similar results, hence the variables we are taking into consideration are probably not correlated at all.  Is there any change in the relationship of the variables mentioned in the previous literal if you include whether an application is recommended or not in the review? Use an appropriate statistical test or technique and support your choice.<jupyter_code>#let's first split the data in 2 dataframes: one with true values for the recommendation
#and one with false values
tabT = tab[tab.recommended != False]
tabF = tab[tab.recommended == False]

del tab
#now let's plot the 2 (sub)dataset we have
plt.figure(figsize=(10,10))
 
ax1=plt.scatter(x = 'weighted_vote_score', y = 'timestamp_diff', data=tabT, color = "red")

ax2=plt.scatter(x = 'weighted_vote_score', y = 'timestamp_diff', data=tabF, color = "blue")

plt.legend([ax1,ax2],["Recommended","Not Recommended"])
plt.show()<jupyter_output><empty_output><jupyter_text>At first sight they still look like before but let's run some test on them before giving a judgement<jupyter_code>#as usual, reassigning columns to make the code more readable
xT, yT = tabT['weighted_vote_score'],tabT['timestamp_diff']
xF, yF = tabF['weighted_vote_score'],tabF['timestamp_diff']

#Pearson test
corrT = stats.pearsonr(tabT['weighted_vote_score'],tabT['timestamp_diff'])
corrF = stats.pearsonr(tabF['weighted_vote_score'],tabF['timestamp_diff'])

print("Pearson's correlation coefficent for the Recommended set of data is:",round(corrT[0],4))
print("Pearson's correlation coefficent for the not Recommended set of data is:",round(corrF[0],4))<jupyter_output>Pearson's correlation coefficent for the Recommended set of data is: 0.0039
Pearson's correlation coefficent for the not Recommended set of data is: 0.0405<jupyter_text>For both cases we still get no linear correlation between the time a user waits to update the review and the weighted vote score. \Let's try with fitting method as well:<jupyter_code>#Run fits to see if we have a higher 
param_tT, param_cov_tT = curve_fit(tt, xT, yT)
param_gT, param_cov_gT = curve_fit(gaus,xT,yT)
param_pT, param_cov_pT = curve_fit(poli,xT,yT)

param_tF, param_cov_tF = curve_fit(tt, xF, yF)
param_gF, param_cov_gF = curve_fit(gaus,xF,yF)
param_pF, param_cov_pF = curve_fit(poli,xF,yF)
#plot everything
plt.figure(figsize=(10,10))

ans_tT = t.pdf(xT,param_tT[0])
plt.plot(xT, ans_tT, '--', color = 'black', label = "Student T")

ans_gT = param_gT[0]*exp(-(xT-param_gT[1])**2/(2*param_gT[2]**2))
plt.plot(xT, ans_gT, '--', color ='green', label ="Gaussian")

ans_pT = param_pT[0]+param_pT[1]*xT+param_pT[2]*xT**2
plt.plot(xT, ans_pT, '--', color ='blue', label = "Poli of order 2")


plt.scatter(x = 'weighted_vote_score',y = 'timestamp_diff',data = tabT, color = "red")

plt.legend()
plt.show()
import matplotlib as mpl
mpl.rcParams['agg.path.chunksize'] = 10000

plt.figure(figsize = (10,10))

ans_tF = t.pdf(xF,param_tF[0])
plt.plot(xF, ans_tF, '--', color ='red', label ="Student T")

ans_gF = param_gF[0]*exp(-(xF-param_gF[1])**2/(2*param_gF[2]**2))
plt.plot(xF, ans_gF, '--', color ='green', label ="Gaussian")

ans_pF = param_pF[0]+param_pF[1]*xF+param_pF[2]*xF**2
plt.plot(xF, ans_pF, '--', color ='orange', label = "Poli of order 2")

plt.scatter(x = 'weighted_vote_score',y = 'timestamp_diff',data = tabF)

plt.legend()
plt.show()<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12071559260012198, 'fraction_numerical': 0.021711730026428136, 'mean_word_length': 5.617164379876244, 'pattern_counts': {'":': 0, '<': 102, '<?xml version=': 0, '>': 115, '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': '28', 'dir': 'jupyter-structured-clean-dedup', 'id': '219200', 'license': 'MIT', 'n_tokens_mistral': 8780, 'n_tokens_neox': 8183, 'n_words': 2661, 'path': 'main.ipynb', 'repo_name': 'Mantuano-A/ADM-HW2', 'size': '24595'}