![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
概率统计
weixin_45405128
stay hungry, stay foolish.
展开
-
Hackerrank Day 9: Multiple Linear Regression
Multiple Regression in Python from sklearn import linear_model x = [[5, 7], [6, 6], [7, 4], [8, 5], [9, 6]] y = [10, 20, 60, 40, 50] lm = linear_model.LinearRegression() lm.fit(x, y) a = lm.interc...原创 2020-02-06 14:02:45 · 177 阅读 · 0 评论 -
Hackerrank Day 8: Least Square Regression Line
n = 5 xy = [list(map(int, input().split())) for _ in range(n)] ''' print(xy) for x,y in xy: print(x,end=', ') print(y) ''' sx, sy, sx2, sxy = map(sum, zip(*[(x, y, x**2, x * y) for x, y in ...转载 2020-01-26 22:42:06 · 322 阅读 · 0 评论 -
Hackerrank Day 7: Spearman's Rank Correlation Coefficient
N=int(input()) X=list(map(float,input().split())) Y=list(map(float,input().split())) rankX=[sorted(X).index(x)+1 for x in X] rankY=[sorted(Y).index(y)+1 for y in Y] vardiff=[(x-y)**2 for (...转载 2020-01-26 21:38:25 · 137 阅读 · 0 评论 -
Hackerrank Day 7: Pearson Correlation Coefficient I
转载 2020-01-26 20:58:05 · 108 阅读 · 0 评论 -
math.erf- error function- 正太分布的CDF
def cdf(std_dev, avg, x): inner = 1 + math.erf((x - avg) / (std_dev * math.sqrt(2))) return 0.5 * inner转载 2020-01-15 18:20:31 · 927 阅读 · 0 评论 -
Hackerrank Day 3: Cards of the Same Suit
原创 2020-01-14 21:24:03 · 72 阅读 · 0 评论