dataset-metadata
a class to manipulate metadata for statistical analysis
Installation
$ npm i dataset-metadata
API Documentation
Examples
to import the package use
const METADATA = ;
or
;
to create a metadata object use
;const metadata = ;let L = metadata headers: 'iris' ;
this will create an array with the class of the famous iris dataset and create a METADATA object L.
List all the available metadata
L
returns an array with all the metadata headers.
Retrieve information (number of classes, counts for each classes) about a particular metadata using
L;
Retrieve values of a particular metadata as a Matrix object. This will coerce any string class into a Matrix of number with first class being "0", second being "1", etc.
Lvalues
For supervised method it is usual to sample a class to get a training set and a test set.
L
returns an object with four arrays: trainIndex, testIndex, mask (a boolean filter), and classVector (the original class).
To append another metadata.
let newMetadata = metadata;L;
To remove the duplicated metadata.
L;
Import and export METADATA object.
let L = metadata headers: 'iris' ; L = JSON; let newL = METADATA;