MultipleLinearRegression
Extends:
@tensorscript/core~TensorScriptModelInterface → MultipleLinearRegression
Implements:
- TensorScriptModelInterface
Mulitple Linear Regression with Tensorflow
Constructor Summary
| Public Constructor | ||
| public |
constructor(options: Object, properties: *) |
|
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, properties: *) source
Params:
| Name | Type | Attribute | Description |
| options | Object | tensorflow model hyperparameters |
|
| properties | * | extra instance properties |
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 |
