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.interpolate CubicSpline.BoundaryConditions.Natural xData yData
// get function value at x=3.4
coefficients.Predict 3.4
Returns:
float -> float
Function that takes an x value and returns function value.
Returns function that takes x value (that lies within the range of input x values) and predicts the corresponding interpolating y value.
Only defined within the range of the given xValues!
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.interpolate CubicSpline.BoundaryConditions.Natural xData yData
// get function value at x=3.4
coefficients.PredictWithinRange 3.4