datasets.Iris
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
})();
Constructors
Methods
Constructors
constructor
⊕ Iris()
Defined in
Parameters:
Param | Type | Default | Description |
---|
Returns: Iris
Methods
λ fsLoad
Load data from the local data folder
Defined in datasets/BaseDataset.ts:65
Parameters:
Param | Type | Default | Description |
---|---|---|---|
type | string | ||
options.delimiter | string | ',' | |
options.lastIsTarget | true | ||
options.targetType | string | 'float' | |
options.trainType | string | 'float' |
Returns:
🤘 Promise
Param | Type | Description |
---|---|---|
data | any | undefined |
labels | any | undefined |
targets | any | undefined |
λ load
Load datasets
Defined in datasets/Iris.ts:38
Returns:
🤘 Promise
Param | Type | Description |
---|---|---|
data | any[][] | Training data |
description | string | Dataset description |
labels | string[] | Real labels |
targetNames | string[] | Short labels |
targets | any[] | Target data |