org.android.activityminer.model.evaluation
Class EvaluationResult

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

public final class EvaluationResult
extends Object
implements SerializableData, Parcelable

Result type for the evaluation of a single feature combination.


Nested Class Summary
 
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
 
Field Summary
private  long[] classesForIndices
          The class identifiers as array where the array index corresponds to the row/column in the confusion matrix.
private  double correctCount
          Count of correct classified samples.
static Parcelable.Creator<EvaluationResult> CREATOR
          The Parcelable creator.
private  List<String> features
          The evaluated features.
private  double incorrectCount
          Count of incorrect classified samples.
private  List<PerClassStatistic> perClassStatistics
          The statistics per class.
private  double[] rowPackedCM
          The row packed confusion matrix.
 
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
 
Constructor Summary
EvaluationResult(List<String> features)
          Constructor
EvaluationResult(List<String> features, List<PerClassStatistic> perClassStatistics, double correct, double incorrect, double[] rowPackedCM, long[] classesForIndices)
          Constructor
EvaluationResult(Parcel source)
          Constructor
 
Method Summary
 int describeContents()
           
 EvaluationResult fromConfusionMatrix(ConfusionMatrix confusionMatrix)
          Method to update the result with the confusion matrix of the evaluation run.
 long[] getClassesForIndices()
          Getter for the classes for the confusion matrix indices.
 List<String> getFeatureSet()
          Getter for the feature set.
 String getFeatureSetDescription()
          Getter for description of the feature set.
 double getOverallAccuracyPercentage()
          Getter for the percentage of correct prediction ( the overall accuracy ).
 double getOverallErrorPercentage()
          Getter for the percentage of incorrect prediction ( the overall classification error ).
 List<PerClassStatistic> getPerClassStatistics()
          Getter for the class statistics
 double[] getRowPackedCM()
          Getter for the row packed confusion matrix.
 double getTotalCorrectCount()
          Getter for the total count of correct classified activities.
 double getTotalCount()
          Getter for the total count of predicted activities.
 double getTotalIncorrectCount()
          Getter for the total count of incorrect classified activities.
 String toXML()
           
 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

features

private final List<String> features
The evaluated features.


perClassStatistics

private final List<PerClassStatistic> perClassStatistics
The statistics per class.


correctCount

private double correctCount
Count of correct classified samples.


incorrectCount

private double incorrectCount
Count of incorrect classified samples.


rowPackedCM

private double[] rowPackedCM
The row packed confusion matrix.


classesForIndices

private long[] classesForIndices
The class identifiers as array where the array index corresponds to the row/column in the confusion matrix.


CREATOR

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

Constructor Detail

EvaluationResult

public EvaluationResult(List<String> features,
                        List<PerClassStatistic> perClassStatistics,
                        double correct,
                        double incorrect,
                        double[] rowPackedCM,
                        long[] classesForIndices)
Constructor

Parameters:
features - the feature set
perClassStatistics -
correct - the count of correct classified samples
incorrect - the count of incorrect classified samples
rowPackedCM - the row packed confusion matrix values
classesForIndices - the class label for the confusion matrix row/column indices.

EvaluationResult

public EvaluationResult(List<String> features)
Constructor

Parameters:
features - the feature set

EvaluationResult

public EvaluationResult(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

getRowPackedCM

public double[] getRowPackedCM()
Getter for the row packed confusion matrix.

Returns:
the row packed confusion matrix

getClassesForIndices

public long[] getClassesForIndices()
Getter for the classes for the confusion matrix indices.

Returns:
the the classes for the confusion matrix indices

getTotalCorrectCount

public final double getTotalCorrectCount()
Getter for the total count of correct classified activities.

Returns:
the count of correct classified activities

getTotalIncorrectCount

public final double getTotalIncorrectCount()
Getter for the total count of incorrect classified activities.

Returns:
the count of incorrect classified activities

getOverallAccuracyPercentage

public final double getOverallAccuracyPercentage()
Getter for the percentage of correct prediction ( the overall accuracy ).

Returns:
the percentage of correct prediction

getOverallErrorPercentage

public final double getOverallErrorPercentage()
Getter for the percentage of incorrect prediction ( the overall classification error ).

Returns:
the percentage of incorrect prediction

getTotalCount

public final double getTotalCount()
Getter for the total count of predicted activities.

Returns:
the total count of predicted activites

getFeatureSet

public final List<String> getFeatureSet()
Getter for the feature set.

Returns:
the feature set

getFeatureSetDescription

public final String getFeatureSetDescription()
Getter for description of the feature set.

Returns:
the description of the feature set

getPerClassStatistics

public final List<PerClassStatistic> getPerClassStatistics()
Getter for the class statistics

Returns:
the class statistics

fromConfusionMatrix

public final EvaluationResult fromConfusionMatrix(ConfusionMatrix confusionMatrix)
Method to update the result with the confusion matrix of the evaluation run.

Parameters:
confusionMatrix - the confusion matrix to update results with
Returns:
the updated evaluation result

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