FSharp.Stats

Binder Notebook

FSharp.Stats is a multipurpose project for statistical testing, linear algebra, machine learning, fitting and signal processing.

Installation

From Nuget.org:

You can get all FSharp.Stats packages from nuget at https://www.nuget.org/packages/FSharp.Stats/.

To build the binaries yourself:

Windows:

  • Install .Net Core SDK
  • navigate to project folder
  • use the console command ./build.cmd

Linux(Ubuntu, using Mono):

  • Install .Net Core SDK
  • navigate to project folder
  • make the script executable with chmod +x ./build.sh
  • use the console command ./build.sh

Documentation:

  • While editing the documentation you can preview the documentation in your browser via dotnet fsdocs watch --eval

Example

The following examples show how easy it is to start working with FSharp.Stats.

Distributions

open Plotly.NET
open FSharp.Stats

// initialize a normal distribution with mean 25 and standard deviation 0.1
let normalDistribution = Distributions.Continuous.Normal.Init 25. 0.1

// draw independently 30 times from the given distribution 
let sample = Array.init 30 (fun _ -> normalDistribution.Sample())
[|24.99727622; 25.06055898; 25.21393263; 24.8971857; 24.91225859; 25.23438048;
  25.07679621; 25.0681794; 25.01695179; 24.84005237; 24.85819025; 24.9916305;
  24.95026837; 25.02802016; 24.94947687; 25.0185527; 25.14615721; 24.97609585;
  24.92894713; 25.05215953; 24.95001096; 25.11773529; 24.90043007; 24.97443445;
  24.88734092; 24.9275594; 24.98039062; 24.9694966; 25.03934624; 24.97018376|]

Basic descriptive statistics

// calculate the mean of the given sample
let mean = Seq.mean sample
24.99779998
// calculate the bessel corrected sample standard deviation of the given sample
let stDev = Seq.stDev sample
0.09533512325
// calculate the coefficient of variation of the given sample 
// Attention: CV is valid only if a hypothetical real zero value exists for the data.
let cv = Seq.cv sample
0.003813740543

Vectors, Matrices and linear algebra

// create a vector 
let vecB = vector [19.;11.;35.]

// create a matrix 
let matA = matrix [[3.;4.;0.];[1.;2.;2.];[5.;0.;5.]]

// solve the linear system of equations
let vecX = FSharp.Stats.Algebra.LinearAlgebra.SolveLinearSystem matA vecB
vector [|5.0; 1.0; 2.0|]

Interpolation

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

// get coefficients of interpolating polynomial
let interpolatingCoefficients = 
    Interpolation.Polynomial.interpolate xData yData

// get fitting function of interpolating polynomial
let interpolFitFunc = 
    Interpolation.Polynomial.predict interpolatingCoefficients

Regression

// get coefficients of 3rd order regression polynomial
let regressionCoefficients = 
    Fitting.LinearRegression.fit(xData,yData,FittingMethod=Fitting.Method.Polynomial 3)
    
// get fitting function of 3rd order regression polynomial
let regressionPredictionFunc: float -> float = 
    Fitting.LinearRegression.predict regressionCoefficients

The resulting interpolating and regression polynomials are plotted below using Plotly.NET.

Samples & documentation

The library comes with comprehensible documentation. It can include tutorials automatically generated from *.fsx files in the content folder. The API reference is automatically generated from Markdown comments in the library implementation.

  • API Reference contains automatically generated documentation for all types, modules and functions in the library. This includes additional brief samples on using most of the functions.

Contributing and copyright

The project is hosted on GitHub where you can report issues, fork the project and submit pull requests. If you're adding a new public API, please also consider adding samples that can be turned into a documentation. You might also want to read the library design notes to understand how it works.

