Header menu logo FSharp.Stats

HermiteCoef Type

Record fields

Record Field Description

Slopes

Full Usage: Slopes

Field type: Vector<float>

First order spline coefficients, slopes at knots

Field type: Vector<float>

XValues

Full Usage: XValues

Field type: Vector<float>

sample points, sorted ascending

Field type: Vector<float>

YValues

Full Usage: YValues

Field type: Vector<float>

Zero order spline coefficients, intersects, y values

Field type: Vector<float>

Instance members

Instance member Description

this.Predict

Full Usage: this.Predict

Returns: float -> float Function that takes an x value and returns function value.

Returns function that takes x value and predicts the corresponding interpolating y value.

x values outside of the xValue range are predicted by straight lines defined by the nearest knot!

Returns: float -> float

Function that takes an x value and returns function value.

Example

 
 // e.g. days since a certain event
 let xData = vector [|0.;1.;5.;4.;3.;|]
 // some measured feature
 let yData = vector [|1.;5.;4.;13.;17.|]
 
 // get coefficients for piecewise interpolating cubic polynomials
 let coefficients = 
     CubicSpline.Hermite.interpolate xData yData

 // get function value at x=3.4
 coefficients.Predict 3.4
val xData: obj
val yData: obj
val coefficients: obj

Static members

Static member Description

HermiteCoef.Create(xValues) (yValues) (slopes)

Full Usage: HermiteCoef.Create(xValues) (yValues) (slopes)

Parameters:
    xValues : Vector<float>
    yValues : Vector<float>
    slopes : Vector<float>

Returns: HermiteCoef
xValues : Vector<float>
yValues : Vector<float>
slopes : Vector<float>
Returns: HermiteCoef

Type something to start searching.