Fitting

Binder Notebook

Summary: this tutorial will walk through several ways of fitting data with FSharp.Stats.

Table of contents

Linear Regression

In Linear Regression a linear system of equations is generated. The coefficients obtained by the solution to this equation system minimize the squared distances from the regression curve to the data points. These distances are also known as residuals (or least squares).

Summary

With the FSharp.Stats.Fitting.LinearRegression module you can apply various regression methods. A LinearRegression type provides many common methods for fitting two- or multi dimensional data. These include

  • Simple linear regression (fitting a straight line to the data)
  • Polynomial regression (fitting a polynomial of specified order/degree) to the data
  • Robust regression (fitting a straight line to the data and ignoring outliers)

The following code snippet summarizes many regression methods. In the following sections, every method is discussed in detail!

open Plotly.NET
open FSharp.Stats
open FSharp.Stats.Fitting

let testDataX = vector [|1. .. 10.|]

let testDataY = vector [|0.;-1.;0.;0.;0.;0.;1.;1.;3.;3.5|]


let coefSimpL    = LinearRegression.fit(testDataX, testDataY, FittingMethod = Method.SimpleLinear) // simple linear regression with a straight line through the data
let coefSimpLRTO = LinearRegression.fit(testDataX, testDataY, FittingMethod = Method.SimpleLinear,Constraint = Constraint.RegressionThroughOrigin) // simple linear regression with a straight line through the origin (0,0)
let coefSimpLXY  = LinearRegression.fit(testDataX, testDataY, FittingMethod = Method.SimpleLinear,Constraint = Constraint.RegressionThroughXY (9.,1.)) // simple linear regression with a straight line through the coordinate 9,1.
let coefPoly_1   = LinearRegression.fit(testDataX, testDataY, FittingMethod = Method.Polynomial 1) // fits a polynomial of degree 1 (equivalent to simple linear regression)
let coefPoly_2   = LinearRegression.fit(testDataX, testDataY, FittingMethod = Method.Polynomial 2) // fits a quadratic polynomial
let coefPoly_3   = LinearRegression.fit(testDataX, testDataY, FittingMethod = Method.Polynomial 3) // fits a cubic polynomial
let coefPoly_3w  = LinearRegression.fit(testDataX, testDataY, FittingMethod = Method.Polynomial 3, Weighting = (vector [1.;1.;1.;1.;2.;2.;2.;10.;1.;1.])) // fits a cubic polynomial with weighted points
let coefRobTh    = LinearRegression.fit(testDataX, testDataY, FittingMethod = Method.Robust RobustEstimator.Theil) // fits a straight line that is insensitive to outliers
let coefRobThSen = LinearRegression.fit(testDataX, testDataY, FittingMethod = Method.Robust RobustEstimator.TheilSen) // fits a straight line that is insensitive to outliers

// f(x) = -0.167 + -0.096x + -0.001x^2 + 0.005x^3
let functionStringPoly3 = coefPoly_3.ToString()

let regressionComparison =
    [
        Chart.Point(testDataX,testDataY,Name="data")
        [1. .. 0.01 .. 10.] |> List.map (fun x -> x,LinearRegression.predict(coefSimpL   ) x)  |> Chart.Line |> Chart.withTraceInfo "SimpL"
        [1. .. 0.01 .. 10.] |> List.map (fun x -> x,LinearRegression.predict(coefSimpLRTO) x)  |> Chart.Line |> Chart.withTraceInfo "SimpL Origin"
        [1. .. 0.01 .. 10.] |> List.map (fun x -> x,LinearRegression.predict(coefSimpLXY ) x)  |> Chart.Line |> Chart.withTraceInfo "SimpL 9,1"
        [1. .. 0.01 .. 10.] |> List.map (fun x -> x,LinearRegression.predict(coefPoly_1  ) x)  |> Chart.Line |> Chart.withTraceInfo "Poly 1"
        [1. .. 0.01 .. 10.] |> List.map (fun x -> x,LinearRegression.predict(coefPoly_2  ) x)  |> Chart.Line |> Chart.withTraceInfo "Poly 2"
        [1. .. 0.01 .. 10.] |> List.map (fun x -> x,LinearRegression.predict(coefPoly_3  ) x)  |> Chart.Line |> Chart.withTraceInfo "Poly 3"
        [1. .. 0.01 .. 10.] |> List.map (fun x -> x,LinearRegression.predict(coefPoly_3w ) x)  |> Chart.Line |> Chart.withTraceInfo "Poly 3 weight"
        [1. .. 0.01 .. 10.] |> List.map (fun x -> x,LinearRegression.predict(coefRobTh   ) x)  |> Chart.Line |> Chart.withTraceInfo "Robust Theil"
        [1. .. 0.01 .. 10.] |> List.map (fun x -> x,LinearRegression.predict(coefRobThSen) x)  |> Chart.Line |> Chart.withTraceInfo "Robust TheilSen"
    ]
    |> Chart.combine
    |> Chart.withTemplate ChartTemplates.lightMirrored
    |> Chart.withAnnotation(LayoutObjects.Annotation.init(X = 9.5,Y = 3.1,XAnchor = StyleParam.XAnchorPosition.Right,Text = functionStringPoly3))  
    |> Chart.withXAxisStyle("x data")
    |> Chart.withYAxisStyle("y data")
    |> Chart.withSize(800.,600.)

Simple Linear Regression

Simple linear regression aims to fit a straight regression line to the data. While the least squares approach efficiently minimizes the sum of squared residuals it is prone to outliers. An alternative is a robust simple linear regression like Theil's incomplete method or the Theil-Sen estimator, that are outlier resistant.

Univariable

open Plotly.NET
open FSharp.Stats
open FSharp.Stats.Fitting.LinearRegression

let xData = vector [|1. .. 10.|]
let yData = vector [|4.;7.;9.;12.;15.;17.;16.;23.;5.;30.|]

//Least squares simple linear regression
let coefficientsLinearLS = 
    OLS.Linear.Univariable.fit xData yData
let predictionFunctionLinearLS x = 
    OLS.Linear.Univariable.predict coefficientsLinearLS x

//Robust simple linear regression
let coefficientsLinearRobust = 
    RobustRegression.Linear.theilSenEstimator xData yData 
let predictionFunctionLinearRobust x = 
    RobustRegression.Linear.predict coefficientsLinearRobust x

//least squares simple linear regression through the origin
let coefficientsLinearRTO = 
    OLS.Linear.RTO.fitOfVector xData yData 
let predictionFunctionLinearRTO x = 
    OLS.Linear.RTO.predict coefficientsLinearRTO x



let rawChart = 
    Chart.Point(xData,yData)
    |> Chart.withTraceInfo "raw data"
    
let predictionLS = 
    let fit = 
        [|0. .. 11.|] 
        |> Array.map (fun x -> x,predictionFunctionLinearLS x)
    Chart.Line(fit)
    |> Chart.withTraceInfo "least squares (LS)"

let predictionRobust = 
    let fit = 
        [|0. .. 11.|] 
        |> Array.map (fun x -> x,predictionFunctionLinearRobust x)
    Chart.Line(fit)
    |> Chart.withTraceInfo "TheilSen estimator"

let predictionRTO = 
    let fit = 
        [|0. .. 11.|] 
        |> Array.map (fun x -> x,predictionFunctionLinearRTO x)
    Chart.Line(fit)
    |> Chart.withTraceInfo "LS through origin"

let simpleLinearChart =
    [rawChart;predictionLS;predictionRTO;predictionRobust;] 
    |> Chart.combine
    |> Chart.withTemplate ChartTemplates.lightMirrored

Multivariable

//Multivariate simple linear regression
let xVectorMulti =
    [
    [1.; 1. ;2.  ]
    [2.; 0.5;6.  ]
    [3.; 0.8;10. ]
    [4.; 2. ;14. ]
    [5.; 4. ;18. ]
    [6.; 3. ;22. ]
    ]
    |> Matrix.ofJaggedSeq

let yVectorMulti = 
    let transformX (x:Matrix<float>) =
        x
        |> Matrix.mapiRows (fun _ v -> 100. + (v.[0] * 2.5) + (v.[1] * 4.) + (v.[2] * 0.5))
    xVectorMulti
    |> transformX
    |> vector

let coefficientsMV = 
    OLS.Linear.Multivariable.fit xVectorMulti yVectorMulti
let predictionFunctionMV x = 
    OLS.Linear.Multivariable.predict coefficientsMV x

Polynomial Regression

In polynomial regression a higher degree (d > 1) polynomial is fitted to the data. The coefficients are chosen that the sum of squared residuals is minimized.

open FSharp.Stats
open FSharp.Stats.Fitting.LinearRegression

let xDataP = vector [|1. .. 10.|]
let yDataP = vector [|4.;7.;9.;8.;6.;3.;2.;5.;6.;8.;|]

//Least squares polynomial regression

//define the order the polynomial should have (order 3: f(x) = ax^3 + bx^2 + cx + d)
let order = 3
let coefficientsPol = 
    OLS.Polynomial.fit order xDataP yDataP 
let predictionFunctionPol x = 
    OLS.Polynomial.predict coefficientsPol x

//weighted least squares polynomial regression
//If heteroscedasticity is assumed or the impact of single datapoints should be 
//increased/decreased you can use a weighted version of the polynomial regression.

//define the order the polynomial should have (order 3: f(x) = ax^3 + bx^2 + cx + d)
let orderP = 3

//define the weighting vector
let weights = yDataP |> Vector.map (fun y -> 1. / y)
let coefficientsPolW = 
    OLS.Polynomial.fitWithWeighting orderP weights xDataP yDataP 
let predictionFunctionPolW x = 
    OLS.Polynomial.predict coefficientsPolW x

