org.android.activityminer.model.configuration
Class Configuration

Package class diagram package Configuration
java.lang.Object
  extended by org.android.activityminer.model.configuration.Configuration
All Implemented Interfaces:
Parcelable, SerializableData

public final class Configuration
extends Object
implements SerializableData, Parcelable

Representation of the current configuration values for the activity recognizer application.


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
 
Field Summary
private  long countDownTime
          The count-down time.
static Parcelable.Creator<Configuration> CREATOR
          The Parcelable creator.
private  long defaultRecordingTime
          The minimum recording time.
private  int evalAccuracyThreshold
          The threshold in percent (0-100) to limit the evaluation result set size.
private  int maximumRecordingTime
          The maximum recording time.
private  long maxSampleRate
          The sample rate maximum in milliseconds.
private  int parameterKForCrossValidation
          The parameter k for the k-fold cross-validation.
private  int parameterKForKNN
          The parameter k for the k-nearest-neighbor classifier.
private  boolean parameterNormalizeForKNN
          The attribute normalization flag for the k-nearest-neighbor classifier.
private  RuntimeConfiguration runtimeConfiguration
          The runtime configuration
private  SortedSet<Long> selectedClasses
          The selected classes.
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
Configuration()
          Constructor
Configuration(Configuration config)
          Copy-Constructor
Configuration(long[] selectedClasses)
          Constructor
Configuration(Parcel source)
          Constructor
 
Method Summary
 boolean addClassLabel(Long classLabelId)
          Does add an activity label to the selected class set.
 int describeContents()
           
 long getCountDownTime()
          Getter for the countDownTime
 long getDefaultRecordingTime()
          Getter for the default recording time in seconds.
 int getEvalAccuracyThreshold()
          Getter for the evaluation threshold value (0-100%).
 int getMaximumRecordingTime()
           
 long getMaximumSampleRate()
          Getter for the maximum sample rate in milliseconds.
 int getParameterKForCrossValidation()
          Getter for the parameter k for the k-fold cross-validation.
 int getParameterKForKNN()
          Getter for the parameter k for the k-nearest-neighbor classifier.
 boolean getParameterNormalizeForKNN()
          Getter for the parameterNormalizeForKNN
 RuntimeConfiguration getRuntimeConfiguration()
          Getter for the runtime configuration
 int getSelectedClassCount()
          Getter for the count of selected classes
 long[] getSelectedClasses()
          Getter for the selected features.
 Set<Long> getSelectedClassesSet()
          Getter for the set of selected classes.
 boolean removeClassLabel(Long classLabelId)
          Does remove an activity label from the selected class set.
 void setCountDownTime(long countDownTime)
          Setter for the countDownTime
 void setDefaultRecordingTime(long defaultRecordingTime)
          Setter for the default recording time in seconds.
 void setEvalAccuracyThreshold(int evalAccuracyThreshold)
          Setter for the evalAccuracyThreshold
 void setMaximumRecordingTime(int maximumRecordingTime)
          Setter for the maximum recording time in seconds.
 void setMaximumSampleRate(long maxSampleRate)
          Setter for the sample rate maximum in milliseconds.
 void setParameterKForCrossValidation(int parameterK)
          Setter for the parameter k for the k-fold cross-validation.
 void setParameterKForKNN(int parameterKForKNN)
          Setter for the parameter k for the k-nearest-neighbor classifier.
 void setParameterNormalizeForKNN(boolean parameterNormalizeForKNN)
          Setter for the parameterNormalizeForKNN
 void setRuntimeConfiguration(RuntimeConfiguration runtimeConfiguration)
          Setter for the runtime configuration
 String toXML()
           
 void updateSelectedClasses(long[] selectedClasses)
          Method to update the selected classes
 void updateSelectedClasses(Long[] selectedClasses)
          Method to update the selected classes
 void writeToParcel(Parcel dest, int flags)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

runtimeConfiguration

private RuntimeConfiguration runtimeConfiguration
The runtime configuration


maxSampleRate

private long maxSampleRate
The sample rate maximum in milliseconds.


selectedClasses

private final SortedSet<Long> selectedClasses
The selected classes.


countDownTime

private long countDownTime
The count-down time.


defaultRecordingTime

private long defaultRecordingTime
The minimum recording time.


maximumRecordingTime

private int maximumRecordingTime
The maximum recording time.


parameterKForCrossValidation

private int parameterKForCrossValidation
The parameter k for the k-fold cross-validation.


evalAccuracyThreshold

private int evalAccuracyThreshold
The threshold in percent (0-100) to limit the evaluation result set size.


parameterKForKNN

private int parameterKForKNN
The parameter k for the k-nearest-neighbor classifier.


parameterNormalizeForKNN

private boolean parameterNormalizeForKNN
The attribute normalization flag for the k-nearest-neighbor classifier.


CREATOR

public static final Parcelable.Creator<Configuration> CREATOR
The Parcelable creator.

Constructor Detail

Configuration

public Configuration()
Constructor


Configuration

public Configuration(long[] selectedClasses)
Constructor

