Edgar Anderson's data for Iris versicolor petal width.
$ npm install datasets-iris-versicolor-petal-width
For use in the browser, use browserify.
var data = require( 'datasets-iris-versicolor-petal-width' );
Edgar Anderson's data for Iris versicolor petal width.
console.log( data );
// returns [ 1.4, 1.5, 1.5, ... ]
All values are in centimeters
.
var mean = require( 'compute-mean' ),
variance = require( 'compute-variance' ),
data = require( 'datasets-iris-versicolor-petal-width' );
// Calculate the sample mean:
console.log( mean( data ) );
// Calculate the sample variance:
console.log( variance( data ) );
To run the example code from the top-level application directory,
$ node ./examples/index.js
- Anderson, Edgar (1935). "The irises of the Gaspe Peninsula," Bulletin of the American Iris Society, 59, 2–5.
- Fisher, Ronald A. (1936). "The use of multiple measurements in taxonomic problems." Annals of Eugenics, 7, Part II, 179–188.
Unit tests use the Mocha test framework with Chai assertions. To run the tests, execute the following command in the top-level application directory:
$ make test
All new feature development should have corresponding unit tests to validate correct functionality.
This repository uses Istanbul as its code coverage tool. To generate a test coverage report, execute the following command in the top-level application directory:
$ make test-cov
Istanbul creates a ./reports/coverage
directory. To access an HTML version of the report,
$ make view-cov
Copyright © 2015. The Compute.io Authors.