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