Version:

Loading TOC...

math.linearModelCoeff( $linear-model as math.linearModel ) as ValueIterator

Returns the coefficients of the linear model. Currently only simple linear regression model is supported so the return should contain only one coefficient (also called "slope").

Parameters | |
---|---|

$linear-model | A linear model. |

var arr = new Array(); for (i=1; i < 11; i++) { var x = new Array(); var j = 2 * i + 1; x.push(j, i); arr.push(x); }; var lm = math.linearModel(xdmp.arrayValues(arr)); math.linearModelCoeff(lm); => 2

Copyright © 2017 MarkLogic Corporation. MARKLOGIC is a
registered trademark of MarkLogic Corporation.

## Comments