The library is available under Public Domain license, which allows modification and redistribution for both commercial and non-commercial purposes. For more information see the License file in the GitHub repository.

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
val normalDistribution: Distributions.ContinuousDistribution<float,float>
namespace FSharp.Stats.Distributions
namespace FSharp.Stats.Distributions.Continuous
type Normal = static member CDF: mu: float -> sigma: float -> x: float -> float static member CheckParam: mu: float -> sigma: float -> unit static member Estimate: samples: seq<float> -> ContinuousDistribution<float,float> static member Init: mu: float -> sigma: float -> ContinuousDistribution<float,float> static member InvCDF: mu: float -> sigma: float -> p: float -> float static member Mean: mu: float -> sigma: float -> float static member Mode: mu: float -> sigma: float -> float static member PDF: mu: float -> sigma: float -> x: float -> float static member Sample: mu: float -> sigma: float -> float static member SampleUnchecked: mu: float -> sigma: float -> float ...
<summary> Normal distribution. </summary>
static member Distributions.Continuous.Normal.Init: mu: float -> sigma: float -> Distributions.ContinuousDistribution<float,float>
val sample: 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 init: count: int -> initializer: (int -> 'T) -> 'T[]
<summary>Creates an array given the dimension and a generator function to compute the elements.</summary>
<param name="count">The number of elements to initialize.</param>
<param name="initializer">The function to generate the initial values for each index.</param>
<returns>The created array.</returns>
<exception cref="T:System.ArgumentException">Thrown when count is negative.</exception>
<example id="init-1"><code lang="fsharp"> Array.init 4 (fun v -&gt; v + 5) </code> Evaluates to <c>[| 5; 6; 7; 8 |]</c></example>
<example id="init-2"><code lang="fsharp"> Array.init -5 (fun v -&gt; v + 5) </code> Throws <c>ArgumentException</c></example>
abstract Distributions.ContinuousDistribution.Sample: unit -> 'b
val mean: float
Multiple items
module Seq from FSharp.Stats
<summary> Module to compute common statistical measure </summary>

--------------------
module Seq from Microsoft.FSharp.Collections
<summary>Contains operations for working with values of type <see cref="T:Microsoft.FSharp.Collections.seq`1" />.</summary>

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

--------------------
new: unit -> Seq
val mean: items: seq<'T> -> 'U (requires member (+) and member get_Zero and member DivideByInt and member (/))
<summary> Computes the population mean (Normalized by N) </summary>
<param name="items">The input sequence.</param>
<remarks>Returns default value if data is empty or if any entry is NaN.</remarks>
<returns>population mean (Normalized by N)</returns>
val stDev: float
val stDev: items: seq<'T> -> 'U (requires member (-) and member get_Zero and member DivideByInt and member (+) and member ( * ) and member (+) and member (/) and member Sqrt)
<summary> Computes the sample standard deviation </summary>
<param name="items">The input sequence.</param>
<remarks>Returns NaN if data is empty or if any entry is NaN.</remarks>
<returns>standard deviation of a sample (Bessel's correction by N-1)</returns>
val cv: float
val cv: items: seq<'T> -> 'U (requires member (-) and member get_Zero and member DivideByInt and member (+) and member ( * ) and member Sqrt and member (+) and member (/) and member (/))
<summary> Computes the Coefficient of Variation of a sample (Bessel's correction by N-1) </summary>
<param name="items">The input sequence.</param>
<remarks>Returns NaN if data is empty or if any entry is NaN.</remarks>
<returns>Coefficient of Variation of a sample (Bessel's correction by N-1)</returns>
val vecB: Vector<float>
Multiple items
val vector: l: seq<float> -> Vector<float>

--------------------
type vector = Vector<float>
val matA: Matrix<float>
Multiple items
val matrix: ll: seq<#seq<float>> -> Matrix<float>

--------------------
type matrix = Matrix<float>
val vecX: Vector<float>
namespace FSharp.Stats.Algebra
Multiple items
module LinearAlgebra from FSharp.Stats.Algebra

--------------------
type LinearAlgebra = new: unit -> LinearAlgebra static member nullspace: ?Accuracy: float -> (Matrix<float> -> Matrix<float>)

--------------------
new: unit -> Algebra.LinearAlgebra
val SolveLinearSystem: A: matrix -> b: vector -> Vector<float>
val xData: Vector<float>
val yData: Vector<float>
val interpolatingCoefficients: Interpolation.Polynomial.PolynomialCoef
Multiple items
module Interpolation from FSharp.Stats
<summary> This module contains functionalities to perform various interpolation methods for two dimensional data. </summary>

--------------------
type Interpolation = new: unit -> Interpolation static member getFirstDerivative: coef: InterpolationCoefficients -> (float -> float) static member getIntegralBetween: coef: InterpolationCoefficients * x1: float * x2: float -> float static member getSecondDerivative: coef: InterpolationCoefficients -> (float -> float) static member interpolate: xValues: float array * yValues: float array * method: InterpolationMethod -> InterpolationCoefficients static member predict: coef: InterpolationCoefficients -> (float -> float)
<summary> This type contains functionalities to perform various interpolation methods for two dimensional data. It summarizes functions contained within the interpolation module. </summary>

--------------------
new: unit -> Interpolation
module Polynomial from FSharp.Stats.InterpolationModule
<summary> Calculates polynomials that interpolatethe two dimensional data. The polynomial order is equal to the number of data points - 1. </summary>
<remarks> In general a polynomial with degree = datapointNumber - 1 is flexible enough to interpolate all datapoints. But polynomial regression with degree = datapointNumber - 1 cannot be used for polynomial interpolation because the least squares approach is not sufficient to converge interpolating. </remarks>
val interpolate: xData: Vector<float> -> yData: Vector<float> -> Interpolation.Polynomial.PolynomialCoef
<summary> Calculates the polynomial coefficients for interpolating the given unsorted data. </summary>
<remarks>No duplicates allowed!</remarks>
<param name="xData">Note: Must not contain duplicate x values (use Approximation.regularizeValues to preprocess data!)</param>
<param name="yData">vector of y values</param>
<returns>vector of polynomial coefficients sorted as [constant;linear;quadratic;...]</returns>
<example><code> // e.g. days since a certain event let xData = vector [|1.;2.;3.;4.;5.;6.|] // e.g. e.g. temperature measured at noon of the days specified in xData let yData = vector [|4.;7.;9.;8.;7.;9.;|] // Estimate the polynomial coefficients. In Interpolation the order is equal to the data length - 1. let coefficients = Interpolation.Polynomial.coefficients xData yData </code></example>
val interpolFitFunc: (float -> float)
val predict: coef: Interpolation.Polynomial.PolynomialCoef -> x: float -> float
<summary> takes polynomial coefficients and x value to predict the corresponding interpolating y value </summary>
<param name="coef">polynomial coefficients (e.g. determined by Polynomial.coefficients), sorted as [constant;linear;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.;|] // Estimate the polynomial coefficients. In Interpolation the order is equal to the data length - 1. let coefficients = Interpolation.Polynomial.coefficients xData yData // Predict the temperature value at midnight between day 1 and 2. Interpolation.Polynomial.fit coefficients 1.5 </code></example>
val interpolChart: GenericChart.GenericChart
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
val data: (float * float) list
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.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)
val regressionCoefficients: Fitting.LinearRegression.Coefficients
namespace FSharp.Stats.Fitting
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 -> Fitting.LinearRegression
static member Fitting.LinearRegression.fit: xData: matrix * yData: Vector<float> * ?FittingMethod: Fitting.Method -> Fitting.LinearRegression.Coefficients
static member Fitting.LinearRegression.fit: xData: vector * yData: Vector<float> * ?FittingMethod: Fitting.Method * ?Constraint: Fitting.Constraint<float * float> * ?Weighting: vector -> Fitting.LinearRegression.Coefficients
type Method = | SimpleLinear | Polynomial of int | Robust of RobustEstimator
<summary> Defines regression method. </summary>
union case Fitting.Method.Polynomial: int -> Fitting.Method
<summary>Fits a polynomial of the specified order (degree) to twodimensional data (OLS).</summary>
val regressionPredictionFunc: (float -> 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>
static member Fitting.LinearRegression.predict: coeff: Fitting.LinearRegression.Coefficients -> xValue: float -> float
val regressionChart: GenericChart.GenericChart
val combChart: GenericChart.GenericChart
val rawChart: GenericChart.GenericChart
static member Chart.Point: xy: seq<#System.IConvertible * #System.IConvertible> * ?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 * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: StyleParam.Orientation * ?GroupNorm: StyleParam.GroupNorm * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'a2 :> 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)
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
module GenericChart from Plotly.NET
<summary> Module to represent a GenericChart </summary>
val toChartHTML: gChart: GenericChart.GenericChart -> string