Package weka.classifiers.lazy.AM
Class AMUtils
- java.lang.Object
-
- weka.classifiers.lazy.AM.AMUtils
-
public class AMUtils extends java.lang.Object
This class holds constants and methods used in the AM classifier.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AMUtils.CsvBuilder
Simplify CSV printing by allowing specifying rows as Maps and converting automatically to lists of column values in theAMUtils.CsvBuilder.build(boolean)
method.static class
AMUtils.CsvDoc
-
Field Summary
Fields Modifier and Type Field Description static double
HETEROGENEOUS
A heterogeneous outcome, which means we don't bother with it.static java.lang.String
LINE_SEPARATOR
static double
NONDETERMINISTIC
A non-deterministic outcome, meaning that there is more than one possibility.static java.lang.String
NONDETERMINISTIC_STRING
static com.jakewharton.picnic.CellStyle
REPORT_TABLE_STYLE
Picnic library table style used for printing gangs and analogical setsstatic double
UNKNOWN
An unknown class value.
-
Constructor Summary
Constructors Constructor Description AMUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
formatPercentage(java.math.BigDecimal val, int numDecimals, boolean addPercentPrefix)
static java.lang.String
formatPointerPercentage(java.math.BigInteger pointers, java.math.BigDecimal totalPointers, int numDecimals, boolean addPercentPrefix)
-
-
-
Field Detail
-
UNKNOWN
public static final double UNKNOWN
An unknown class value.- See Also:
- Constant Field Values
-
NONDETERMINISTIC
public static final double NONDETERMINISTIC
A non-deterministic outcome, meaning that there is more than one possibility.- See Also:
- Constant Field Values
-
NONDETERMINISTIC_STRING
public static final java.lang.String NONDETERMINISTIC_STRING
- See Also:
- Constant Field Values
-
HETEROGENEOUS
public static final double HETEROGENEOUS
A heterogeneous outcome, which means we don't bother with it.- See Also:
- Constant Field Values
-
LINE_SEPARATOR
public static final java.lang.String LINE_SEPARATOR
-
REPORT_TABLE_STYLE
public static final com.jakewharton.picnic.CellStyle REPORT_TABLE_STYLE
Picnic library table style used for printing gangs and analogical sets
-
-
Method Detail
-
formatPointerPercentage
public static java.lang.String formatPointerPercentage(java.math.BigInteger pointers, java.math.BigDecimal totalPointers, int numDecimals, boolean addPercentPrefix)
- Parameters:
pointers
- the number of pointers for the current contexttotalPointers
- the number of pointers for all contextsnumDecimals
- the number of digits to output after the decimal point.addPercentPrefix
- true if a percent sign (%) should be prefixed- Returns:
- return a formatted percentage indicating the size of the analogical effect of
pointers
-
formatPercentage
public static java.lang.String formatPercentage(java.math.BigDecimal val, int numDecimals, boolean addPercentPrefix)
- Parameters:
numDecimals
- the number of digits to output after the decimal point.addPercentPrefix
- true if a percent sign (%) should be prefixed- Returns:
val
formatted as a percentage with three decimal places
-
-