Skip to content

Commit

Permalink
Release v0.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
targos committed Feb 2, 2015
1 parent 431a3ab commit 3d4f0e6
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 11 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ml",
"version": "0.2.0",
"version": "0.2.1",
"main": [
"dist/ml.js",
"dist/ml.min.js"
Expand Down
29 changes: 22 additions & 7 deletions dist/ml.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/**
* ml - Machine learning tools
* @version v0.2.0
* @version v0.2.1
* @link https://github.com/mljs/ml
* @license MIT
*/
Expand Down Expand Up @@ -4332,21 +4332,35 @@ module.exports = NodeSquare;
// https://github.com/accord-net/framework/blob/development/Sources/Accord.Statistics/Tools.cs

function max(values) {
var max = -Infinity, l=values.length;
for(var i=0; i<l; i++) {
if(values[i] > max) max = values[i];
var max = -Infinity, l = values.length;
for (var i = 0; i < l; i++) {
if (values[i] > max) max = values[i];
}
return max;
}

function min(values) {
var min = Infinity, l=values.length;
for(var i=0; i<l; i++) {
if(values[i] < min) min = values[i];
var min = Infinity, l = values.length;
for (var i = 0; i < l; i++) {
if (values[i] < min) min = values[i];
}
return min;
}

function minMax(values) {
var min = Infinity,
max = -Infinity,
l = values.length;
for (var i = 0; i < l; i++) {
if (values[i] < min) min = values[i];
if (values[i] > max) max = values[i];
}
return {
min: min,
max: max
};
}

function mean(values) {
var sum = 0, l = values.length;
for (var i = 0; i < l; i++)
Expand Down Expand Up @@ -4651,6 +4665,7 @@ function cumulativeSum(array) {
module.exports = {
min: min,
max: max,
minMax: minMax,
mean: mean,
geometricMean: geometricMean,
logGeometricMean: logGeometricMean,
Expand Down
4 changes: 2 additions & 2 deletions dist/ml.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ml",
"version": "0.2.0",
"version": "0.2.1",
"description": "Machine learning tools",
"main": "index.js",
"scripts": {
Expand Down

0 comments on commit 3d4f0e6

Please sign in to comment.