-
Notifications
You must be signed in to change notification settings - Fork 4
compute gmean
kgryte edited this page May 12, 2015
·
1 revision
Computes the geometric mean of an array. For numeric arrays,
var data = [ 2, 4, 2, 7, 3 ];
var gmean = compute.gmean( data );
// returns ~3.2For non-numeric arrays, provide an accessor function for accessing array values
var data = [
[1,2],
[2,4],
[3,2],
[4,7],
[5,3]
];
function getValue( d ) {
return d[ 1 ];
}
var gmean = compute.gmean( data, getValue );
// returns ~3.2- Utilities
- Array Creation
- Sorting and Reshaping Arrays
- Special Functions
- Arithmetic
- Relational Operations
- Logical Operations
- Trigonometry
- Geometry
- Sets
- Discrete Mathematics
- Linear Algebra
- Statistics