Parameters:
selectedClasses - the set with selected classes

Configuration

public Configuration(Configuration config)
Copy-Constructor

Parameters:
config - the configuration to copy from

Configuration

public Configuration(Parcel source)
Constructor

Parameters:
source - the parcel to create from
Method Detail

writeToParcel

public final void writeToParcel(Parcel dest,
                                int flags)
Specified by:
writeToParcel in interface Parcelable

getRuntimeConfiguration

public final RuntimeConfiguration getRuntimeConfiguration()
Getter for the runtime configuration

Returns:
the runtime configuration

setRuntimeConfiguration

public final void setRuntimeConfiguration(RuntimeConfiguration runtimeConfiguration)
Setter for the runtime configuration

Parameters:
runtimeConfiguration - the runtime configuration to set

addClassLabel

public final boolean addClassLabel(Long classLabelId)
Does add an activity label to the selected class set.

Parameters:
classLabelId - the activity label identifier to add
Returns:
true if the identifier was not in the selection

removeClassLabel

public final boolean removeClassLabel(Long classLabelId)
Does remove an activity label from the selected class set.

Parameters:
classLabelId - the activity class identifier to remove
Returns:
true if the activity label was in the selection

updateSelectedClasses

public void updateSelectedClasses(Long[] selectedClasses)
Method to update the selected classes

Parameters:
selectedClasses - the new selection of activity label identifiers

updateSelectedClasses

public void updateSelectedClasses(long[] selectedClasses)
Method to update the selected classes

Parameters:
selectedClasses - the new selection of activity label identifiers

getSelectedClasses

public final long[] getSelectedClasses()
Getter for the selected features.

Returns:
the selected features as array

getSelectedClassesSet

public final Set<Long> getSelectedClassesSet()
Getter for the set of selected classes.

Returns:
the set of selected classes

getCountDownTime

public final long getCountDownTime()
Getter for the countDownTime

Returns:
the countDownTime

setCountDownTime

public final void setCountDownTime(long countDownTime)
Setter for the countDownTime

Parameters:
countDownTime - the countDownTime to set

setDefaultRecordingTime

public final void setDefaultRecordingTime(long defaultRecordingTime)
Setter for the default recording time in seconds.

Parameters:
defaultRecordingTime - the default recording time

getDefaultRecordingTime

public final long getDefaultRecordingTime()
Getter for the default recording time in seconds.

Returns:
the default recording time

setMaximumRecordingTime

public final void setMaximumRecordingTime(int maximumRecordingTime)
Setter for the maximum recording time in seconds.

Parameters:
maximumRecordingTime - the maximum recording time

getMaximumRecordingTime

public final int getMaximumRecordingTime()
Returns:
the maximum Recording time in seconds

getParameterKForCrossValidation

public final int getParameterKForCrossValidation()
Getter for the parameter k for the k-fold cross-validation.

Returns:
the parameter k

setParameterKForCrossValidation

public final void setParameterKForCrossValidation(int parameterK)
Setter for the parameter k for the k-fold cross-validation.

Parameters:
parameterK - the parameter k to set

getEvalAccuracyThreshold

public int getEvalAccuracyThreshold()
Getter for the evaluation threshold value (0-100%). Evaluation results with an overall accuracy below this threshold will be ignored.

Returns:
the evalAccuracyThreshold

setEvalAccuracyThreshold

public void setEvalAccuracyThreshold(int evalAccuracyThreshold)
Setter for the evalAccuracyThreshold

Parameters:
evalAccuracyThreshold - the evalAccuracyThreshold to set

getParameterKForKNN

public final int getParameterKForKNN()
Getter for the parameter k for the k-nearest-neighbor classifier.

Returns:
the parameter k for the k-nearest-neighbor classifier

setParameterKForKNN

public final void setParameterKForKNN(int parameterKForKNN)
Setter for the parameter k for the k-nearest-neighbor classifier.

Parameters:
parameterKForKNN - the parameter k to set

getParameterNormalizeForKNN

public boolean getParameterNormalizeForKNN()
Getter for the parameterNormalizeForKNN

Returns:
the parameterNormalizeForKNN

setParameterNormalizeForKNN

public void setParameterNormalizeForKNN(boolean parameterNormalizeForKNN)
Setter for the parameterNormalizeForKNN

Parameters:
parameterNormalizeForKNN - the parameterNormalizeForKNN to set

getSelectedClassCount

public final int getSelectedClassCount()
Getter for the count of selected classes

Returns:
the count of selected classes

getMaximumSampleRate

public final long getMaximumSampleRate()
Getter for the maximum sample rate in milliseconds.

Returns:
the sample rate maximum

setMaximumSampleRate

public final void setMaximumSampleRate(long maxSampleRate)
Setter for the sample rate maximum in milliseconds.

Parameters:
maxSampleRate - the sample rate maximum

toXML

public final String toXML()
                   throws Exception
Specified by:
toXML in interface SerializableData
Throws:
Exception

describeContents

public final int describeContents()
Specified by:
describeContents in interface Parcelable