    import {MultipleLinearRegression} from '@tensorscript/ts-mlr/lib/mlr.mjs'

public class | source

# MultipleLinearRegression

#### Extends:

@tensorscript/core~TensorScriptModelInterface → MultipleLinearRegression

#### Implements:

- TensorScriptModelInterface

Mulitple Linear Regression with Tensorflow

## Constructor Summary

Public Constructor
public | constructor(options: Object, customTF: Object) |

## Member Summary

Public Members
public | model |
public | xShape |
public | yShape |

## Method Summary

Public Methods
public | calculate(matrix: Array<Array<number>>|Array<number>): {data: Promise} Predicts new dependent variables |
public | async train(x_matrix: Array<Array<number>>, y_matrix: Array<Array<number>>): Object Asynchronously trains tensorflow model |

## Public Constructors

### public constructor(options: Object, customTF: Object) source

#### Params:

Name | Type | Attribute | Description
options | Object |  | tensorflow model hyperparameters
customTF | Object |  | custom tensorflow module: tensorflow / tensorflow-node / tensorflow-node-gpu

## Public Members

### public model source

### public xShape source

### public yShape source

## Public Methods

### public calculate(matrix: Array<Array<number>>|Array<number>): {data: Promise} source

Predicts new dependent variables

#### Params:

Name | Type | Attribute | Description
matrix | Array<Array<number>>|Array<number> |  | new test independent variables

#### Return:

{data: Promise} | returns tensorflow prediction

### public async train(x_matrix: Array<Array<number>>, y_matrix: Array<Array<number>>): Object source

Asynchronously trains tensorflow model

#### Params:

Name | Type | Attribute | Description
x_matrix | Array<Array<number>> |  | independent variables
y_matrix | Array<Array<number>> |  | dependent variables

#### Return:

Object | returns trained tensorflow model