Data sampling bootstrapping extensions
Bootstraping
01 Syntax
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| Sample | 1 | Generate a numeric Vector by RandomExtensions.Permutation()) x times. |
| Samples | 1 | bootstrap是一种非参数估计方法,它用到蒙特卡洛方法。bootstrap算法如下: 假设样本容量为N + 有放回的从样本中随机抽取N次(所以可能x1..xn中有的值会被抽取多次),每次抽取一个元素。并将抽到的元素放到集合S中; + 重复步骤1 B次(例如B = 100), 得到B个集合, 记作S1, S2,…, SB; + 对每个Si(i=1… |
| Sample | 1 | bootstrap sampling of given source collection |
| GetBagSample | 1 | |
| Distributes | 1 | 频数分布表与直方图 返回来的标签数据之中的标签是在某个区间范围内的数值集合的平均值 |
| Hist | 1 | 频数分布表与直方图 这个函数返回来的是频数以及区间内的所有的数的平均值 |
| TabulateBin | 1 | Find top frequency binbox |
03 Members
Int32)Generate a numeric Vector by RandomExtensions.Permutation() x times.
| Name | Type | Description |
|---|---|---|
x% | Int32 | - |
IEnumerable(Of ``0), Int32, Int32, Boolean)bootstrap是一种非参数估计方法,它用到蒙特卡洛方法。bootstrap算法如下: 假设样本容量为N
- 有放回的从样本中随机抽取N次(所以可能x1..xn中有的值会被抽取多次),每次抽取一个元素。并将抽到的元素放到集合S中;
- 重复步骤1 B次(例如
B = 100), 得到B个集合, 记作S1, S2,…, SB; - 对每个
Si(i=1, 2, ..., B),用蒙特卡洛方法估计随机变量的数字特征d,分别记作d1,d2,…,dB; - 用d1,d2,…dB来近似d的分布;
本质上,bootstrap算法是最大似然估计的一种实现,它和最大似然估计相比的优点在于,它不需要用参数来刻画总体分布。
this method can be affected by the RandomExtensions.SetSeed() method.
| Name | Description |
|---|---|
T |
| Name | Type | Description |
|---|---|---|
source | IEnumerable(Of ``0) | 总体样本 |
N | Int32 | 每一个样本的大小,即在每一个袋子中有多少个样本元素 |
bags | Int32 | 采样的次数,这个函数返回多少个袋子集合? |
replace | Boolean | 是否为有放回的进行抽样?默认是有放回的。设置这个参数为False表示不重复的采样,即抽取过后的元素将不会再出现在后面的采样结果之中 |
index of the returns value SeqValue.i is zero based.
IEnumerable(Of ``0), Int32, Boolean)bootstrap sampling of given source collection
| Name | Description |
|---|---|
T |
| Name | Type | Description |
|---|---|---|
source | IEnumerable(Of ``0) | - |
N | Int32 | - |
replace | Boolean | - |
``0(), Int32, List(Of Int32), Boolean)this method can be affected by the RandomExtensions.SetSeed() method.
| Name | Description |
|---|---|
T |
| Name | Type | Description |
|---|---|---|
pool | ``0() | - |
N | Int32 | - |
index | List(Of Int32) | - |
replace | Boolean | if replace, then each bag sample may contains duplicated element else, each of the data element in one bag sample is unique. |
IEnumerable(Of Double), Single)频数分布表与直方图
返回来的标签数据之中的标签是在某个区间范围内的数值集合的平均值
| Name | Type | Description |
|---|---|---|
data | IEnumerable(Of Double) | - |
base | Single | - |
Double(), Single, Nullable(Of Double), Nullable(Of Double))频数分布表与直方图
这个函数返回来的是频数以及区间内的所有的数的平均值
| Name | Type | Description |
|---|---|---|
data | Double() | - |
step! | Single | - |
返回来的数据为区间的下限 -> {频数, 平均值}
IEnumerable(Of Double), Boolean, Int32)Find top frequency binbox
| Name | Type | Description |
|---|---|---|
data | IEnumerable(Of Double) | - |
topBin | Boolean | - |
bags | Int32 | binbox number of the fix width cut bins method |