Wondering what‚Äôs next for npm?Check out our public roadmap! ¬Ľ

    datasets-iris-virginica

    1.0.0¬†‚Äʬ†Public¬†‚Äʬ†Published

    Iris Virginica

    NPM version Build Status Coverage Status Dependencies

    Edgar Anderson's data for Iris virginica.

    Installation

    $ npm install datasets-iris-virginica

    For use in the browser, use browserify.

    Usage

    var data = require( 'datasets-iris-virginica' );

    data.sepal

    Edgar Anderson's data for Iris virginica sepal length and width.

    console.log( data.sepal );
    // returns {'len':[...],'width':[...]}

    data.petal

    Edgar Anderson's data for Iris virginica petal length and width.

    console.log( data.petal );
    // returns {'len':[...],'width':[...]}

    Examples

    var toMatrix = require( 'compute-to-matrix' ),
        mean = require( 'compute-mean' ),
        variance = require( 'compute-variance' ),
        data = require( 'datasets-iris-virginica' );
     
    // Convert the data arrays to a matrix:
    var mat = toMatrix([
        data.sepal.len,
        data.sepal.width,
        data.petal.len,
        data.petal.width
    ]);
     
    // Calculate the sample mean along the rows:
    console.log( mean( mat ).toString() );
     
    // Calculate the sample variance along the rows:
    console.log( variance( mat ).toString() );

    To run the example code from the top-level application directory,

    $ node ./examples/index.js

    References

    • 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.

    See Also

    Tests

    Unit

    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.

    Test Coverage

    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

    License

    MIT license.

    Copyright

    Copyright © 2015. The Compute.io Authors.

    Install

    npm i datasets-iris-virginica

    DownloadsWeekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Last publish

    Collaborators

    • avatar