不重复采样
c = range(10)
N = 30
index1 = random.sample(c, N)
index2 = random.sample(c, N)
print(index1)
print(index2)
可重复采样:
import numpy as np
choices = np.random.choice(c, size=30, replace=True)
print(choices)
最后
以上就是优雅雨最近收集整理的关于python 重复采样,不重复采样的全部内容,更多相关python内容请搜索靠谱客的其他文章。
本图文内容来源于网友提供,作为学习参考使用,或来自网络收集整理,版权属于原作者所有。
发表评论 取消回复