# ml-dataset-iris

> Iris flower data set

Latest version **1.2.1** (published 2021-09-09) · MIT license · 0 weekly downloads

## Install

```sh
npm install ml-dataset-iris
pnpm add ml-dataset-iris
yarn add ml-dataset-iris
bun add ml-dataset-iris
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.2.1 |
| Published | 2021-09-09 |
| First published | 2016-05-31 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 76.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 6 |
| Author | Michaël Zasso |
| Maintainers | stropitek, targos, lpatiny, mljs-bot, maasencioh, jeffersonh44, andcastillo |

## Links

- npm: https://www.npmjs.com/package/ml-dataset-iris
- Repository: https://github.com/mljs/dataset-iris
- Homepage: https://github.com/mljs/dataset-iris#readme
- Issues: https://github.com/mljs/dataset-iris/issues
- npm.io page: https://npm.io/package/ml-dataset-iris

## Recent versions

- 1.2.1 (latest) — 2021-09-09
- 1.2.0 — 2021-09-09
- 1.1.1 — 2019-08-02
- 1.1.0 — 2019-08-02
- 1.0.0 — 2016-05-31

## README

# dataset-iris

[![NPM version][npm-image]][npm-url]
[![build status][ci-image]][ci-url]
[![Test coverage][codecov-image]][codecov-url]
[![npm download][download-image]][download-url]

Iris flower data set.

## Installation

`$ npm i ml-dataset-iris`

## Usage

```js
import {
  getClasses,
  getClassesAsNumber,
  getCrossValidationSets,
  getDataset,
  getDistinctClasses,
  getNumbers,
} from 'ml-dataset-iris';

const dataset = getDataset();
console.log(dataset[0]) // [5.1, 3.5, 1.4, 0.2, 'setosa']

const numbers = getNumbers();
console.log(numbers[0]) // [5.1, 3.5, 1.4, 0.2]

const classes = getClasses();
console.log(classes[0]) // setosa

const classes = getClassesAsNumber();
console.log(classes[0]) // 0
console.log(classes[50]) // 1
console.log(classes[100]) // 2

const distinctClasses = iris.getDistinctClasses();
console.log(distinctClasses) // ['setosa', 'versicolor', 'virginica']

const cvSetsByFolds = iris.getCrossValidationSets(7, { idx: 1, by: 'folds' });
console.log(cvSetsByFolds.length) // 7

```

## License

[MIT](./LICENSE)

[npm-image]: https://img.shields.io/npm/v/ml-dataset-iris.svg
[npm-url]: https://www.npmjs.com/package/ml-dataset-iris
[ci-image]: https://github.com/mljs/dataset-iris/workflows/Node.js%20CI/badge.svg?branch=main
[ci-url]: https://github.com/mljs/dataset-iris/actions?query=workflow%3A%22Node.js+CI%22
[codecov-image]: https://img.shields.io/codecov/c/github/mljs/dataset-iris.svg
[codecov-url]: https://codecov.io/gh/mljs/dataset-iris
[download-image]: https://img.shields.io/npm/dm/ml-dataset-iris.svg
[download-url]: https://www.npmjs.com/package/ml-dataset-iris

---
_Source: https://npm.io/package/ml-dataset-iris · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
