public class BasicOperations extends Object
Constructor and Description |
---|
BasicOperations() |
Modifier and Type | Method and Description |
---|---|
static double |
average(Object[] values)
Computes the average value of the doubles.
|
static DoubleList |
averageLists(Object[] list)
The input list must be a list of DoubleList entries, each of equal size
-- if that is the case, returns a DoubleList with i-th entry the average of
the i-th entries of the input lists.
|
static Double |
div(Object denominator,
Object divisor)
Standard division.
|
static double |
equals(Object object,
Object other)
Returns 1 if object and other are both null, or both not null and equal.
|
static double |
f1(double precision,
double recall)
Computes F1-score (standard F-score) from precision and recall.
|
static double |
isNotNull(Object object)
Returns 0 if object is null, and 1 if it is not null.
|
static double |
percent(double x,
double y) |
static double |
selfNormDifference(Object d1,
Object d2)
Returns the absolute value of (d1-d2)/d1.
|
static DoubleList |
sumLists(Object[] list)
The input list must be a list of DoubleList entries, each of equal size
-- if that is the case, returns a DoubleList with i-th entry the sum of
the i-th entries of the input lists.
|
static Double |
weightedAverageWithIntWeights(Object[] values,
Object[] weights)
Computes the average of values, weighted by weights.
|
public static double percent(double x, double y)
public static Double weightedAverageWithIntWeights(Object[] values, Object[] weights)
values
- weights
- public static double average(Object[] values)
values
- public static Double div(Object denominator, Object divisor)
denominator
- divisor
- public static double f1(double precision, double recall)
precision
- recall
- public static double isNotNull(Object object)
object
- public static double equals(Object object, Object other)
object
- other
- public static double selfNormDifference(Object d1, Object d2)
d1
- d2
- public static DoubleList sumLists(Object[] list)
list
- public static DoubleList averageLists(Object[] list)
list
- Copyright © 2017. All rights reserved.