类 KDDataGenerator
java.lang.Object
weka.gui.boundaryvisualizer.KDDataGenerator
- 所有已实现的接口:
Serializable
,DataGenerator
KDDataGenerator. Class that uses kernels to generate new random
instances based on a supplied set of instances.
- 从以下版本开始:
- 1.0
- 版本:
- $Revision: 7059 $
- 作者:
- Mark Hall
- 另请参阅:
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明void
buildGenerator
(Instances inputInstances) Initialize the generator using the supplied instancesdouble[][]
generateInstances
(int[] indices) Generates a new instance using one kernel estimator.int
Get the kernel bandwidthint
Return the number of kernels (there is one per training instance)double[]
Get weightsvoid
setKernelBandwidth
(int kb) Set the kernel bandwidth (number of nearest neighbours to cover)void
setSeed
(int seed) Initializes a new random number generator using the supplied seed.void
setWeightingDimensions
(boolean[] dims) Set which dimensions to use when computing a weight for the next instance to generatevoid
setWeightingValues
(double[] vals) Set the values for the weighting dimensions to be used when computing the weight for the next instance to be generated
-
构造器详细资料
-
KDDataGenerator
public KDDataGenerator()
-
-
方法详细资料
-
buildGenerator
Initialize the generator using the supplied instances- 指定者:
buildGenerator
在接口中DataGenerator
- 参数:
inputInstances
- the instances to use as the basis of the kernels- 抛出:
Exception
- if an error occurs
-
getWeights
public double[] getWeights()从接口复制的说明:DataGenerator
Get weights- 指定者:
getWeights
在接口中DataGenerator
-
generateInstances
Generates a new instance using one kernel estimator. Each successive call to this method incremets the index of the kernel to use.- 指定者:
generateInstances
在接口中DataGenerator
- 返回:
- the new random instance
- 抛出:
Exception
- if an error occurs
-
setWeightingDimensions
public void setWeightingDimensions(boolean[] dims) Set which dimensions to use when computing a weight for the next instance to generate- 指定者:
setWeightingDimensions
在接口中DataGenerator
- 参数:
dims
- an array of booleans indicating which dimensions to use
-
setWeightingValues
public void setWeightingValues(double[] vals) Set the values for the weighting dimensions to be used when computing the weight for the next instance to be generated- 指定者:
setWeightingValues
在接口中DataGenerator
- 参数:
vals
- an array of doubles containing the values of the weighting dimensions (corresponding to the entries that are set to true throw setWeightingDimensions)
-
getNumGeneratingModels
public int getNumGeneratingModels()Return the number of kernels (there is one per training instance)- 指定者:
getNumGeneratingModels
在接口中DataGenerator
- 返回:
- the number of kernels
-
setKernelBandwidth
public void setKernelBandwidth(int kb) Set the kernel bandwidth (number of nearest neighbours to cover)- 参数:
kb
- anint
value
-
getKernelBandwidth
public int getKernelBandwidth()Get the kernel bandwidth- 返回:
- an
int
value
-
setSeed
public void setSeed(int seed) Initializes a new random number generator using the supplied seed.- 指定者:
setSeed
在接口中DataGenerator
- 参数:
seed
- anint
value
-