public class KernelEvaluation extends Object implements RevisionHandler
Modifier and Type | Field and Description |
---|---|
protected double[][] |
m_Evaluations
the kernel evaluation results
|
protected int |
m_NumCacheHits
the number of cache hits
|
protected int |
m_NumEvals
the number of performed evaluations
|
protected String[] |
m_Options
user-supplied options
|
protected StringBuffer |
m_Result
the result string
|
Constructor and Description |
---|
KernelEvaluation()
default constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj)
Tests whether the current evaluation object is equal to another
evaluation object
|
String |
evaluate(Kernel kernel,
Instances data)
Evaluates the Kernel with the given commandline options and returns
the evaluation string.
|
static String |
evaluate(Kernel Kernel,
String[] options)
Evaluates the Kernel with the given commandline options and returns
the evaluation string.
|
static String |
evaluate(String kernelString,
String[] options)
Evaluates a kernel with the options given in an array of strings.
|
String |
getRevision()
Returns the revision string.
|
String[] |
getUserOptions()
returns the options the user supplied for the kernel
|
static void |
main(String[] args)
A test method for this class.
|
protected static String |
makeOptionString(Kernel Kernel)
Generates an option string to output on the commandline.
|
void |
setUserOptions(String[] options)
sets the option the user supplied for the kernel
|
String |
toString()
returns the current result
|
String |
toSummaryString()
returns a summary string of the evaluation with a no title
|
String |
toSummaryString(String title)
returns a summary string of the evaluation with a default title
|
protected StringBuffer m_Result
protected double[][] m_Evaluations
protected int m_NumEvals
protected int m_NumCacheHits
protected String[] m_Options
public void setUserOptions(String[] options)
options
- options that were supplied for the kernelpublic String[] getUserOptions()
protected static String makeOptionString(Kernel Kernel)
Kernel
- the Kernel to generate the string forpublic static String evaluate(Kernel Kernel, String[] options) throws Exception
Kernel
- the Kernel to evaluateoptions
- the commandline optionsException
- if evaluation failspublic static String evaluate(String kernelString, String[] options) throws Exception
kernelString
- class of kernel as a stringoptions
- the array of string containing the optionsException
- if model could not be evaluated successfullypublic String evaluate(Kernel kernel, Instances data) throws Exception
kernel
- the Kernel to evaluatedata
- the data to run the Kernel withException
- if evaluation failspublic boolean equals(Object obj)
public String toSummaryString()
public String toSummaryString(String title)
title
- the title to print before the resultpublic String toString()
toString
in class Object
toSummaryString()
public String getRevision()
getRevision
in interface RevisionHandler
public static void main(String[] args)
args
- an array of command line arguments, the first of which
must be the class name of a kernel.Copyright © 2015 University of Waikato, Hamilton, NZ. All rights reserved.