|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.unikassel.android.sdcframework.util.ObservableEventSourceImpl<ObservableProgressData>
org.android.activityminer.logic.features.selection.FeatureSelectionHelper
public class FeatureSelectionHelper
A class to delegate feature selection to.
Field Summary | |
---|---|
private Configuration |
config
The current configuration. |
private Context |
context
The context. |
private DBManager |
dbManager
A reference to the database manager. |
private Set<FeatureTypes> |
featureSet
The feature set to select features from. |
private String |
lastError
The last error |
private android.support.v4.util.LongSparseArray<List<Long>> |
mapSelectedClassId2SampleIds
A map to store sample (feature vector) identifiers for the selected lass identifiers |
private int |
progress
The current progress. |
private ObservableProgressData |
progressData
The observable progress data |
private int |
sampleCount
The total sample count. |
private int |
subSetSize
The maximum subset size. |
private boolean |
succeeded
The success state flag |
private double |
threshold
Internal accuracy threshold. |
private List<TrainingActivity> |
trainingActivites
The training activities for evaluation. |
private ValidationStrategy |
validationStrategy
The validation strategy. |
Constructor Summary | |
---|---|
FeatureSelectionHelper(DBManager dbManager,
Set<FeatureTypes> featureSet,
Configuration config,
int size,
Context context)
Constructor |
Method Summary | |
---|---|
void |
doSearchForFeatures()
Does run the search for the best feature subset. |
double |
evaluate(Set<FeatureTypes> selectedFeatures,
Classifier classifier)
Evaluation of a feature set. |
String |
getLastError()
Getter for the last error |
int |
getMaxProgress()
Getter for the maximum progress |
String |
getStartProgressMessage()
Getter for the start progress message |
boolean |
hasSucceeded()
Getter for the success flag |
void |
loadSamplesAndCreatePartioning()
Does load available samples as feature vectors from DB and creates the partitioning for k-fold cross validation. |
boolean |
saveResultsToFile(String fileName)
Method to store evaluation result to file. |
void |
updateProgress(String msg)
Does publish the current progress with the given message. |
Methods inherited from class de.unikassel.android.sdcframework.util.ObservableEventSourceImpl |
---|
getObservers, hasObservers, notify, onObserverRegistration, onObserverUnregistration, registerEventObserver, removeAllObservers, unregisterEventObserver |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final DBManager dbManager
private Configuration config
private final Set<FeatureTypes> featureSet
private int sampleCount
private final ValidationStrategy validationStrategy
private List<TrainingActivity> trainingActivites
private final ObservableProgressData progressData
private int progress
private boolean succeeded
private String lastError
private final android.support.v4.util.LongSparseArray<List<Long>> mapSelectedClassId2SampleIds
private Context context
private double threshold
private final int subSetSize
Constructor Detail |
---|
public FeatureSelectionHelper(DBManager dbManager, Set<FeatureTypes> featureSet, Configuration config, int size, Context context)
dbManager
- a reference to the database managerfeatureSet
- the set with the featuresconfig
- the current configurationsize
- the subset sizecontext
- the contextMethod Detail |
---|
public final boolean hasSucceeded()
public final String getLastError()
public final void doSearchForFeatures()
public final boolean saveResultsToFile(String fileName)
fileName
- the filename
public final void loadSamplesAndCreatePartioning() throws Exception
Exception
public final double evaluate(Set<FeatureTypes> selectedFeatures, Classifier classifier)
selectedFeatures
- the selected features for evaluationclassifier
- the classifier for evaluation
public final void updateProgress(String msg)
msg
- the progress messagepublic String getStartProgressMessage()
public final int getMaxProgress()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |