datasets.Iris

The Iris flower data set or Fisher's Iris data set is a multivariate data set introduced by the British statistician and biologist Ronald Fisher in his 1936 paper The use of multiple measurements in taxonomic problems as an example of linear discriminant analysis. It contains 50 samples with 3 classes of 'Setosa', 'versicolor' and 'virginica'

Note: This API is not available on the browsers

Usage

import { Iris } from 'machinelearn/datasets';

(async function() {
  const irisData = new Iris();
  const {
    data,         // returns the iris data (X)
    targets,      // list of target values (y)
    labels,       // list of labels
    targetNames,  // list of short target labels
    description   // dataset description
  } = await irisData.load(); // loads the data internally
})();

Methods

Methods


λ load

Load datasets

Defined in datasets/Iris.ts:38

Returns:

🤘 Promise

ParamTypeDescription
dataany[][]Training data
descriptionstringDataset description
labelsstring[]Real labels
targetNamesstring[]Short labels
targetsany[]Target data