public class LRS extends Object implements DataTransform
Constructor and Description |
---|
LRS(int L,
int R,
ClassificationDataSet cds,
Classifier evaluater,
int folds)
Performs LRS feature selection for a classification problem
|
LRS(int L,
int R,
Classifier evaluater,
int folds)
Creates a LRS feature selection object for a classification problem
|
LRS(int L,
int R,
RegressionDataSet rds,
Regressor evaluater,
int folds)
Performs LRS feature selection for a regression problem
|
LRS(int L,
int R,
Regressor evaluater,
int folds)
Creates a LRS feature selection object for a regression problem
|
Modifier and Type | Method and Description |
---|---|
LRS |
clone() |
void |
fit(DataSet data)
Fits this transform to the given dataset.
|
int |
getFeaturesToAdd()
Returns the number of features to add
|
int |
getFeaturesToRemove()
Returns the number of features to remove
|
int |
getFolds() |
Set<Integer> |
getSelectedCategorical()
Returns a copy of the set of categorical features selected by the search
algorithm
|
Set<Integer> |
getSelectedNumerical()
Returns a copy of the set of numerical features selected by the search
algorithm.
|
void |
setFeaturesToAdd(int featuresToAdd)
Sets the number of features to add (the L parameter).
|
void |
setFeaturesToRemove(int featuresToRemove)
Sets the number of features to remove (the R parameter).
|
void |
setFolds(int folds)
Sets the number of folds to use for cross validation when estimating the error rate
|
DataPoint |
transform(DataPoint dp)
Returns a new data point that is a transformation of the original data
point.
|
public LRS(int L, int R, Classifier evaluater, int folds)
L
- the number of features to greedily addR
- the number of features to greedily removeevaluater
- the classifier to use in determining accuracy given a
feature subsetfolds
- the number of cross validation folds to use in selectionpublic LRS(int L, int R, ClassificationDataSet cds, Classifier evaluater, int folds)
L
- the number of features to greedily addR
- the number of features to greedily removecds
- the data set to perform feature selection onevaluater
- the classifier to use in determining accuracy given a
feature subsetfolds
- the number of cross validation folds to use in selectionpublic LRS(int L, int R, Regressor evaluater, int folds)
L
- the number of features to greedily addR
- the number of features to greedily removeevaluater
- the regressor to use in determining accuracy given a
feature subsetfolds
- the number of cross validation folds to use in selectionpublic LRS(int L, int R, RegressionDataSet rds, Regressor evaluater, int folds)
L
- the number of features to greedily addR
- the number of features to greedily removerds
- the data set to perform feature selection onevaluater
- the regressor to use in determining accuracy given a
feature subsetfolds
- the number of cross validation folds to use in selectionpublic DataPoint transform(DataPoint dp)
DataTransform
transform
in interface DataTransform
dp
- the data point to apply a transformation topublic LRS clone()
clone
in interface DataTransform
clone
in class Object
public Set<Integer> getSelectedCategorical()
public Set<Integer> getSelectedNumerical()
public void fit(DataSet data)
DataTransform
FailedToFitException
exception may be
thrown.fit
in interface DataTransform
data
- the dataset to fir this transform topublic void setFeaturesToAdd(int featuresToAdd)
featuresToAdd
- the number of features to greedily addpublic int getFeaturesToAdd()
public void setFeaturesToRemove(int featuresToRemove)
featuresToRemove
- the number of features to greedily removepublic int getFeaturesToRemove()
public void setFolds(int folds)
folds
- the number of folds to use for cross validation when estimating the error ratepublic int getFolds()
Copyright © 2017. All rights reserved.