接口 DataGenerator
- 所有已知实现类:
KDDataGenerator
public interface DataGenerator
Interface to something that can generate new instances based on
a set of input instances
- 从以下版本开始:
- 1.0
- 版本:
- $Revision: 1.4 $
- 作者:
- Mark Hall
-
方法概要
修饰符和类型方法说明void
buildGenerator
(Instances inputInstances) Build the data generatordouble[][]
generateInstances
(int[] indices) Generate an instance.int
Returns the number of generating models used by this DataGeneratordouble[]
Get weightsvoid
setSeed
(int seed) Set a seed for random number generation (if needed).void
setWeightingDimensions
(boolean[] dimensions) Set the dimensions to be used in computing a weight for each instance generatedvoid
setWeightingValues
(double[] vals) Set the values of the dimensions (chosen via setWeightingDimensions) to be used when computing instance weights
-
方法详细资料
-
buildGenerator
Build the data generator- 参数:
inputInstances
- Instances to build the generator from- 抛出:
Exception
- if an error occurs
-
generateInstances
Generate an instance. Should return a new Instance object- 返回:
- an
Instance
value - 抛出:
Exception
- if an error occurs
-
getWeights
Get weights- 抛出:
Exception
-
setWeightingDimensions
void setWeightingDimensions(boolean[] dimensions) Set the dimensions to be used in computing a weight for each instance generated- 参数:
dimensions
- an array of booleans specifying the dimensions to be used when computing instance weights
-
setWeightingValues
void setWeightingValues(double[] vals) Set the values of the dimensions (chosen via setWeightingDimensions) to be used when computing instance weights- 参数:
vals
- adouble[]
value
-
getNumGeneratingModels
int getNumGeneratingModels()Returns the number of generating models used by this DataGenerator- 返回:
- an
int
value
-
setSeed
void setSeed(int seed) Set a seed for random number generation (if needed).- 参数:
seed
- anint
value
-