## Index

### Type aliases

- TestTrainOutput
- TestTrainTuple
- TrainTestSplitOptions

### Variables

- GridSearch

### Functions

- cross_validate_score
- cross_validation_split
- grid_search
- train_test_split

### Object literals

- cross_validation

## Type aliases

### TestTrainOutput

TestTrainOutput: { test: Data; train: Data }

- Defined in cross_validation.ts:19

#### Type declaration

- ##### test: Data

- ##### train: Data

### TestTrainTuple

TestTrainTuple: [Data, Data]

- Defined in cross_validation.ts:18

### TrainTestSplitOptions

TrainTestSplitOptions: { parse_int_train_size?: undefined | false | true; random_state?: undefined | number; return_array?: undefined | false | true; test_size?: undefined | number; train_size?: undefined | number }

- Defined in cross_validation.ts:10

#### Type declaration

- ##### Optional parse_int_train_size?: undefined | false | true

- ##### Optional random_state?: undefined | number

- ##### Optional return_array?: undefined | false | true

- ##### Optional test_size?: undefined | number

- ##### Optional train_size?: undefined | number

## Variables

### GridSearch

GridSearch: any

- Defined in cross_validation.ts:8

## Functions

### cross_validate_score

- cross_validate_score(options?: {}): any[]

- - Defined in cross_validation.ts:113

  Used to test variance and bias of a prediction

  memberof

    cross_validation

  #### Parameters

  - ##### Default value options: {} = {}

  #### Returns any[]

  Array of accucracy calculations

### cross_validation_split

- cross_validation_split(dataset?: never[], options?: { folds: number; random_state: number }): {}[][]

- - Defined in cross_validation.ts:79

  Provides train/test indices to split data in train/test sets. Split dataset into k consecutive folds. Each fold is then used once as a validation while the k - 1 remaining folds form the training set.

  memberof

    cross_validation

  example

    const testArray = [20, 25, 10, 33, 50, 42, 19, 34, 90, 23, ]; // [ [ 50, 20, 34, 33, 10 ], [ 23, 90, 42, 19, 25 ] ] const crossValidationArrayKFolds = ms.cross_validation.cross_validation_split(testArray, { folds: 2, random_state: 0, });

  #### Parameters

  - ##### Default value dataset: never[] = []

    array of data to split

  - ##### Default value options: { folds: number; random_state: number } = {folds: 3,random_state: 0,}

    - ##### folds: number

    - ##### random_state: number

  #### Returns {}[][]

  returns dataset split into k consecutive folds

### grid_search

- grid_search(options?: any): any

- - Defined in cross_validation.ts:200

  Used to test variance and bias of a prediction with parameter tuning

  memberof

    cross_validation

  #### Parameters

  - ##### Default value options: any = {}

  #### Returns any

  Array of accucracy calculations

### train_test_split

- train_test_split(dataset?: Data, options?: TrainTestSplitOptions): {}[][] | { test: {}[]; train: {}[] }

- - Defined in cross_validation.ts:36

  Split arrays into random train and test subsets

  memberof

    cross_validation

  example

    const testArray = [20, 25, 10, 33, 50, 42, 19, 34, 90, 23, ]; // { train: [ 50, 20, 34, 33, 10, 23, 90, 42 ], test: [ 25, 19 ] } const trainTestSplit = ms.cross_validation.train_test_split(testArray,{ test_size:0.2, random_state: 0, });

  #### Parameters

  - ##### Default value dataset: Data = []

    array of data to split

  - ##### Default value options: TrainTestSplitOptions = {test_size: 0.2,train_size: 0.8,random_state: 0,return_array: false,parse_int_train_size: true,}

  #### Returns {}[][] | { test: {}[]; train: {}[] }

  returns training and test arrays either as an object or arrays

## Object literals

### Const cross_validation

cross_validation: object

- Defined in cross_validation.ts:244

see

  https://machinelearningmastery.com/implement-resampling-methods-scratch-python/

### GridSearch

GridSearch: any

- Defined in cross_validation.ts:250

### cross_validate_score

cross_validate_score: cross_validate_score

- Defined in cross_validation.ts:248

### cross_validation_split

cross_validation_split: cross_validation_split

- Defined in cross_validation.ts:246

### grid_search

grid_search: grid_search

- Defined in cross_validation.ts:249

### kfolds

kfolds: cross_validation_split = cross_validation_split

- Defined in cross_validation.ts:247

### train_test_split

train_test_split: train_test_split

- Defined in cross_validation.ts:245