let rawChartP = 
    Chart.Point(xDataP,yDataP)
    |> Chart.withTraceInfo "raw data"
    
let fittingPol = 
    let fit = 
        [|1. .. 0.1 .. 10.|] 
        |> Array.map (fun x -> x,predictionFunctionPol x)
    Chart.Line(fit)
    |> Chart.withTraceInfo "order = 3"

let fittingPolW = 
    let fit = 
        [|1. .. 0.1 .. 10.|] 
        |> Array.map (fun x -> x,predictionFunctionPolW x)
    Chart.Line(fit)
    |> Chart.withTraceInfo "order = 3 weigthed"

let polRegressionChart =
    [rawChartP;fittingPol;fittingPolW] 
    |> Chart.combine
    |> Chart.withTemplate ChartTemplates.lightMirrored

Nonlinear Regression

Nonlinear Regression is used if a known model should be fitted to the data that cannot be represented in a linear system of equations. Common examples are:

  • gaussian functions
  • log functions
  • exponential functions

To fit such models to your data the NonLinearRegression module can be used. Three solver-methods are available to iteratively converge to a minimal least squares value.

  • GaussNewton
  • LevenbergMarquardt
  • LevenbergMarquardtConstrained

For solving a nonlinear problem the model function has to be converted to a NonLinearRegression.Model type consisting of

  • parameter names,
  • the function itself, and
  • partial derivatives of all unknown parameters.

For clarification a exponential relationship in the form of y = a * exp(b * x) should be solved:

open System
open FSharp.Stats.Fitting
open FSharp.Stats.Fitting.LinearRegression
open FSharp.Stats.Fitting.NonLinearRegression

let xDataN = [|1.;2.; 3.; 4.|]
let yDataN = [|5.;14.;65.;100.|]

//search for:  y = a * exp(b * x)

// 1. create the model
// 1.1 define parameter names
let parameterNames = [|"a";"b"|]

// 1.2 define the exponential function that gets a parameter vector containing the 
//searched parameters and the x value and gives the corresponding y value
let getFunctionValue =                 
    fun (parameterVector: Vector<float>) x -> 
        parameterVector.[0] * Math.Exp(parameterVector.[1] * x)
      //a                   *      exp(b                   * x)

// 1.3 Define partial derivatives of the exponential function. 
//     Take partial derivatives for every unknown parameter and
//     insert it into the gradient vector sorted by parameterNames.
let getGradientValues =
    fun (parameterVector:Vector<float>) (gradientVector: Vector<float>) xValueN -> 
        // partial derivative of y=a*exp(b*x) in respect to the first parameter (a)   --> exp(b*x)
        gradientVector.[0] <- Math.Exp(parameterVector.[1] * xValueN)  
        // partial derivative of y=a*exp(b*x) in respect to the second parameter (b)  --> a*x*exp(b*x)
        gradientVector.[1] <- parameterVector.[0] * xValueN * Math.Exp(parameterVector.[1] * xValueN)  

        gradientVector

// 1.4 create the model
let model = createModel parameterNames getFunctionValue getGradientValues

// 2. define the solver options
// 2.1 define the stepwidth of the x value change
let deltaX = 0.0001

// 2.2 define the stepwidth of the parameter change
let deltaP = 0.0001

// 2.3 define the number of iterations
let k = 1000

// 2.4 define an initial guess
//     For many problems you can set a default value or let the user decide to choose an 
//     appropriate guess. In the case of an exponential or log model you can use the 
//     solution of the linearized problem as a first guess.
let initialParamGuess (xData:float []) (yData:float [])=
    //gets the linear representation of the problem and solves it by simple linear regression 
    //(prone to least-squares-deviations at high y_Values)
    let yLn = yData |> Array.map (fun x -> Math.Log(x)) |> vector
    let linearReg = 
        LinearRegression.OLS.Linear.Univariable.fit (vector xData) yLn
    //calculates the parameters back into the exponential representation
    let a = exp linearReg.[0]
    let b = linearReg.[1]
    [|a;b|]

// 2.5 create the solverOptions
let solverOptions = 
    let guess = initialParamGuess xDataN yDataN
    NonLinearRegression.createSolverOption 0.0001 0.0001 1000 guess

// 3. get coefficients
let coefficientsExp = GaussNewton.estimatedParams model solverOptions xDataN yDataN
//val coefficients = vector [|5.68867298; 0.7263428835|]

// 4. create fitting function
let fittingFunction x = coefficientsExp.[0] * Math.Exp(coefficientsExp.[1] * x)

let rawChartNLR = 
    Chart.Point(xDataN,yDataN)
    |> Chart.withTraceInfo "raw data"

let fittingNLR = 
    let fit = 
        [|1. .. 0.1 .. 10.|] 
        |> Array.map (fun x -> x,fittingFunction x)
    Chart.Line(fit)
    |> Chart.withTraceInfo "NLR"

let NLRChart =
    [rawChartNLR;fittingNLR] 
    |> Chart.combine
    |> Chart.withTemplate ChartTemplates.lightMirrored

LevenbergMarquardtConstrained

For nonlinear regression using the LevenbergMarquardtConstrained module, you have to follow similar steps as in the example shown above. In this example, a logistic function of the form y = L/(1+e^(-k(t-x))) should be fitted to count data:

open FSharp.Stats.Fitting.NonLinearRegression

let xHours = [|0.; 19.5; 25.5; 30.; 43.; 48.5; 67.75|]

let yCount = [|0.0; 2510000.0; 4926400.0; 9802600.0; 14949400.0; 15598800.0; 16382000.0|]

// 1. Choose a model
// The model we need already exists in FSharp.Stats and can be taken from the "Table" module.
let model' = Table.LogisticFunctionAscending

// 2. Define the solver options
// 2.1 Initial parameter guess
// The solver needs an initial parameter guess. This can be done by the user or with an estimator function.
// The cutoffPercentage says at which percentage of the y-Range the lower part of the slope is. 
// Manual curation of parameter guesses can be performed in this step by editing the param array.
let initialParamGuess' = LevenbergMarquardtConstrained.initialParam xHours yCount 0.1

// 2.2 Create the solver options
let solverOptions' = Table.lineSolverOptions initialParamGuess'

// 3. Estimate parameters for a possible solution based on residual sum of squares
// Besides the solverOptions, an upper and lower bound for the parameters are required.
// It is recommended to define them depending on the initial param guess
let lowerBound =
    initialParamGuess'
    |> Array.map (fun param ->
        // Initial paramters -20%
        param - (abs param) * 0.2
    )
    |> vector

let upperBound =
    initialParamGuess'
    |> Array.map (fun param ->
        param + (abs param) * 0.2
    )
    |> vector

let estParams =
    LevenbergMarquardtConstrained.estimatedParams model' solverOptions' 0.001 10. lowerBound upperBound xHours yCount

// 3.1 Estimate multiple parameters and pick the one with the least residual sum of squares (RSS)
// For a more "global" minimum. it is possible to estimate multiple possible parameters for different initial guesses.

//3.1.1 Generation of parameters with varying steepnesses
let multipleSolverOptions =
    LevenbergMarquardtConstrained.initialParamsOverRange xHours yCount [|0. .. 0.1 .. 2.|]
    |> Array.map Table.lineSolverOptions

let estParamsRSS =
    multipleSolverOptions
    |> Array.map (fun solvO ->
        let lowerBound =
            solvO.InitialParamGuess
            |> Array.map (fun param -> param - (abs param) * 0.2)
            |> vector
        let upperBound =
            solvO.InitialParamGuess
            |> Array.map (fun param -> param + (abs param) * 0.2)
            |> vector
        LevenbergMarquardtConstrained.estimatedParamsWithRSS 
            model' solvO 0.001 10. lowerBound upperBound xHours yCount
    )
    |> Array.minBy snd
    |> fst

// The result is the same as for 'estParams', but tupled with the corresponding RSS, which can be taken
// as a measure of quality for the estimate.

// 4. Create fitting function
let fittingFunction' = Table.LogisticFunctionAscending.GetFunctionValue estParamsRSS

