
image.png
這個方法本身就是抽樣作用,有三個參數(shù)
- withRepalcement: 抽樣是否放回
- fraction: 期望抽樣百分比
- seed: 種子
當(dāng) withReplacement 設(shè)置為 false 時 就是 0 1 分布 這時 fraction 的取值范圍 在[0,1]

image.png

image.png
當(dāng) withReplacement 設(shè)置為 true 時 表示抽樣放回 這時 fraction>=0 抽樣方法為泊松抽樣

image.png

image.png