- 博客(10)
- 资源 (9)
- 问答 (2)
- 收藏
- 关注
翻译 python-numpy-bootstrap模拟
for i in range(50): # Generate bootstrap sample: bs_sample bs_sample = np.random.choice(rainfall, size=len(rainfall)) # Compute and plot ECDF from bootstrap sample x, y = ecdf(bs_samp...
2018-03-18 19:10:48 1333
翻译 python-numpy-相关性、回归、画图-np.polyfit(x,y,deg=1)
from scipy import stats# Plot the illiteracy rate versus fertility_ = plt.plot(illiteracy, fertility, marker='.', linestyle='none')# Set the margins and label axesplt.margins(0.02)_ = plt.xla
2018-03-18 18:57:57 6999
翻译 python-numpy-指数分布
# Seed random number generatornp.random.seed(42)# Compute mean no-hitter time: tautau = np.mean(nohitter_times)# Draw out of an exponential distribution with parameter tau: inter_nohitter_timei...
2018-03-18 17:40:46 4338
翻译 python-numpy-指数分布模拟
def successive_poisson(tau1, tau2, size=1): # Draw samples out of first exponential distribution: t1 t1 = np.random.exponential(tau1, size=size) # Draw samples out of second exponential d...
2018-03-17 10:27:52 8369
翻译 python-numpy-正态分布的模拟--pdf图--cdf图---正态分布的拟合
# Draw 100000 samples from Normal distribution with stds of interest: samples_std1, samples_std3, samples_std10samples_std1=np.random.normal(20,1,size=100000)samples_std3=np.random.normal(20,3,size=...
2018-03-17 10:02:48 16940 5
翻译 python-numpy-泊松分布
# Draw 10,000 samples out of Poisson distribution: samples_poissonsamples_poisson=np.random.poisson(10,size=10000)# Print the mean and standard deviationprint('Poisson: ', np.mean(samples_pois
2018-03-17 09:52:53 10238
翻译 python-numpy-伯努利试验模拟-np.random.binomial--自定义bins的直方图
def perform_bernoulli_trials(n, p): """Perform n Bernoulli trials with success probability p and return number of successes.""" # Initialize number of successes: n_success n_success = ...
2018-03-16 20:50:25 4578
转载 python-numpy-方差、相关系数
# Array of differences to mean: differencesdifferences=versicolor_petal_length-np.mean(versicolor_petal_length)# Square the differences: diff_sqdiff_sq=np.square(differences)# Compute the mean
2018-03-16 20:18:32 5293
翻译 python-numpy-计算分位数
# Specify array of percentiles: percentilespercentiles = np.array([2.5, 25, 50, 75, 97.5])# Compute percentiles: ptiles_versptiles_vers = np.percentile(versicolor_petal_length, percentiles)# Pri
2018-03-16 10:56:07 28916
转载 python计算ecdf代的函数
def ecdf(data): """Compute ECDF for a one-dimensional array of measurements.""" # Number of data points: n n = len(data) # x-data for the ECDF: x x = np.sort(data) # y-da
2018-03-13 21:53:47 5654
03、债券策略需要的数据.rar
2020-07-26
python forfinance---code
2017-01-19
珠心神算-最简洁的锻炼数学计算的小程序
2016-10-30
改写c++进行adf检验的函数代码
2024-07-17
使用python编写一个函数,能够根据均值、标准差、偏度和峰度生成n个随机数
2022-10-12
如何把网站和某些关键字进行绑定?
2022-03-18
TA创建的收藏夹 TA关注的收藏夹
TA关注的人