let fittedY = Array.zip [|1. .. 68.|] ([|1. .. 68.|] |> Array.map fittingFunction')

let fittedLogisticFunc =
    [
    Chart.Point (Array.zip xHours yCount)
    |> Chart.withTraceInfo"Data Points"
    Chart.Line fittedY
    |> Chart.withTraceInfo "Fit"
    ]
    |> Chart.combine
    |> Chart.withTemplate ChartTemplates.lightMirrored    
    |> Chart.withXAxisStyle "Time"
    |> Chart.withYAxisStyle "Count"

Smoothing spline

A smoothing spline aims to minimize a function consisting of two error terms:

  • error1: sum of squared residuals

    • Similar to the OrdinaryLeastSquares regression this error term ensures the fidelity to the data.
  • error2: integral of the second derivative of the fitting function

    • This error term ensures the smoothness of the resulting curve.

A smoothing parameter (lambda) mediates between the two error terms.

  • E = error1 + (lambda * error2)

    • If lambda = 0, the resulting curve minimizes the sum of squared residuals and results in an interpolating curve.
    • If lambda = infinity, the resulting curve is punished by the smoothness measurement and results in a straight regression line.

The spline is constructed out of piecewise cubic polynomials that meet at knots. In the defined knots the function is continuous. Depending on the used smoothing factor and the defined knots the smoothing spline has a unique solution. The resulting curve is just defined within the interval defined in the x values of the data.

The right amount of smoothing can be determined by cross validation or generalized cross validation.

open FSharp.Stats.Fitting

let xDataS = [|1.;2.; 3.; 4.|]
let yDataS = [|5.;14.;65.;75.|]

let data = Array.zip xDataS yDataS

//in every x position a knot should be located
let knots = xDataS

let spline lambda x = (Spline.smoothingSpline data knots) lambda x

let fit lambda = 
    [|1. .. 0.1 .. 4.|]
    |> Array.map (fun x -> x,spline lambda x)
    |> Chart.Line
    |> Chart.withTraceInfo (sprintf "lambda: %.3f" lambda)

let rawChartS = Chart.Point(data)

let smoothingSplines =
    [
    rawChartS
    fit 0.001
    fit 0.02
    fit 1.
    ]
    |> Chart.combine
    |> Chart.withTemplate ChartTemplates.lightMirrored    
namespace Plotly
namespace Plotly.NET
module Defaults from Plotly.NET
<summary> Contains mutable global default values. Changing these values will apply the default values to all consecutive Chart generations. </summary>
val mutable DefaultDisplayOptions: DisplayOptions
Multiple items
type DisplayOptions = inherit DynamicObj new: unit -> DisplayOptions static member addAdditionalHeadTags: additionalHeadTags: XmlNode list -> (DisplayOptions -> DisplayOptions) static member addDescription: description: XmlNode list -> (DisplayOptions -> DisplayOptions) static member combine: first: DisplayOptions -> second: DisplayOptions -> DisplayOptions static member getAdditionalHeadTags: displayOpts: DisplayOptions -> XmlNode list static member getDescription: displayOpts: DisplayOptions -> XmlNode list static member getPlotlyReference: displayOpts: DisplayOptions -> PlotlyJSReference static member init: ?AdditionalHeadTags: XmlNode list * ?Description: XmlNode list * ?PlotlyJSReference: PlotlyJSReference -> DisplayOptions static member initCDNOnly: unit -> DisplayOptions ...

--------------------
new: unit -> DisplayOptions
static member DisplayOptions.init: ?AdditionalHeadTags: Giraffe.ViewEngine.HtmlElements.XmlNode list * ?Description: Giraffe.ViewEngine.HtmlElements.XmlNode list * ?PlotlyJSReference: PlotlyJSReference -> DisplayOptions
type PlotlyJSReference = | CDN of string | Full | Require of string | NoReference
<summary> Sets how plotly is referenced in the head of html docs. </summary>
union case PlotlyJSReference.NoReference: PlotlyJSReference
Multiple items
namespace FSharp

--------------------
namespace Microsoft.FSharp
namespace FSharp.Stats
namespace FSharp.Stats.Fitting
val testDataX: Vector<float>
Multiple items
val vector: l: seq<float> -> Vector<float>

--------------------
type vector = Vector<float>
val testDataY: Vector<float>
val coefSimpL: LinearRegression.Coefficients
Multiple items
module LinearRegression from FSharp.Stats.Fitting
<summary> Linear regression is used to estimate the relationship of one variable (y) with another (x) by expressing y in terms of a linear function of x. </summary>

--------------------
type LinearRegression = new: unit -> LinearRegression static member fit: xData: vector * yData: Vector<float> * ?FittingMethod: Method * ?Constraint: Constraint<float * float> * ?Weighting: vector -> Coefficients + 1 overload static member predict: coeff: Coefficients -> xValue: float -> float static member predictMultivariate: coeff: Coefficients -> xVector: vector -> float
<summary> This LinearRegression type summarized the most common fitting procedures. </summary>
<returns>Either linear regression coefficients or a prediction function to map x values/vectors to its corresponding y value.</returns>
<example><code> // e.g. days since experiment start let xData = vector [|1. .. 100.|] // e.g. plant size in cm let yData = vector [|4.;7.;8.;9.;7.;11.; ...|] // Estimate the intercept and slope of a line, that fits the data. let coefficientsSimpleLinear = LinearRegression.fit(xData,yData,FittingMethod=Fitting.Method.SimpleLinear,Constraint=Fitting.Constraint.RegressionThroughOrigin) // Predict the size on day 10.5 LinearRegression.predict(coefficientsSimpleLinear) 10.5 </code></example>


--------------------
new: unit -> LinearRegression
static member LinearRegression.fit: xData: matrix * yData: Vector<float> * ?FittingMethod: Method -> LinearRegression.Coefficients
static member LinearRegression.fit: xData: vector * yData: Vector<float> * ?FittingMethod: Method * ?Constraint: Constraint<float * float> * ?Weighting: vector -> LinearRegression.Coefficients
type Method = | SimpleLinear | Polynomial of int | Robust of RobustEstimator
<summary> Defines regression method. </summary>
union case Method.SimpleLinear: Method
<summary>Fits a straight line through two-, or multidimensional data (OLS).</summary>
val coefSimpLRTO: LinearRegression.Coefficients
type Constraint<'a> = | Unconstrained | RegressionThroughOrigin | RegressionThroughXY of 'a
<summary> Defines if regression function should pass any specific point. </summary>
<param name="'a">float*float coordinate</param>
union case Constraint.RegressionThroughOrigin: Constraint<'a>
<summary>The regression line must go through the origin (0,0)</summary>
val coefSimpLXY: LinearRegression.Coefficients
union case Constraint.RegressionThroughXY: 'a -> Constraint<'a>
<summary>The regression line must go through a specified point, defined as float*float tuple ('xCorrdinate*'yCoordinate)</summary>
<param name="'a">float*float coordinate</param>
val coefPoly_1: LinearRegression.Coefficients
union case Method.Polynomial: int -> Method
<summary>Fits a polynomial of the specified order (degree) to twodimensional data (OLS).</summary>
val coefPoly_2: LinearRegression.Coefficients
val coefPoly_3: LinearRegression.Coefficients
val coefPoly_3w: LinearRegression.Coefficients
val coefRobTh: LinearRegression.Coefficients
union case Method.Robust: RobustEstimator -> Method
<summary>Fits an outlier-insensitive straight line through twodimensional data (NOT OLS).</summary>
type RobustEstimator = | Theil | TheilSen
<summary> Defines method of slope estimation for robust line regression. </summary>
union case RobustEstimator.Theil: RobustEstimator
<summary>Theils incomplete method</summary>
val coefRobThSen: LinearRegression.Coefficients
union case RobustEstimator.TheilSen: RobustEstimator
<summary>Theil Sen estimator</summary>
val functionStringPoly3: string
override LinearRegression.Coefficients.ToString: unit -> string
val regressionComparison: GenericChart.GenericChart
type Chart = static member AnnotatedHeatmap: zData: seq<#seq<'a1>> * annotationText: seq<#seq<string>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?X: seq<'a3> * ?MultiX: seq<seq<'a3>> * ?XGap: int * ?Y: seq<'a4> * ?MultiY: seq<seq<'a4>> * ?YGap: int * ?Text: 'a5 * ?MultiText: seq<'a5> * ?ColorBar: ColorBar * ?ColorScale: Colorscale * ?ShowScale: bool * ?ReverseScale: bool * ?ZSmooth: SmoothAlg * ?Transpose: bool * ?UseWebGL: bool * ?ReverseYAxis: bool * ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a3 :> IConvertible and 'a4 :> IConvertible and 'a5 :> IConvertible) + 1 overload static member Area: x: seq<#IConvertible> * y: seq<#IConvertible> * ?ShowMarkers: bool * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: MarkerSymbol * ?MultiMarkerSymbol: seq<MarkerSymbol> * ?Marker: Marker * ?LineColor: Color * ?LineColorScale: Colorscale * ?LineWidth: float * ?LineDash: DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: Orientation * ?GroupNorm: GroupNorm * ?FillColor: Color * ?FillPatternShape: PatternShape * ?FillPattern: Pattern * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible) + 1 overload static member Bar: values: seq<#IConvertible> * ?Keys: seq<'a1> * ?MultiKeys: seq<seq<'a1>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerPatternShape: PatternShape * ?MultiMarkerPatternShape: seq<PatternShape> * ?MarkerPattern: Pattern * ?Marker: Marker * ?Base: #IConvertible * ?Width: 'a4 * ?MultiWidth: seq<'a4> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a2 :> IConvertible and 'a4 :> IConvertible) + 1 overload static member BoxPlot: ?X: seq<'a0> * ?MultiX: seq<seq<'a0>> * ?Y: seq<'a1> * ?MultiY: seq<seq<'a1>> * ?Name: string * ?ShowLegend: bool * ?Text: 'a2 * ?MultiText: seq<'a2> * ?FillColor: Color * ?MarkerColor: Color * ?Marker: Marker * ?Opacity: float * ?WhiskerWidth: float * ?BoxPoints: BoxPoints * ?BoxMean: BoxMean * ?Jitter: float * ?PointPos: float * ?Orientation: Orientation * ?OutlineColor: Color * ?OutlineWidth: float * ?Outline: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?Notched: bool * ?NotchWidth: float * ?QuartileMethod: QuartileMethod * ?UseDefaults: bool -> GenericChart (requires 'a0 :> IConvertible and 'a1 :> IConvertible and 'a2 :> IConvertible) + 2 overloads static member Bubble: x: seq<#IConvertible> * y: seq<#IConvertible> * sizes: seq<int> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: MarkerSymbol * ?MultiMarkerSymbol: seq<MarkerSymbol> * ?Marker: Marker * ?LineColor: Color * ?LineColorScale: Colorscale * ?LineWidth: float * ?LineDash: DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: Orientation * ?GroupNorm: GroupNorm * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible) + 1 overload static member Candlestick: ``open`` : seq<#IConvertible> * high: seq<#IConvertible> * low: seq<#IConvertible> * close: seq<#IConvertible> * ?X: seq<'a4> * ?MultiX: seq<seq<'a4>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?Text: 'a5 * ?MultiText: seq<'a5> * ?Line: Line * ?IncreasingColor: Color * ?Increasing: FinanceMarker * ?DecreasingColor: Color * ?Decreasing: FinanceMarker * ?WhiskerWidth: float * ?ShowXAxisRangeSlider: bool * ?UseDefaults: bool -> GenericChart (requires 'a4 :> IConvertible and 'a5 :> IConvertible) + 2 overloads static member Column: values: seq<#IConvertible> * ?Keys: seq<'a1> * ?MultiKeys: seq<seq<'a1>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerPatternShape: PatternShape * ?MultiMarkerPatternShape: seq<PatternShape> * ?MarkerPattern: Pattern * ?Marker: Marker * ?Base: #IConvertible * ?Width: 'a4 * ?MultiWidth: seq<'a4> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a2 :> IConvertible and 'a4 :> IConvertible) + 1 overload static member Contour: zData: seq<#seq<'a1>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?X: seq<'a2> * ?MultiX: seq<seq<'a2>> * ?Y: seq<'a3> * ?MultiY: seq<seq<'a3>> * ?Text: 'a4 * ?MultiText: seq<'a4> * ?ColorBar: ColorBar * ?ColorScale: Colorscale * ?ShowScale: bool * ?ReverseScale: bool * ?Transpose: bool * ?ContourLineColor: Color * ?ContourLineDash: DrawingStyle * ?ContourLineSmoothing: float * ?ContourLine: Line * ?ContoursColoring: ContourColoring * ?ContoursOperation: ConstraintOperation * ?ContoursType: ContourType * ?ShowContourLabels: bool * ?ContourLabelFont: Font * ?Contours: Contours * ?FillColor: Color * ?NContours: int * ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a2 :> IConvertible and 'a3 :> IConvertible and 'a4 :> IConvertible) static member Funnel: x: seq<#IConvertible> * y: seq<#IConvertible> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?Width: float * ?Offset: float * ?Text: 'a2 * ?MultiText: seq<'a2> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?Orientation: Orientation * ?AlignmentGroup: string * ?OffsetGroup: string * ?MarkerColor: Color * ?MarkerOutline: Line * ?Marker: Marker * ?TextInfo: TextInfo * ?ConnectorLineColor: Color * ?ConnectorLineStyle: DrawingStyle * ?ConnectorFillColor: Color * ?ConnectorLine: Line * ?Connector: FunnelConnector * ?InsideTextFont: Font * ?OutsideTextFont: Font * ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible) static member Heatmap: zData: seq<#seq<'a1>> * ?X: seq<'a2> * ?MultiX: seq<seq<'a2>> * ?Y: seq<'a3> * ?MultiY: seq<seq<'a3>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?XGap: int * ?YGap: int * ?Text: 'a4 * ?MultiText: seq<'a4> * ?ColorBar: ColorBar * ?ColorScale: Colorscale * ?ShowScale: bool * ?ReverseScale: bool * ?ZSmooth: SmoothAlg * ?Transpose: bool * ?UseWebGL: bool * ?ReverseYAxis: bool * ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a2 :> IConvertible and 'a3 :> IConvertible and 'a4 :> IConvertible) + 1 overload ...
static member Chart.Point: xy: seq<#System.IConvertible * #System.IConvertible> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'c * ?MultiText: seq<'c> * ?TextPosition: StyleParam.TextPosition * ?MultiTextPosition: seq<StyleParam.TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: StyleParam.Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: StyleParam.MarkerSymbol * ?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol> * ?Marker: TraceObjects.Marker * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: StyleParam.Orientation * ?GroupNorm: StyleParam.GroupNorm * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'c :> System.IConvertible)
static member Chart.Point: x: seq<#System.IConvertible> * y: seq<#System.IConvertible> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'c * ?MultiText: seq<'c> * ?TextPosition: StyleParam.TextPosition * ?MultiTextPosition: seq<StyleParam.TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: StyleParam.Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: StyleParam.MarkerSymbol * ?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol> * ?Marker: TraceObjects.Marker * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: StyleParam.Orientation * ?GroupNorm: StyleParam.GroupNorm * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'c :> System.IConvertible)
Multiple items
module List from FSharp.Stats
<summary> Module to compute common statistical measure on list </summary>

--------------------
module List from Microsoft.FSharp.Collections
<summary>Contains operations for working with values of type <see cref="T:Microsoft.FSharp.Collections.list`1" />.</summary>
<namespacedoc><summary>Operations for collections such as lists, arrays, sets, maps and sequences. See also <a href="https://docs.microsoft.com/dotnet/fsharp/language-reference/fsharp-collection-types">F# Collection Types</a> in the F# Language Guide. </summary></namespacedoc>


--------------------
type List = new: unit -> List static member geomspace: start: float * stop: float * num: int * ?IncludeEndpoint: bool -> float list static member linspace: start: float * stop: float * num: int * ?IncludeEndpoint: bool -> float list

--------------------
type List<'T> = | op_Nil | op_ColonColon of Head: 'T * Tail: 'T list interface IReadOnlyList<'T> interface IReadOnlyCollection<'T> interface IEnumerable interface IEnumerable<'T> member GetReverseIndex: rank: int * offset: int -> int member GetSlice: startIndex: int option * endIndex: int option -> 'T list static member Cons: head: 'T * tail: 'T list -> 'T list member Head: 'T member IsEmpty: bool member Item: index: int -> 'T with get ...
<summary>The type of immutable singly-linked lists.</summary>
<remarks>Use the constructors <c>[]</c> and <c>::</c> (infix) to create values of this type, or the notation <c>[1;2;3]</c>. Use the values in the <c>List</c> module to manipulate values of this type, or pattern match against the values directly. </remarks>
<exclude />


--------------------
new: unit -> List
val map: mapping: ('T -> 'U) -> list: 'T list -> 'U list
<summary>Builds a new collection whose elements are the results of applying the given function to each of the elements of the collection.</summary>
<param name="mapping">The function to transform elements from the input list.</param>
<param name="list">The input list.</param>
<returns>The list of transformed elements.</returns>
<example id="map-1"><code lang="fsharp"> let inputs = [ "a"; "bbb"; "cc" ] inputs |&gt; List.map (fun x -&gt; x.Length) </code> Evaluates to <c>[ 1; 3; 2 ]</c></example>
val x: float
static member LinearRegression.predict: coeff: LinearRegression.Coefficients -> xValue: float -> float
static member Chart.Line: xy: seq<#System.IConvertible * #System.IConvertible> * ?ShowMarkers: bool * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'c * ?MultiText: seq<'c> * ?TextPosition: StyleParam.TextPosition * ?MultiTextPosition: seq<StyleParam.TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: StyleParam.Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: StyleParam.MarkerSymbol * ?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol> * ?Marker: TraceObjects.Marker * ?LineColor: Color * ?LineColorScale: StyleParam.Colorscale * ?LineWidth: float * ?LineDash: StyleParam.DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: StyleParam.Orientation * ?GroupNorm: StyleParam.GroupNorm * ?Fill: StyleParam.Fill * ?FillColor: Color * ?FillPattern: TraceObjects.Pattern * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'c :> System.IConvertible)
static member Chart.Line: x: seq<#System.IConvertible> * y: seq<#System.IConvertible> * ?ShowMarkers: bool * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?TextPosition: StyleParam.TextPosition * ?MultiTextPosition: seq<StyleParam.TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: StyleParam.Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: StyleParam.MarkerSymbol * ?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol> * ?Marker: TraceObjects.Marker * ?LineColor: Color * ?LineColorScale: StyleParam.Colorscale * ?LineWidth: float * ?LineDash: StyleParam.DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: StyleParam.Orientation * ?GroupNorm: StyleParam.GroupNorm * ?Fill: StyleParam.Fill * ?FillColor: Color * ?FillPattern: TraceObjects.Pattern * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'a2 :> System.IConvertible)
static member Chart.withTraceInfo: ?Name: string * ?Visible: StyleParam.Visible * ?ShowLegend: bool * ?LegendRank: int * ?LegendGroup: string * ?LegendGroupTitle: Title -> (GenericChart.GenericChart -> GenericChart.GenericChart)
static member Chart.combine: gCharts: seq<GenericChart.GenericChart> -> GenericChart.GenericChart
static member Chart.withTemplate: template: Template -> (GenericChart.GenericChart -> GenericChart.GenericChart)
module ChartTemplates from Plotly.NET
val lightMirrored: Template
static member Chart.withAnnotation: annotation: LayoutObjects.Annotation * ?Append: bool -> (GenericChart.GenericChart -> GenericChart.GenericChart)
namespace Plotly.NET.LayoutObjects
Multiple items
type Annotation = inherit DynamicObj new: unit -> Annotation static member init: ?X: #IConvertible * ?Y: #IConvertible * ?Align: AnnotationAlignment * ?ArrowColor: Color * ?ArrowHead: ArrowHead * ?ArrowSide: ArrowSide * ?ArrowSize: float * ?AX: #IConvertible * ?AXRef: #IConvertible * ?AY: #IConvertible * ?AYRef: #IConvertible * ?BGColor: Color * ?BorderColor: Color * ?BorderPad: int * ?BorderWidth: int * ?CaptureEvents: bool * ?ClickToShow: ClickToShow * ?Font: Font * ?Height: int * ?HoverLabel: Hoverlabel * ?HoverText: string * ?Name: string * ?Opacity: float * ?ShowArrow: bool * ?StandOff: int * ?StartArrowHead: int * ?StartArrowSize: float * ?StartStandOff: int * ?TemplateItemName: string * ?Text: string * ?TextAngle: float * ?VAlign: VerticalAlign * ?Visible: bool * ?Width: int * ?XAnchor: XAnchorPosition * ?XClick: #IConvertible * ?XRef: #IConvertible * ?XShift: int * ?YAnchor: YAnchorPosition * ?YClick: #IConvertible * ?YRef: #IConvertible * ?YShift: int -> Annotation static member style: ?X: #IConvertible * ?Y: #IConvertible * ?Align: AnnotationAlignment * ?ArrowColor: Color * ?ArrowHead: ArrowHead * ?ArrowSide: ArrowSide * ?ArrowSize: float * ?AX: #IConvertible * ?AXRef: #IConvertible * ?AY: #IConvertible * ?AYRef: #IConvertible * ?BGColor: Color * ?BorderColor: Color * ?BorderPad: int * ?BorderWidth: int * ?CaptureEvents: bool * ?ClickToShow: ClickToShow * ?Font: Font * ?Height: int * ?HoverLabel: Hoverlabel * ?HoverText: string * ?Name: string * ?Opacity: float * ?ShowArrow: bool * ?StandOff: int * ?StartArrowHead: int * ?StartArrowSize: float * ?StartStandOff: int * ?TemplateItemName: string * ?Text: string * ?TextAngle: float * ?VAlign: VerticalAlign * ?Visible: bool * ?Width: int * ?XAnchor: XAnchorPosition * ?XClick: #IConvertible * ?XRef: #IConvertible * ?XShift: int * ?YAnchor: YAnchorPosition * ?YClick: #IConvertible * ?YRef: #IConvertible * ?YShift: int -> (Annotation -> Annotation)
<summary> Text annotations inside a plot </summary>

--------------------
new: unit -> LayoutObjects.Annotation
static member LayoutObjects.Annotation.init: ?X: #System.IConvertible * ?Y: #System.IConvertible * ?Align: StyleParam.AnnotationAlignment * ?ArrowColor: Color * ?ArrowHead: StyleParam.ArrowHead * ?ArrowSide: StyleParam.ArrowSide * ?ArrowSize: float * ?AX: #System.IConvertible * ?AXRef: #System.IConvertible * ?AY: #System.IConvertible * ?AYRef: #System.IConvertible * ?BGColor: Color * ?BorderColor: Color * ?BorderPad: int * ?BorderWidth: int * ?CaptureEvents: bool * ?ClickToShow: StyleParam.ClickToShow * ?Font: Font * ?Height: int * ?HoverLabel: LayoutObjects.Hoverlabel * ?HoverText: string * ?Name: string * ?Opacity: float * ?ShowArrow: bool * ?StandOff: int * ?StartArrowHead: int * ?StartArrowSize: float * ?StartStandOff: int * ?TemplateItemName: string * ?Text: string * ?TextAngle: float * ?VAlign: StyleParam.VerticalAlign * ?Visible: bool * ?Width: int * ?XAnchor: StyleParam.XAnchorPosition * ?XClick: #System.IConvertible * ?XRef: #System.IConvertible * ?XShift: int * ?YAnchor: StyleParam.YAnchorPosition * ?YClick: #System.IConvertible * ?YRef: #System.IConvertible * ?YShift: int -> LayoutObjects.Annotation
argument X: float option
<summary> Init Annotation type </summary>
argument Y: float option
<summary> Init Annotation type </summary>
module StyleParam from Plotly.NET
type XAnchorPosition = | Auto | Left | Center | Right member Convert: unit -> obj override ToString: unit -> string static member convert: (XAnchorPosition -> obj) static member toString: (XAnchorPosition -> string)
union case StyleParam.XAnchorPosition.Right: StyleParam.XAnchorPosition
static member Chart.withXAxisStyle: ?TitleText: string * ?TitleFont: Font * ?TitleStandoff: int * ?Title: Title * ?Color: Color * ?AxisType: StyleParam.AxisType * ?MinMax: (#System.IConvertible * #System.IConvertible) * ?Mirror: StyleParam.Mirror * ?ShowSpikes: bool * ?SpikeColor: Color * ?SpikeThickness: int * ?ShowLine: bool * ?LineColor: Color * ?ShowGrid: bool * ?GridColor: Color * ?GridDash: StyleParam.DrawingStyle * ?ZeroLine: bool * ?ZeroLineColor: Color * ?Anchor: StyleParam.LinearAxisId * ?Side: StyleParam.Side * ?Overlaying: StyleParam.LinearAxisId * ?Domain: (float * float) * ?Position: float * ?CategoryOrder: StyleParam.CategoryOrder * ?CategoryArray: seq<#System.IConvertible> * ?RangeSlider: LayoutObjects.RangeSlider * ?RangeSelector: LayoutObjects.RangeSelector * ?BackgroundColor: Color * ?ShowBackground: bool * ?Id: StyleParam.SubPlotId -> (GenericChart.GenericChart -> GenericChart.GenericChart)
static member Chart.withYAxisStyle: ?TitleText: string * ?TitleFont: Font * ?TitleStandoff: int * ?Title: Title * ?Color: Color * ?AxisType: StyleParam.AxisType * ?MinMax: (#System.IConvertible * #System.IConvertible) * ?Mirror: StyleParam.Mirror * ?ShowSpikes: bool * ?SpikeColor: Color * ?SpikeThickness: int * ?ShowLine: bool * ?LineColor: Color * ?ShowGrid: bool * ?GridColor: Color * ?GridDash: StyleParam.DrawingStyle * ?ZeroLine: bool * ?ZeroLineColor: Color * ?Anchor: StyleParam.LinearAxisId * ?Side: StyleParam.Side * ?Overlaying: StyleParam.LinearAxisId * ?AutoShift: bool * ?Shift: int * ?Domain: (float * float) * ?Position: float * ?CategoryOrder: StyleParam.CategoryOrder * ?CategoryArray: seq<#System.IConvertible> * ?RangeSlider: LayoutObjects.RangeSlider * ?RangeSelector: LayoutObjects.RangeSelector * ?BackgroundColor: Color * ?ShowBackground: bool * ?Id: StyleParam.SubPlotId -> (GenericChart.GenericChart -> GenericChart.GenericChart)
static member Chart.withSize: width: float * height: float -> (GenericChart.GenericChart -> GenericChart.GenericChart)
static member Chart.withSize: ?Width: int * ?Height: int -> (GenericChart.GenericChart -> GenericChart.GenericChart)
module GenericChart from Plotly.NET
<summary> Module to represent a GenericChart </summary>
val toChartHTML: gChart: GenericChart.GenericChart -> string
val xData: Vector<float>
val yData: Vector<float>
val coefficientsLinearLS: Coefficients
module OLS from FSharp.Stats.Fitting.LinearRegressionModule
<summary> Ordinary Least Squares (OLS) regression aims to minimise the sum of squared y intercepts between the original and predicted points at each x value. </summary>
module Linear from FSharp.Stats.Fitting.LinearRegressionModule.OLS
<summary> Simple linear regression using straight lines: f(x) = a + bx. </summary>
module Univariable from FSharp.Stats.Fitting.LinearRegressionModule.OLS.Linear
<summary> Univariable handles two dimensional x,y data. </summary>
val fit: xData: Vector<float> -> yData: Vector<float> -> Coefficients
<summary> Calculates the intercept and slope for a straight line fitting the data. Linear regression minimizes the sum of squared residuals. </summary>
<param name="xData">vector of x values</param>
<param name="yData">vector of y values</param>
<returns>vector of [intercept; slope]</returns>
<example><code> // e.g. days since a certain event let xData = vector [|1.;2.;3.;4.;5.;6.|] // e.g. some measured feature let yData = vector [|4.;7.;9.;10.;11.;15.|] // Estimate the coefficients of a straight line fitting the given data let coefficients = Univariable.fit xData yData </code></example>
val predictionFunctionLinearLS: x: float -> float
val predict: coef: Coefficients -> x: float -> float
<summary> Takes intercept and slope of simple linear regression to predict the corresponding y value. </summary>
<param name="coef">vector of [intercept;slope] (e.g. determined by Univariable.coefficient)</param>
<param name="x">x value of which the corresponding y value should be predicted</param>
<returns>predicted y value with given coefficients at X=x</returns>
<example><code> // e.g. days since a certain event let xData = vector [|1.;2.;3.;4.;5.;6.|] // e.g. some measured feature let yData = vector [|4.;7.;9.;10.;11.;15.|] // Estimate the coefficients of a straight line fitting the given data let coefficients = Univariable.fit xData yData // Predict the feature at midnight between day 1 and 2. Univariable.predict coefficients 1.5 </code></example>
val coefficientsLinearRobust: Coefficients
module RobustRegression from FSharp.Stats.Fitting.LinearRegressionModule
<summary> Robust regression does not necessarily minimize the distance of the fitting function to the input data points (least squares), but has alternative aims (non-parametric). </summary>
module Linear from FSharp.Stats.Fitting.LinearRegressionModule.RobustRegression
<summary> Simple linear regression using straight lines: f(x) = a + bx. </summary>
val theilSenEstimator: xData: Vector<float> -> yData: Vector<float> -> Coefficients
<summary> Calculates simple linear regression coefficients using the Theil-Sen estimator in the form of [|intercept; slope;|]. Performs well if outlier corrupt the regression line. </summary>
<param name="xData">vector of x values</param>
<param name="yData">vector of y values</param>
<returns>vector of polynomial coefficients sorted as [intercept;constant;quadratic;...]</returns>
<example><code> // e.g. days since experiment start let xData = vector [|1. .. 100.|] // e.g. plant size in cm let yData = vector [|4.;7.;8.;9.;7.;11.; ...|] // Estimate the intercept and slope of a line, that fits the data. let coefficients = LinearRegression.RobustRegression.Linear.theilSenEstimator xData yData </code></example>
<remarks>Not robust if data count is low!</remarks>
val predictionFunctionLinearRobust: x: float -> float
val predict: coef: Coefficients -> x: float -> float
<summary> Takes vector of [intercept; slope] and x value to predict the corresponding y value </summary>
<param name="coef">vector of coefficients, sorted as [intercept;slope]</param>
<param name="x">x value of which the corresponding y value should be predicted</param>
<returns>predicted y value with given coefficients at X=x</returns>
<example><code> // e.g. days since experiment start let xData = vector [|1. .. 100.|] // e.g. plant size in cm let yData = vector [|4.;7.;8.;9.;7.;11.; ...|] // Estimate the intercept and slope of a line, that fits the data. let coefficients = LinearRegression.RobustRegression.Linear.theilEstimator xData yData // Predict the size on day 10.5 LinearRegression.RobustRegression.Linear.predict coefficients 10.5 </code></example>
<remarks>Equal to OLS.Linear.Univariable.predict!</remarks>
val coefficientsLinearRTO: Coefficients
module RTO from FSharp.Stats.Fitting.LinearRegressionModule.OLS.Linear
<summary> Fits straight regression lines through the origin f(x) = bx. </summary>
val fitOfVector: xData: Vector<float> -> yData: Vector<float> -> Coefficients
<summary> Calculates the slope of a regression line through the origin </summary>
<param name="xData">vector of x values</param>
<param name="yData">vector of y values</param>
<returns>Slope of the regression line through the origin</returns>
<example><code> // e.g. days since a certain event let xData = vector [|0.;1.;2.;3.;4.;5.;|] // some measured feature, that theoretically is zero at day 0 let yData = vector [|1.;5.;9.;13.;17.;18.;|] // Estimate the slope of the regression line. let coefficients = LinearRegression.OLS.Linear.fit xData yData </code></example>
val predictionFunctionLinearRTO: x: float -> float
val predict: coef: Coefficients -> x: float -> float
<summary> Predicts the y value for a given slope and x value (intercept=0) </summary>
<param name="coef">The functions slope</param>
<param name="x">x value of which the corresponding y value should be predicted</param>
<returns>predicted y value</returns>
<example><code> let mySlope = 17.8 // Returns predicted y value at x=6 using a line with intercept=0 and slope=17.8 LinearRegression.OLS.Linear.RTO.predict mySlope 6. </code></example>
val rawChart: GenericChart.GenericChart
val predictionLS: GenericChart.GenericChart
val fit: (float * float)[]
Multiple items
module Array from FSharp.Stats
<summary> Module to compute common statistical measure on array </summary>

--------------------
module Array from Microsoft.FSharp.Collections
<summary>Contains operations for working with arrays.</summary>
<remarks> See also <a href="https://docs.microsoft.com/dotnet/fsharp/language-reference/arrays">F# Language Guide - Arrays</a>. </remarks>


--------------------
type Array = new: unit -> Array static member geomspace: start: float * stop: float * num: int * ?IncludeEndpoint: bool -> float array static member linspace: start: float * stop: float * num: int * ?IncludeEndpoint: bool -> float[]

--------------------
new: unit -> Array
val map: mapping: ('T -> 'U) -> array: 'T[] -> 'U[]
<summary>Builds a new array whose elements are the results of applying the given function to each of the elements of the array.</summary>
<param name="mapping">The function to transform elements of the array.</param>
<param name="array">The input array.</param>
<returns>The array of transformed elements.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input array is null.</exception>
<example id="map-1"><code lang="fsharp"> let inputs = [| "a"; "bbb"; "cc" |] inputs |&gt; Array.map (fun x -&gt; x.Length) </code> Evaluates to <c>[| 1; 3; 2 |]</c></example>
val predictionRobust: GenericChart.GenericChart
val predictionRTO: GenericChart.GenericChart
val simpleLinearChart: GenericChart.GenericChart
val xVectorMulti: Matrix<float>
Multiple items
module Matrix from FSharp.Stats

--------------------
type Matrix<'T> = | DenseRepr of DenseMatrix<'T> | SparseRepr of SparseMatrix<'T> interface IMatrixFormattable interface IFsiFormattable interface IEnumerable interface IEnumerable<'T> interface IStructuralEquatable interface IStructuralComparable interface IComparable override Equals: yobj: obj -> bool member Format: rowStartCount: int * rowEndCount: int * columnStartCount: int * columnEndCount: int * showInfo: bool -> string + 2 overloads member FormatStrings: rowStartCount: int * rowEndCount: int * columnStartCount: int * columnEndCount: int -> string[][] ...
val ofJaggedSeq: xss: seq<#seq<float>> -> Matrix<float>
<summary> returns a dense matrix with the inner sequences of the input jagged sequences as its rows </summary>
val yVectorMulti: Vector<float>
val transformX: (Matrix<float> -> Vector<float>)
val x: Matrix<float>
Multiple items
val float: value: 'T -> float (requires member op_Explicit)
<summary>Converts the argument to 64-bit float. This is a direct conversion for all primitive numeric types. For strings, the input is converted using <c>Double.Parse()</c> with InvariantCulture settings. Otherwise the operation requires an appropriate static conversion method on the input type.</summary>
<param name="value">The input value.</param>
<returns>The converted float</returns>
<example id="float-example"><code lang="fsharp"></code></example>


--------------------
[<Struct>] type float = System.Double
<summary>An abbreviation for the CLI type <see cref="T:System.Double" />.</summary>
<category>Basic Types</category>


--------------------
type float<'Measure> = float
<summary>The type of double-precision floating point numbers, annotated with a unit of measure. The unit of measure is erased in compiled code and when values of this type are analyzed using reflection. The type is representationally equivalent to <see cref="T:System.Double" />.</summary>
<category index="6">Basic Types with Units of Measure</category>
val mapiRows: f: (int -> rowvec -> 'b) -> m: matrix -> Vector<'b>
<summary>Maps every matrix row using the position dependant function</summary>
<remarks></remarks>
<param name="f"></param>
<param name="m"></param>
<returns></returns>
<example><code></code></example>
val v: rowvec
val coefficientsMV: Coefficients
module Multivariable from FSharp.Stats.Fitting.LinearRegressionModule.OLS.Linear
<summary> Multivariable handles multi dimensional data where a vector of independent x values should be used to predict a single y value. </summary>
val fit: xData: Matrix<float> -> yData: Vector<float> -> Coefficients
<summary> Calculates the coefficients for a straight line fitting the data. Linear regression minimizes the sum of squared residuals. </summary>
<param name="xData">matrix of x vectors</param>
<param name="yData">vector of y values</param>
<returns>vector of linear coefficients</returns>
<example><code> let xVectorMulti = [ [1.; 1. ;2. ] [2.; 0.5;6. ] [3.; 0.8;10. ] [4.; 2. ;14. ] [5.; 4. ;18. ] [6.; 3. ;22. ] ] |&gt; Matrix.ofJaggedSeq // Here the x values are transformed. In most cases the y values are just provided. let yVectorMulti = let transformX (x) = x |&gt; Matrix.mapiRows (fun _ v -&gt; 100. + (v.[0] * 2.5) + (v.[1] * 4.) + (v.[2] * 0.5)) xVectorMulti |&gt; transformX |&gt; vector let coefficientsMV = Multivariable.fit xVectorMulti yVectorMulti </code></example>
val predictionFunctionMV: x: Vector<float> -> float
val x: Vector<float>
val predict: coef: Coefficients -> x: Vector<float> -> float
<summary> Takes linear coefficients and x vector to predict the corresponding y value. </summary>
<param name="coef">Coefficients from linear regression.</param>
<param name="c">x vector for which the y value should be predicted</param>
<returns>predicted y value with given coefficients at X=x</returns>
<example><code> let xVectorMulti = [ [1.; 1. ;2. ] [2.; 0.5;6. ] [3.; 0.8;10. ] [4.; 2. ;14. ] [5.; 4. ;18. ] [6.; 3. ;22. ] ] |&gt; Matrix.ofJaggedSeq // Here the x values are transformed. In most cases the y values are just provided. let yVectorMulti = let transformX (x) = x |&gt; Matrix.mapiRows (fun _ v -&gt; 100. + (v.[0] * 2.5) + (v.[1] * 4.) + (v.[2] * 0.5)) xVectorMulti |&gt; transformX |&gt; vector let coefficientsMV = Multivariable.fit xVectorMulti yVectorMulti let fittingFunctionMV x = Multivariable.predict coefficientsMV x </code></example>
val xDataP: Vector<float>
val yDataP: Vector<float>
val order: int
val coefficientsPol: Coefficients
module Polynomial from FSharp.Stats.Fitting.LinearRegressionModule.OLS
<summary> Linear regression using polynomials as regression function: f(x) = a + bx + cx^2 + .... </summary>
val fit: order: int -> xData: Vector<float> -> yData: Vector<float> -> Coefficients
<summary> Calculates the polynomial coefficients for polynomial regression. </summary>
<param name="order">order of the polynomial (1 = linear, 2 = quadratic, ... )</param>
<param name="xData">vector of x values</param>
<param name="yData">vector of y values</param>
<returns>vector of polynomial coefficients sorted as [intercept;constant;quadratic;...]</returns>
<example><code> // e.g. days since a certain event let xData = vector [|1.;2.;3.;4.;5.;6.|] // e.g. temperature measured at noon of the days specified in xData let yData = vector [|4.;7.;9.;8.;7.;9.;|] // Estimate the three coefficients of a quadratic polynomial. let coefficients = LinearRegression.OLS.Polynomial.fit 2 xData yData </code></example>
val predictionFunctionPol: x: float -> float
val predict: coef: Coefficients -> x: float -> float
<summary> Takes polynomial coefficients and x value to predict the corresponding y value. </summary>
<param name="order">order of the polynomial (1 = linear, 2 = quadratic, ... )</param>
<param name="coef">vector of polynomial coefficients (e.g. determined by Polynomial.coefficients), sorted as [intercept;constant;quadratic;...]</param>
<param name="x">x value of which the corresponding y value should be predicted</param>
<returns>predicted y value with given polynomial coefficients at X=x</returns>
<example><code> // e.g. days since a certain event let xData = vector [|1.;2.;3.;4.;5.;6.|] // e.g. temperature measured at noon of the days specified in xData let yData = vector [|4.;7.;9.;8.;7.;9.;|] // Define the polynomial coefficients. let coefficients = LinearRegression.OLS.Polynomial.fit xData yData // Predict the temperature value at midnight between day 1 and 2. LinearRegression.OLS.Polynomial.predict coefficients 1.5 </code></example>
<remarks>If all coefficients are nonzero, the order is equal to the length of the coefficient vector!</remarks>
val orderP: int
val weights: Vector<float>
Multiple items
module Vector from FSharp.Stats

--------------------
type Vector<'T> = interface IEnumerable interface IEnumerable<'T> interface IStructuralEquatable interface IStructuralComparable interface IComparable new: opsV: INumeric<'T> option * arrV: 'T array -> Vector<'T> override Equals: yobj: obj -> bool override GetHashCode: unit -> int member GetSlice: start: int option * finish: int option -> Vector<'T> member Permute: p: permutation -> Vector<'T> ...

--------------------
new: opsV: INumeric<'T> option * arrV: 'T array -> Vector<'T>
val map: mapping: (float -> float) -> vector: vector -> Vector<float>
<summary>Builds a new vector whose elements are the results of applying the given function to each of the elements of the vector.</summary>
<remarks></remarks>
<param name="mapping"></param>
<param name="vector"></param>
<returns></returns>
<example><code></code></example>
val y: float
val coefficientsPolW: Coefficients
val fitWithWeighting: order: int -> weighting: Vector<float> -> xData: Vector<float> -> yData: Vector<float> -> Coefficients
<summary> Calculates the polynomial coefficients for polynomial regression with a given point weighting. </summary>
<param name="order">order of the polynomial (1 = linear, 2 = quadratic, ... )</param>
<param name="weighting">Vector of weightings that define the releveance of each point for fitting.</param>
<param name="xData">vector of x values</param>
<param name="yData">vector of y values</param>
<returns>vector of polynomial coefficients sorted as [intercept;constant;quadratic;...]</returns>
<example><code> // e.g. days since a certain event let xData = vector [|1.;2.;3.;4.;5.;6.|] // e.g. temperature measured at noon of the days specified in xData let yData = vector [|4.;7.;9.;8.;7.;9.;|] // Estimate the three coefficients of a quadratic polynomial. let coefficients = LinearRegression.OLS.Polynomial.fit 2 xData yData </code></example>
val predictionFunctionPolW: x: float -> float
val rawChartP: GenericChart.GenericChart
val fittingPol: GenericChart.GenericChart
val fittingPolW: GenericChart.GenericChart
val polRegressionChart: GenericChart.GenericChart
namespace System
module NonLinearRegression from FSharp.Stats.Fitting
val xDataN: float[]
val yDataN: float[]
val parameterNames: string[]
val getFunctionValue: parameterVector: Vector<float> -> x: float -> float
val parameterVector: Vector<float>
Multiple items
val float: value: 'T -> float (requires member op_Explicit)
<summary>Converts the argument to 64-bit float. This is a direct conversion for all primitive numeric types. For strings, the input is converted using <c>Double.Parse()</c> with InvariantCulture settings. Otherwise the operation requires an appropriate static conversion method on the input type.</summary>
<param name="value">The input value.</param>
<returns>The converted float</returns>
<example id="float-example"><code lang="fsharp"></code></example>


--------------------
[<Struct>] type float = Double
<summary>An abbreviation for the CLI type <see cref="T:System.Double" />.</summary>
<category>Basic Types</category>


--------------------
type float<'Measure> = float
<summary>The type of double-precision floating point numbers, annotated with a unit of measure. The unit of measure is erased in compiled code and when values of this type are analyzed using reflection. The type is representationally equivalent to <see cref="T:System.Double" />.</summary>
<category index="6">Basic Types with Units of Measure</category>
type Math = static member Abs: value: decimal -> decimal + 7 overloads static member Acos: d: float -> float static member Acosh: d: float -> float static member Asin: d: float -> float static member Asinh: d: float -> float static member Atan: d: float -> float static member Atan2: y: float * x: float -> float static member Atanh: d: float -> float static member BigMul: a: int * b: int -> int64 + 2 overloads static member BitDecrement: x: float -> float ...
<summary>Provides constants and static methods for trigonometric, logarithmic, and other common mathematical functions.</summary>
Math.Exp(d: float) : float
val getGradientValues: parameterVector: Vector<float> -> gradientVector: Vector<float> -> xValueN: float -> Vector<float>
val gradientVector: Vector<float>
val xValueN: float
val model: Model
val createModel: parameterNames: string[] -> getFunctionValue: (Vector<float> -> float -> float) -> getGradientValue: (Vector<float> -> Vector<float> -> float -> Vector<float>) -> Model
val deltaX: float
val deltaP: float
val k: int
val initialParamGuess: xData: float[] -> yData: float[] -> float[]
val xData: float[]
val yData: float[]
val yLn: Vector<float>
type Array = interface ICollection interface IEnumerable interface IList interface IStructuralComparable interface IStructuralEquatable interface ICloneable member Clone: unit -> obj member CopyTo: array: Array * index: int -> unit + 1 overload member GetEnumerator: unit -> IEnumerator member GetLength: dimension: int -> int ...
<summary>Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the base class for all arrays in the common language runtime.</summary>
Math.Log(d: float) : float
Math.Log(a: float, newBase: float) : float
val linearReg: Coefficients
val a: float
val exp: value: 'T -> 'T (requires member Exp)
<summary>Exponential of the given number</summary>
<param name="value">The input value.</param>
<returns>The exponential of the input.</returns>
<example id="exp-example"><code lang="fsharp"> exp 0.0 // Evaluates to 1.0 exp 1.0 // Evaluates to 2.718281828 exp -1.0 // Evaluates to 0.3678794412 exp 2.0 // Evaluates to 7.389056099 </code></example>
val b: float
val solverOptions: SolverOptions
val guess: float[]
val createSolverOption: minimumDeltaValue: float -> minimumDeltaParameters: float -> maximumIterations: int -> initialParamGuess: float[] -> SolverOptions
val coefficientsExp: vector
module GaussNewton from FSharp.Stats.Fitting.NonLinearRegression
val estimatedParams: model: Model -> solverOptions: SolverOptions -> xData: float[] -> yData: float[] -> vector
<summary>Returns a parameter vector as a possible solution for linear least square based nonlinear fitting of a given dataset (xData, yData) with a given <br />model function. </summary>
<remarks></remarks>
<param name="model"></param>
<param name="solverOptions"></param>
<param name="xData"></param>
<param name="yData"></param>
<returns></returns>
<example><code></code></example>
val fittingFunction: x: float -> float
val rawChartNLR: GenericChart.GenericChart
static member Chart.Point: xy: seq<#IConvertible * #IConvertible> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'c * ?MultiText: seq<'c> * ?TextPosition: StyleParam.TextPosition * ?MultiTextPosition: seq<StyleParam.TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: StyleParam.Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: StyleParam.MarkerSymbol * ?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol> * ?Marker: TraceObjects.Marker * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: StyleParam.Orientation * ?GroupNorm: StyleParam.GroupNorm * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'c :> IConvertible)
static member Chart.Point: x: seq<#IConvertible> * y: seq<#IConvertible> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'c * ?MultiText: seq<'c> * ?TextPosition: StyleParam.TextPosition * ?MultiTextPosition: seq<StyleParam.TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: StyleParam.Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: StyleParam.MarkerSymbol * ?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol> * ?Marker: TraceObjects.Marker * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: StyleParam.Orientation * ?GroupNorm: StyleParam.GroupNorm * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'c :> IConvertible)
val fittingNLR: GenericChart.GenericChart
static member Chart.Line: xy: seq<#IConvertible * #IConvertible> * ?ShowMarkers: bool * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'c * ?MultiText: seq<'c> * ?TextPosition: StyleParam.TextPosition * ?MultiTextPosition: seq<StyleParam.TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: StyleParam.Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: StyleParam.MarkerSymbol * ?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol> * ?Marker: TraceObjects.Marker * ?LineColor: Color * ?LineColorScale: StyleParam.Colorscale * ?LineWidth: float * ?LineDash: StyleParam.DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: StyleParam.Orientation * ?GroupNorm: StyleParam.GroupNorm * ?Fill: StyleParam.Fill * ?FillColor: Color * ?FillPattern: TraceObjects.Pattern * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'c :> IConvertible)
static member Chart.Line: x: seq<#IConvertible> * y: seq<#IConvertible> * ?ShowMarkers: bool * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?TextPosition: StyleParam.TextPosition * ?MultiTextPosition: seq<StyleParam.TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: StyleParam.Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: StyleParam.MarkerSymbol * ?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol> * ?Marker: TraceObjects.Marker * ?LineColor: Color * ?LineColorScale: StyleParam.Colorscale * ?LineWidth: float * ?LineDash: StyleParam.DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: StyleParam.Orientation * ?GroupNorm: StyleParam.GroupNorm * ?Fill: StyleParam.Fill * ?FillColor: Color * ?FillPattern: TraceObjects.Pattern * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'a2 :> IConvertible)
val NLRChart: GenericChart.GenericChart
val xHours: float[]
val yCount: float[]
val model': Model
module Table from FSharp.Stats.Fitting.NonLinearRegression
val LogisticFunctionAscending: Model
<summary> Logistic function of the form "y = L/(1+e^(-k(t-x)))" </summary>
val initialParamGuess': float[]
module LevenbergMarquardtConstrained from FSharp.Stats.Fitting.NonLinearRegression
<summary> This LevenbergMarquardt implementation supports the usage of box constrains. </summary>
val initialParam: xData: float[] -> yData: float[] -> cutoffPercentage: float -> float[]
<summary>Returns an estimate for an initial parameter for the linear least square estimator for a given dataset (xData, yData).<br />The initial estimation is intended for a logistic function.<br />The returned parameters are the max y value, the steepness of the curve and the x value in the middle of the slope.</summary>
<remarks></remarks>
<param name="xData"></param>
<returns></returns>
<example><code></code></example>
val solverOptions': SolverOptions
val lineSolverOptions: initialParamGuess: float[] -> SolverOptions
val lowerBound: Vector<float>
val param: float
val abs: value: 'T -> 'T (requires member Abs)
<summary>Absolute value of the given number.</summary>
<param name="value">The input value.</param>
<returns>The absolute value of the input.</returns>
<example id="abs-example"><code lang="fsharp"> abs -12 // Evaluates to 12 abs -15.0 // Evaluates to 15.0 </code></example>
val upperBound: Vector<float>
val estParams: vector
val estimatedParams: model: Model -> solverOptions: SolverOptions -> lambdaInitial: float -> lambdaFactor: float -> lowerBound: vector -> upperBound: vector -> xData: float[] -> yData: float[] -> vector
<summary>Returns a parameter vector as a possible solution for linear least square based nonlinear fitting of a given dataset (xData, yData) with a given <br />model function. </summary>
<remarks></remarks>
<param name="model"></param>
<param name="solverOptions"></param>
<param name="lambdaInitial"></param>
<param name="lambdaFactor"></param>
<param name="lowerBound"></param>
<param name="upperBound"></param>
<param name="xData"></param>
<param name="yData"></param>
<returns></returns>
<example><code></code></example>
val multipleSolverOptions: SolverOptions[]
val initialParamsOverRange: xData: float[] -> yData: float[] -> steepnessRange: float[] -> float[][]
<summary>Returns an estimate for an initial parameter for the linear least square estimator for a given dataset (xData, yData).<br />The steepness is given as an array and not estimated. An initial estimate is returned for every given steepness.<br />The initial estimation is intended for a logistic function.</summary>
<remarks></remarks>
<param name="xData"></param>
<param name="yData"></param>
<param name="steepnessRange"></param>
<returns></returns>
<example><code></code></example>
val estParamsRSS: vector
val solvO: SolverOptions
SolverOptions.InitialParamGuess: float[]
val estimatedParamsWithRSS: model: Model -> solverOptions: SolverOptions -> lambdaInitial: float -> lambdaFactor: float -> lowerBound: vector -> upperBound: vector -> xData: float[] -> yData: float[] -> vector * float
<summary>Returns a parameter vector tupled with its residual sum of squares (RSS) as a possible solution for linear least square based nonlinear fitting of a given dataset (xData, yData) with a given<br />model function.</summary>
<remarks></remarks>
<param name="model"></param>
<param name="solverOptions"></param>
<param name="lambdaInitial"></param>
<param name="lambdaFactor"></param>
<param name="lowerBound"></param>
<param name="upperBound"></param>
<param name="xData"></param>
<param name="yData"></param>
<returns></returns>
<example><code></code></example>
val minBy: projection: ('T -> 'U) -> array: 'T[] -> 'T (requires comparison)
<summary>Returns the lowest of all elements of the array, compared via Operators.min on the function result.</summary>
<remarks>Throws ArgumentException for empty arrays.</remarks>
<param name="projection">The function to transform the elements into a type supporting comparison.</param>
<param name="array">The input array.</param>
<exception cref="T:System.ArgumentNullException">Thrown when the input array is null.</exception>
<exception cref="T:System.ArgumentException">Thrown when the input array is empty.</exception>
<returns>The minimum element.</returns>
<example id="minby-1"><code lang="fsharp"> let inputs = [| "aaa"; "b"; "cccc" |] inputs |&gt; Array.minBy (fun s -&gt; s.Length) </code> Evaluates to <c>"b"</c></example>
<example id="minby-2"><code lang="fsharp"> let inputs: string[]= [| |] inputs |&gt; Array.minBy (fun s -&gt; s.Length) </code> Throws <c>System.ArgumentException</c>. </example>
val snd: tuple: ('T1 * 'T2) -> 'T2
<summary>Return the second element of a tuple, <c>snd (a,b) = b</c>.</summary>
<param name="tuple">The input tuple.</param>
<returns>The second value.</returns>
<example id="snd-example"><code lang="fsharp"> snd ("first", 2) // Evaluates to 2 </code></example>
val fst: tuple: ('T1 * 'T2) -> 'T1
<summary>Return the first element of a tuple, <c>fst (a,b) = a</c>.</summary>
<param name="tuple">The input tuple.</param>
<returns>The first value.</returns>
<example id="fst-example"><code lang="fsharp"> fst ("first", 2) // Evaluates to "first" </code></example>
val fittingFunction': (float -> float)
val fittedY: (float * float)[]
val zip: array1: 'T1[] -> array2: 'T2[] -> ('T1 * 'T2)[]
<summary>Combines the two arrays into an array of pairs. The two arrays must have equal lengths, otherwise an <c>ArgumentException</c> is raised.</summary>
<param name="array1">The first input array.</param>
<param name="array2">The second input array.</param>
<exception cref="T:System.ArgumentNullException">Thrown when either of the input arrays is null.</exception>
<exception cref="T:System.ArgumentException">Thrown when the input arrays differ in length.</exception>
<returns>The array of tupled elements.</returns>
<example id="zip-1"><code lang="fsharp"> let numbers = [|1; 2|] let names = [|"one"; "two"|] Array.zip numbers names </code> Evaluates to <c>[| (1, "one"); (2, "two") |]</c>. </example>
val fittedLogisticFunc: GenericChart.GenericChart
static member Chart.withXAxisStyle: ?TitleText: string * ?TitleFont: Font * ?TitleStandoff: int * ?Title: Title * ?Color: Color * ?AxisType: StyleParam.AxisType * ?MinMax: (#IConvertible * #IConvertible) * ?Mirror: StyleParam.Mirror * ?ShowSpikes: bool * ?SpikeColor: Color * ?SpikeThickness: int * ?ShowLine: bool * ?LineColor: Color * ?ShowGrid: bool * ?GridColor: Color * ?GridDash: StyleParam.DrawingStyle * ?ZeroLine: bool * ?ZeroLineColor: Color * ?Anchor: StyleParam.LinearAxisId * ?Side: StyleParam.Side * ?Overlaying: StyleParam.LinearAxisId * ?Domain: (float * float) * ?Position: float * ?CategoryOrder: StyleParam.CategoryOrder * ?CategoryArray: seq<#IConvertible> * ?RangeSlider: LayoutObjects.RangeSlider * ?RangeSelector: LayoutObjects.RangeSelector * ?BackgroundColor: Color * ?ShowBackground: bool * ?Id: StyleParam.SubPlotId -> (GenericChart.GenericChart -> GenericChart.GenericChart)
static member Chart.withYAxisStyle: ?TitleText: string * ?TitleFont: Font * ?TitleStandoff: int * ?Title: Title * ?Color: Color * ?AxisType: StyleParam.AxisType * ?MinMax: (#IConvertible * #IConvertible) * ?Mirror: StyleParam.Mirror * ?ShowSpikes: bool * ?SpikeColor: Color * ?SpikeThickness: int * ?ShowLine: bool * ?LineColor: Color * ?ShowGrid: bool * ?GridColor: Color * ?GridDash: StyleParam.DrawingStyle * ?ZeroLine: bool * ?ZeroLineColor: Color * ?Anchor: StyleParam.LinearAxisId * ?Side: StyleParam.Side * ?Overlaying: StyleParam.LinearAxisId * ?AutoShift: bool * ?Shift: int * ?Domain: (float * float) * ?Position: float * ?CategoryOrder: StyleParam.CategoryOrder * ?CategoryArray: seq<#IConvertible> * ?RangeSlider: LayoutObjects.RangeSlider * ?RangeSelector: LayoutObjects.RangeSelector * ?BackgroundColor: Color * ?ShowBackground: bool * ?Id: StyleParam.SubPlotId -> (GenericChart.GenericChart -> GenericChart.GenericChart)
val xDataS: float[]
val yDataS: float[]
val data: (float * float)[]
val knots: float[]
val spline: lambda: float -> x: float -> float
val lambda: float
module Spline from FSharp.Stats.Fitting
val smoothingSpline: data: (float * float)[] -> basispts: float[] -> (float -> float -> float)
<summary>Creates a smoothing spline through some data. Takes as spline points the x-values given by basispts.<br />The resulting function takes lambda (regularization parameter) and a x_Value as input. </summary>
<remarks></remarks>
<param name="data"></param>
<returns></returns>
<example><code></code></example>
val fit: lambda: float -> GenericChart.GenericChart
val sprintf: format: Printf.StringFormat<'T> -> 'T
<summary>Print to a string using the given format.</summary>
<param name="format">The formatter.</param>
<returns>The formatted result.</returns>
<example>See <c>Printf.sprintf</c> (link: <see cref="M:Microsoft.FSharp.Core.PrintfModule.PrintFormatToStringThen``1" />) for examples.</example>
val rawChartS: GenericChart.GenericChart
val smoothingSplines: GenericChart.GenericChart