Package weka.classifiers.lazy.AM
Class AMUtils
- java.lang.Object
-
- weka.classifiers.lazy.AM.AMUtils
-
public class AMUtils extends java.lang.ObjectThis class holds constants and methods used in the AM classifier.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAMUtils.CsvBuilderSimplify CSV printing by allowing specifying rows as Maps and converting automatically to lists of column values in theAMUtils.CsvBuilder.build(boolean)method.static classAMUtils.CsvDoc
-
Field Summary
Fields Modifier and Type Field Description static doubleHETEROGENEOUSA heterogeneous outcome, which means we don't bother with it.static java.lang.StringLINE_SEPARATORstatic doubleNONDETERMINISTICA non-deterministic outcome, meaning that there is more than one possibility.static java.lang.StringNONDETERMINISTIC_STRINGstatic com.jakewharton.picnic.CellStyleREPORT_TABLE_STYLEPicnic library table style used for printing gangs and analogical setsstatic doubleUNKNOWNAn 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.StringformatPercentage(java.math.BigDecimal val, int numDecimals, boolean addPercentPrefix)static java.lang.StringformatPointerPercentage(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:
valformatted as a percentage with three decimal places
-
-