public abstract class MathUtil extends Object
| Modifier and Type | Field and Description |
|---|---|
static double |
EPSILON |
static double |
LOG10 |
static double |
LOG2 |
static double |
ROOT2PI |
| Constructor and Description |
|---|
MathUtil() |
| Modifier and Type | Method and Description |
|---|---|
static double |
accuracy(Matrix confusionMatrix) |
static double |
artanh(double x) |
static long |
binomialCoefficient(int n,
int k) |
static BigInteger |
binomialCoefficientBig(int n,
int k) |
static double[] |
collectionToDoubleArray(Collection<? extends Number> numbers) |
static int[] |
collectionToIntArray(Collection<? extends Number> numbers) |
static long[] |
collectionToLongArray(Collection<? extends Number> numbers) |
static BigDecimal |
divide(BigDecimal v1,
BigDecimal v2) |
static boolean |
equals(Object o1,
Object o2) |
static double |
f1Measure(double precision,
double recall) |
static double |
f1Measure(double tp,
double fp,
double fn) |
static double |
f1Measure(Matrix confusionMatrix,
long catIndex) |
static double |
f1MeasureMacro(Matrix confusionMatrix) |
static double |
f1MeasureMicro(Matrix confusionMatrix) |
static long |
factorial(int n) |
static BigInteger |
factorialBig(int n) |
static double |
fallout(double tn,
double fp) |
static double |
falseNegativeRate(double fn,
double tp) |
static double |
falsePositiveRate(double fp,
double tn) |
static double |
fBetaMeasure(double beta,
double precision,
double recall) |
static double |
gammaln(double x)
from numerical recipes in c (p.
|
static double |
gauss(double mean,
double sigma,
double x) |
static BigDecimal |
getBigDecimal(Object o) |
static BigInteger |
getBigInteger(Object o) |
static boolean |
getBoolean(Object o) |
static byte |
getByte(Object o) |
static char |
getChar(Object o) |
static Date |
getDate(Object o) |
static double |
getDouble(Object o) |
static float |
getFloat(Object o) |
static int |
getInt(Object o) |
static long |
getLong(Object o) |
static Matrix |
getMatrix(Object o) |
static Object |
getObject(Object o) |
static Object |
getPreferredObject(Object o) |
static Random |
getRandom() |
static long |
getSeed() |
static short |
getShort(Object o) |
static boolean |
greater(BigInteger i1,
BigInteger i2) |
static String |
guid() |
static int |
hash(int h) |
static int |
hexToInt(String hex) |
static double |
hypot(double a,
double b)
sqrt(a^2 + b^2) without under/overflow.
|
static double |
ignoreNaN(double v) |
static long[] |
index2PosColumnMajor(long[] size,
long index) |
static long[] |
index2PosRowMajor(long[] size,
long index) |
static String |
intToHex(int i) |
static boolean |
isDigit(char c) |
static boolean |
isDiscrete(double number) |
static boolean |
isEventHappening(double probability) |
static boolean |
isGreater(BigDecimal v1,
BigDecimal v2) |
static boolean |
isNaNOrInfinite(double v) |
static boolean |
isNaNOrInfinite(Object o) |
static boolean |
isNull(Object value) |
static boolean |
isSign(char c) |
static boolean |
isSmaller(BigDecimal v1,
BigDecimal v2) |
static double |
log10(double d) |
static double |
log2(double d) |
static double[] |
logToProbs(double[] logs) |
static int |
longToInt(long value) |
static int |
longToIntClip(long value) |
static double |
max(double[] values) |
static int |
max(int[] values) |
static String |
md5(byte[] data) |
static String |
md5(File file) |
static String |
md5(Serializable o) |
static String |
md5(String text) |
static int |
min(int[] values) |
static BigDecimal |
minus(BigDecimal v1,
BigDecimal v2) |
static double[] |
minus(double[] values,
double value) |
static double |
negativePredictiveValue(double tn,
double fn) |
static boolean |
nextBoolean() |
static double |
nextDouble() |
static double |
nextDouble(double min,
double max) |
static double |
nextGaussian() |
static double |
nextGaussian(double mean,
double sigma) |
static int |
nextInteger(int max) |
static int |
nextInteger(int min,
int max)
Returns a random value in the desired interval
|
static double |
norminv(double p,
double mu,
double sigma) |
static BigDecimal |
plus(BigDecimal v1,
BigDecimal v2) |
static double[] |
plus(double[] values,
double value) |
static long |
pos2IndexColumnMajor(long[] size,
long[] pos) |
static long |
pos2IndexRowMajor(long[] size,
long[] pos) |
static double |
positivePredictiveValue(double tp,
double fp) |
static double |
precision(double tp,
double fp) |
static double |
precision(Matrix confusionMatrix,
long catIndex) |
static double |
precisionMacro(Matrix confusionMatrix) |
static double |
precisionMicro(Matrix confusionMatrix) |
static List<Integer> |
randPermInt(int startInclusive,
int endExclusive) |
static List<Long> |
randPermLong(long startInclusive,
long endExclusive) |
static double |
recall(double tp,
double fn) |
static double |
recall(Matrix confusionMatrix,
long catIndex) |
static double |
recallMacro(Matrix confusionMatrix) |
static double |
recallMicro(Matrix confusionMatrix) |
static double |
round(double value,
int decimals) |
static int |
search(long[] values,
int fromIndex,
int toIndex,
long key) |
static double |
sensitivity(double tp,
double fn) |
static double[] |
sequenceDouble(double startInclusive,
double endExclusive) |
static double[] |
sequenceDouble(double startInclusive,
double endExclusive,
double stepsize) |
static int[] |
sequenceInt(int startInclusive,
int endExclusive) |
static List<Double> |
sequenceListDouble(double startInclusive,
double endExclusive) |
static List<Double> |
sequenceListDouble(double startInclusive,
double endExclusive,
double stepsize) |
static List<Integer> |
sequenceListInt(int startInclusive,
int endExclusive) |
static List<Long> |
sequenceListLong(long startInclusive,
long endExclusive) |
static List<Long> |
sequenceListLong(long startInclusive,
long endExclusive,
long stepsize) |
static long[] |
sequenceLong(long startInclusive,
long endExclusive) |
static long[] |
sequenceLong(long startInclusive,
long endExclusive,
long stepsize) |
static void |
setSeed(long seed) |
static boolean |
smaller(BigInteger i1,
BigInteger i2) |
static double |
specificity(double tn,
double fp) |
static BigDecimal |
sqrt(BigDecimal n) |
static BigDecimal |
times(BigDecimal v1,
BigDecimal v2) |
static double[] |
toDoubleArray(int... intArray) |
static double[][] |
toDoubleArray(int[]... intArray) |
static List<Double> |
toDoubleList(double[] numbers) |
static List<Double> |
toDoubleList(int[] numbers) |
static List<Double> |
toDoubleList(long[] numbers) |
static int[] |
toIntArray(long... coordinates) |
static long[] |
toLongArray(int... coordinates) |
static List<Long> |
toLongList(int[] numbers) |
static List<Long> |
toLongList(long[] numbers) |
static long |
totalCorrect(Matrix confusionMatrix) |
static double |
trueNegativeRate(double tn,
double fp) |
static boolean |
xor(boolean b1,
boolean b2) |
public static final double EPSILON
public static final double ROOT2PI
public static final double LOG10
public static final double LOG2
public static Random getRandom()
public static String md5(String text) throws NoSuchAlgorithmException
NoSuchAlgorithmExceptionpublic static final int search(long[] values,
int fromIndex,
int toIndex,
long key)
public static String md5(byte[] data)
public static String md5(File file) throws NoSuchAlgorithmException, IOException
NoSuchAlgorithmExceptionIOExceptionpublic static String md5(Serializable o) throws NoSuchAlgorithmException, IOException
NoSuchAlgorithmExceptionIOExceptionpublic static final boolean xor(boolean b1,
boolean b2)
public static double[] logToProbs(double[] logs)
public static double[] plus(double[] values,
double value)
public static double[] minus(double[] values,
double value)
public static final long getSeed()
public static final double round(double value,
int decimals)
public static void setSeed(long seed)
public static final double log2(double d)
public static final double log10(double d)
public static int hash(int h)
public static final double gauss(double mean,
double sigma,
double x)
public static final double artanh(double x)
public static final double nextGaussian(double mean,
double sigma)
public static final double nextGaussian()
public static final double nextDouble(double min,
double max)
public static final int nextInteger(int min,
int max)
min - minimum value (inclusive)max - maximum value (exclusive)public static final int nextInteger(int max)
public static boolean isEventHappening(double probability)
public static boolean nextBoolean()
public static double nextDouble()
public static final double ignoreNaN(double v)
public static final boolean isNaNOrInfinite(double v)
public static final boolean isNaNOrInfinite(Object o)
public static final double getDouble(Object o)
public static final double hypot(double a,
double b)
public static final long[] collectionToLongArray(Collection<? extends Number> numbers)
public static final double[] collectionToDoubleArray(Collection<? extends Number> numbers)
public static final int[] collectionToIntArray(Collection<? extends Number> numbers)
public static double[] toDoubleArray(int... intArray)
public static double[][] toDoubleArray(int[]... intArray)
public static List<Long> sequenceListLong(long startInclusive, long endExclusive, long stepsize)
public static List<Double> sequenceListDouble(double startInclusive, double endExclusive)
public static List<Double> sequenceListDouble(double startInclusive, double endExclusive, double stepsize)
public static long[] sequenceLong(long startInclusive,
long endExclusive)
public static long[] sequenceLong(long startInclusive,
long endExclusive,
long stepsize)
public static double[] sequenceDouble(double startInclusive,
double endExclusive)
public static double[] sequenceDouble(double startInclusive,
double endExclusive,
double stepsize)
public static int[] sequenceInt(int startInclusive,
int endExclusive)
public static double sensitivity(double tp,
double fn)
public static double specificity(double tn,
double fp)
public static double positivePredictiveValue(double tp,
double fp)
public static double negativePredictiveValue(double tn,
double fn)
public static double falsePositiveRate(double fp,
double tn)
public static double falseNegativeRate(double fn,
double tp)
public static double recall(double tp,
double fn)
public static double precision(double tp,
double fp)
public static double fallout(double tn,
double fp)
public static double trueNegativeRate(double tn,
double fp)
public static double f1Measure(double precision,
double recall)
public static double fBetaMeasure(double beta,
double precision,
double recall)
public static boolean getBoolean(Object o)
public static byte getByte(Object o)
public static BigInteger getBigInteger(Object o)
public static BigDecimal getBigDecimal(Object o)
public static char getChar(Object o)
public static float getFloat(Object o)
public static int getInt(Object o)
public static long getLong(Object o)
public static short getShort(Object o)
public static int[] toIntArray(long... coordinates)
public static long[] toLongArray(int... coordinates)
public static boolean isNull(Object value)
public static double norminv(double p,
double mu,
double sigma)
public static double f1Measure(double tp,
double fp,
double fn)
public static final long factorial(int n)
public static final BigInteger factorialBig(int n)
public static final long binomialCoefficient(int n,
int k)
public static final BigInteger binomialCoefficientBig(int n, int k)
public static final boolean greater(BigInteger i1, BigInteger i2)
public static final boolean smaller(BigInteger i1, BigInteger i2)
public static int max(int[] values)
public static double max(double[] values)
public static int min(int[] values)
public static final BigDecimal plus(BigDecimal v1, BigDecimal v2)
public static final BigDecimal minus(BigDecimal v1, BigDecimal v2)
public static final BigDecimal times(BigDecimal v1, BigDecimal v2)
public static final BigDecimal divide(BigDecimal v1, BigDecimal v2)
public static boolean isGreater(BigDecimal v1, BigDecimal v2)
public static boolean isSmaller(BigDecimal v1, BigDecimal v2)
public static final BigDecimal sqrt(BigDecimal n)
public static final double gammaln(double x)
public static final long pos2IndexRowMajor(long[] size,
long[] pos)
public static final long pos2IndexColumnMajor(long[] size,
long[] pos)
public static final long[] index2PosRowMajor(long[] size,
long index)
public static final long[] index2PosColumnMajor(long[] size,
long index)
public static final long totalCorrect(Matrix confusionMatrix)
public static final double accuracy(Matrix confusionMatrix)
public static double precisionMacro(Matrix confusionMatrix)
public static double recallMacro(Matrix confusionMatrix)
public static double f1MeasureMacro(Matrix confusionMatrix)
public static double precision(Matrix confusionMatrix, long catIndex)
public static double recall(Matrix confusionMatrix, long catIndex)
public static double f1Measure(Matrix confusionMatrix, long catIndex)
public static double precisionMicro(Matrix confusionMatrix)
public static double recallMicro(Matrix confusionMatrix)
public static double f1MeasureMicro(Matrix confusionMatrix)
public static final int longToIntClip(long value)
public static final int longToInt(long value)
public static boolean isDigit(char c)
public static boolean isSign(char c)
public static int hexToInt(String hex)
public static String intToHex(int i)
public static boolean isDiscrete(double number)
public static String guid()
Copyright © 2015 Universal Java Matrix Package. All rights reserved.