org.android.activityminer.logic.evaluation
Class EvaluationResultPrinter

Package class diagram package EvaluationResultPrinter
java.lang.Object
  extended by org.android.activityminer.logic.evaluation.EvaluationResultPrinter

public class EvaluationResultPrinter
extends Object

A printer for Evaluation Results.


Constructor Summary
EvaluationResultPrinter()
           
 
Method Summary
private static String createLine(int len)
          Does create a string representation of a line with the given length.
static String getPerClassStatisticHeaderString(Context context, boolean addClassColumn)
          Does create a string representation of the per class statistic column headers.
static String getPerClassStatisticValueString(Context context, double[] measureValues, String classLabel)
          Does create a string representation of the per class statistic values as column entries with the class label in the end.
static void print(Context context, OutputStream os, EvaluationResult evalResult, String validationStrategy, android.support.v4.util.LongSparseArray<String> mapCid2Name)
          Does print the evaluation result to an output stream.
static void printCollection(Context context, OutputStream os, EvaluationResultCollection evalResultCollection)
          Does print an evaluation result collection to an output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvaluationResultPrinter

public EvaluationResultPrinter()
Method Detail

printCollection

public static final void printCollection(Context context,
                                         OutputStream os,
                                         EvaluationResultCollection evalResultCollection)
Does print an evaluation result collection to an output stream.

Parameters:
context - the context
os - the output stream
evalResultCollection - the evaluation result collection to print

createLine

private static final String createLine(int len)
Does create a string representation of a line with the given length.

Parameters:
len - the line length in characters
Returns:
the line string

print

public static final void print(Context context,
                               OutputStream os,
                               EvaluationResult evalResult,
                               String validationStrategy,
                               android.support.v4.util.LongSparseArray<String> mapCid2Name)
Does print the evaluation result to an output stream.

Parameters:
context - the context
os - the output stream
evalResult - the evaluation result to print
validationStrategy - the validation strategy
mapCid2Name - the mapping of class identifiers to names

getPerClassStatisticValueString

public static final String getPerClassStatisticValueString(Context context,
                                                           double[] measureValues,
                                                           String classLabel)
Does create a string representation of the per class statistic values as column entries with the class label in the end. All values but the class label will be printed right justified in the column. The width of each column is determined by its header.

Parameters:
context - the context
measureValues - the measure values
classLabel - the class label
Returns:
a string representation of the column headers

getPerClassStatisticHeaderString

public static final String getPerClassStatisticHeaderString(Context context,
                                                            boolean addClassColumn)
Does create a string representation of the per class statistic column headers.

Parameters:
context - the context
addClassColumn - if true a column for the class label is added in the end
Returns:
a string representation of the column headers