Loading TOC...

MarkLogic 10 Product Documentation
math:linear-model-intercept

math:linear-model-intercept(
   $linear-model as math:linear-model
) as xs:double

Summary

Returns the intercept of the linear model.

Parameters
linear-model A linear model.

Example

  let $array :=
    for $i in (1 to 10)
    let $j := 2*$i + 1
    return json:to-array(($j,$i))
  let $lm := math:linear-model($array)
  return math:linear-model-intercept($lm)

  => 1

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.