public class ReliefF extends RemoveAttributeTransform
catIndexMap, numIndexMap
Modifier | Constructor and Description |
---|---|
|
ReliefF(ClassificationDataSet cds,
int featureCount,
int m,
int n,
DistanceMetric dm)
Creates a new ReliefF object to measure the importance of the variables with
respect to a classification task.
|
|
ReliefF(ClassificationDataSet cds,
int featureCount,
int m,
int n,
DistanceMetric dm,
ExecutorService threadPool)
Creates a new ReliefF object to measure the importance of the variables with
respect to a classification task.
|
|
ReliefF(ClassificationDataSet cds,
int featureCount,
int m,
int n,
DistanceMetric dm,
VectorCollectionFactory<Vec> vcf)
Creates a new ReliefF object to measure the importance of the variables with
respect to a classification task.
|
|
ReliefF(ClassificationDataSet cds,
int featureCount,
int m,
int n,
DistanceMetric dm,
VectorCollectionFactory<Vec> vcf,
ExecutorService threadPool)
Creates a new ReliefF object to measure the importance of the variables with
respect to a classification task.
|
|
ReliefF(int featureCount)
Creates a new ReliefF object to measure the importance of the variables
with respect to a classification task.
|
|
ReliefF(int featureCount,
int m,
int n,
DistanceMetric dm)
Creates a new ReliefF object to measure the importance of the variables with
respect to a classification task.
|
|
ReliefF(int featureCount,
int m,
int n,
DistanceMetric dm,
VectorCollectionFactory<Vec> vcf)
Creates a new ReliefF object to measure the importance of the variables
with respect to a classification task.
|
protected |
ReliefF(ReliefF toCopy)
copy constructor
|
Modifier and Type | Method and Description |
---|---|
ReliefF |
clone() |
void |
fit(DataSet data)
Fits this transform to the given dataset.
|
void |
fit(DataSet data,
ExecutorService threadPool) |
DistanceMetric |
getDistanceMetric()
Returns the distance metric to use
|
int |
getFeatureCount()
Returns the number of features to sue
|
int |
getIterations()
Returns the number of iterations to use
|
int |
getNeighbors()
Returns the number of neighbors that will be used at each step of the
algorithm.
|
Vec |
getWeights()
Returns accesses to the learned weight data.
|
void |
setDistanceMetric(DistanceMetric dm)
Sets the distance metric to infer the feature importance with
|
void |
setFeatureCount(int featureCount)
Sets the number of features to select for use from the set of all input
features
|
void |
setIterations(int iterations)
Sets the number of iterations of the ReliefF algorithm that will be run
|
void |
setNeighbors(int neighbors)
Sets the number of neighbors to use to infer feature importance from
|
consolidate, getKeptNominal, getKeptNumeric, getReverseNominalMap, getReverseNumericMap, setUp, transform
public ReliefF(int featureCount)
featureCount
- the number of features to keeppublic ReliefF(int featureCount, int m, int n, DistanceMetric dm)
featureCount
- the number of features to keepm
- the number of learning iterations to performn
- the number of neighbors to measure importance fromdm
- the distance metric to usepublic ReliefF(ClassificationDataSet cds, int featureCount, int m, int n, DistanceMetric dm)
cds
- the data set to measure numeric variable importance fromfeatureCount
- the number of features to keepm
- the number of learning iterations to performn
- the number of neighbors to measure importance fromdm
- the distance metric to usepublic ReliefF(ClassificationDataSet cds, int featureCount, int m, int n, DistanceMetric dm, ExecutorService threadPool)
cds
- the data set to measure numeric variable importance fromfeatureCount
- the number of features to keepm
- the number of learning iterations to performn
- the number of neighbors to measure importance fromdm
- the distance metric to usethreadPool
- the source of threads to use for the computationpublic ReliefF(ClassificationDataSet cds, int featureCount, int m, int n, DistanceMetric dm, VectorCollectionFactory<Vec> vcf)
cds
- the data set to measure numeric variable importance fromfeatureCount
- the number of features to keepm
- the number of learning iterations to performn
- the number of neighbors to measure importance fromdm
- the distance metric to usevcf
- the factor to create accelerating structures for nearest neighborprotected ReliefF(ReliefF toCopy)
toCopy
- the object to copypublic ReliefF(int featureCount, int m, int n, DistanceMetric dm, VectorCollectionFactory<Vec> vcf)
featureCount
- the number of features to keepm
- the number of learning iterations to performn
- the number of neighbors to measure importance fromdm
- the distance metric to usevcf
- the factor to create accelerating structures for nearest neighborthreadPool
- the source of threads to use for the computationpublic ReliefF(ClassificationDataSet cds, int featureCount, int m, int n, DistanceMetric dm, VectorCollectionFactory<Vec> vcf, ExecutorService threadPool)
cds
- the data set to measure numeric variable importance fromfeatureCount
- the number of features to keepm
- the number of learning iterations to performn
- the number of neighbors to measure importance fromdm
- the distance metric to usevcf
- the factor to create accelerating structures for nearest neighborthreadPool
- the source of threads to use for the computationpublic void fit(DataSet data)
DataTransform
FailedToFitException
exception may be
thrown.fit
in interface DataTransform
fit
in class RemoveAttributeTransform
data
- the dataset to fir this transform topublic void fit(DataSet data, ExecutorService threadPool)
public Vec getWeights()
public ReliefF clone()
clone
in interface DataTransform
clone
in class RemoveAttributeTransform
public void setFeatureCount(int featureCount)
featureCount
- the number of features to usepublic int getFeatureCount()
public void setIterations(int iterations)
iterations
- the number of iterations to runpublic int getIterations()
public void setNeighbors(int neighbors)
neighbors
- the number of neighbors to usepublic int getNeighbors()
public void setDistanceMetric(DistanceMetric dm)
dm
- the distance metric to usepublic DistanceMetric getDistanceMetric()
Copyright © 2017. All rights reserved.