Skip to content

Commit 5eafb22

Browse files
committed
Logistic Distribution
1 parent e2d20db commit 5eafb22

File tree

2 files changed

+53
-0
lines changed

2 files changed

+53
-0
lines changed

16.logistic_distribution.py

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Logistic Distribution
2+
3+
'''
4+
IMP Points
5+
6+
1. ye growth ko show karne ke liye use hota hai.
7+
2. ye bahot jaruri hai because aage chal ke ye ml aur neural networking me use hoga.
8+
3. ye continuous probability distribution hai
9+
4. isme 2 parameters hote hain pdf (probability density function) and cdf (cumulative density function)
10+
11+
Logistic distribution arg:
12+
loc: mean , deafult me ye 0 (zero)
13+
scale: standard deviation, default value is 1
14+
size: matrix
15+
'''
16+
17+
from numpy import random as r
18+
import seaborn as sns
19+
import matplotlib.pyplot as plt
20+
21+
logistcVar = r.logistic(loc=1, scale=2, size=(2,3))
22+
print('\n\n',logistcVar,'\n')
23+
24+
# use seaborn to get plto point
25+
# sns.distplot(r.logistic(loc=1, scale=1, size=(100)), hist=False)
26+
# use plt.show() to show graph
27+
sns.distplot(r.normal(loc=1, scale=2, size=(100)), hist=False, label='noraml')
28+
sns.distplot(r.logistic(loc=1, scale=1, size=(100)), hist=False, label='logstic')
29+
plt.show()
30+
31+
32+
'''
33+
Diff b/w Logistc and Normal Distribution
34+
35+
1. logict jo hai ye normal ke comapristion me thoda log distance tak result deta hai.
36+
2. logistic and noraml both center pont result will be like same.
37+
'''

17.multinominal_distribution.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Multinomial Distribution
2+
3+
'''
4+
IMP Points:
5+
6+
1. ye binomial ka bhai hai wo kewal 2 hi condtion ke bich me probability find karta tha, jaise 0 ya 1 or head or tels.
7+
2. But Multinomial naam se hi pata chal raha hai ki 2 se jada case ke liye to jaise head aur tell to hoga but tie hone ke bhi chances hai tab kya hoga?
8+
'''
9+
10+
from numpy import random as r
11+
import seaborn as sns
12+
import matplotlib.pyplot as plt
13+
14+
sns.distplot(r.multinomial(n=6, pvals=[1/6, 1/6, 1/6, 1/6, 1/6, 1/6]))
15+
print(r.multinomial(n=6, pvals=[1/6, 1/6, 1/6, 1/6, 1/6, 1/6]))
16+
plt.show()

0 commit comments

Comments
 (0)