Summary: This tutorial demonstrates how to autocorrelate a signal in FSharp.Stats
open Plotly.NET
open FSharp.Stats
open FSharp.Stats.Correlation
let sampleA = [|3.4;2.5;6.5;0.2;-0.1|]
let sampleB = [|3.1;1.5;4.2;1.2;2.0|]
let pearson = Seq.pearson sampleA sampleB
let pearsonW = Seq.pearsonWeighted sampleA sampleB [1.;1.;1.;2.;1.;]
let spearman = Seq.spearman sampleA sampleB
let kendall = Seq.kendall sampleA sampleB
let bicor = Seq.bicor sampleA sampleB
let table =
let header = ["<b>Correlation measure</b>";"value"]
let rows =
[
["Pearson"; sprintf "%3f" pearson ]
["Pearson weighted"; sprintf "%3f" pearsonW]
["Spearman"; sprintf "%3f" spearman]
["Kendall"; sprintf "%3f" kendall ]
["Biweight midcorrelation"; sprintf "%3f" bicor ]
]
Chart.Table(header, rows, HeaderFillColor = Color.fromHex "#deebf7", CellsFillColor= Color.fromString "lightgrey")
let m =
[
[0.4;1.2;4.5]
[1.2;0.5;-0.1]
[5.0;19.8;2.4]
[-6.0;-2.;0.0]
]
|> matrix
let pearsonCorrelationMatrix =
Correlation.Matrix.rowWiseCorrelationMatrix Correlation.Seq.pearson m
let table2 =
//Assign a color to every cell seperately. Matrix must be transposed for correct orientation.
let cellcolors =
//map color from value to hex representation
let mapColor min max value =
let proportion = int (255. * (value - min) / (max - min))
Color.fromARGB 1 (255 - proportion) 255 proportion
pearsonCorrelationMatrix
|> Matrix.toJaggedArray
|> JaggedArray.map (mapColor -1. 1.)
|> JaggedArray.transpose
|> Array.map Color.fromColors
|> Color.fromColors
let values =
pearsonCorrelationMatrix
|> Matrix.toJaggedArray
|> JaggedArray.map (sprintf "%.3f")
Chart.Table(["colindex 0";"colindex 1";"colindex 2";"colindex 3"],values,CellsFillColor=cellcolors)
Autocorrelation, also known as serial correlation, is the correlation of a signal with a delayed copy of itself as a function of delay.
Informally, it is the similarity between observations as a function of the time lag between them.
The analysis of autocorrelation is a mathematical tool for finding repeating patterns, such as the presence of a periodic signal obscured by noise, or identifying the missing fundamental frequency in a signal implied by its harmonic frequencies.
open FSharp.Stats.Distributions.Continuous
open FSharp.Stats.Correlation
let lags = [0..100]
let x = [0. .. 100.]
//// Autocorrelation of a gaussian signal
let gaussPDF = Normal.PDF 10. 2.
let yGauss = x |> List.map gaussPDF |> vector
let autoCorrGauss = lags |> List.map (fun lag -> autoCorrelation lag yGauss)
open Plotly.NET
let gaussAC =
Chart.Point(lags,autoCorrGauss)
|> Chart.withTraceInfo "Autocorrelation"
|> Chart.withTitle "Autocorrelation of a gaussian sine wave"
|> fun c ->
[
Chart.Point(x,yGauss,Name="gaussian") |> Chart.withTemplate ChartTemplates.lightMirrored
c |> Chart.withTemplate ChartTemplates.lightMirrored
]
|> Chart.Grid(2,1)
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
module Correlation
from FSharp.Stats
<summary>
Contains correlation functions for different data types
</summary>
val sampleA: float[]
val sampleB: float[]
val pearson: float
Multiple items
module Seq
from FSharp.Stats.Correlation
<summary>
Contains correlation functions optimized for sequences
</summary>
--------------------
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 pearson: seq1: seq<'T> -> seq2: seq<'T> -> float (requires member op_Explicit and member get_Zero and member get_One)
<summary>Calculates the pearson correlation of two samples. Homoscedasticity must be assumed.</summary>
<remarks></remarks>
<param name="seq1"></param>
<param name="seq2"></param>
<returns></returns>
<example><code></code></example>
val pearsonW: float
val pearsonWeighted: seq1: seq<'T> -> seq2: seq<'T> -> weights: seq<'T> -> float (requires member get_Zero and member get_One and member (+) and member op_Explicit and member ( * ) and member (+))
<summary>weighted pearson correlation (http://sci.tech-archive.net/Archive/sci.stat.math/2006-02/msg00171.html)</summary>
<remarks></remarks>
<param name="seq1"></param>
<param name="seq2"></param>
<param name="weights"></param>
<returns></returns>
<example><code></code></example>
val spearman: float
val spearman: seq1: seq<'T> -> seq2: seq<'T> -> float (requires member op_Explicit)
<summary>
Spearman Correlation (with ranks)
Items that are tied are each allocated the average of the ranks that
they would have had had they been distinguishable.
Reference: Williams R.B.G. (1986) Spearman’s and Kendall’s Coefficients of Rank Correlation.
Intermediate Statistics for Geographers and Earth Scientists, p453, https://doi.org/10.1007/978-1-349-06813-5_6
</summary>
<returns>The spearman correlation.</returns>
<example><code>
let x = [5.05;6.75;3.21;2.66]
let y = [1.65;2.64;2.64;6.95]
// To get the correlation between x and y:
Seq.spearman x y // evaluates to -0.632455532
</code></example>
val kendall: float
val kendall: setA: #System.IComparable[] -> setB: #System.IComparable[] -> float
<summary>Kendall Correlation Coefficient </summary>
<remarks></remarks>
<param name="setA"></param>
<param name="setB"></param>
<returns></returns>
<example><code></code></example>
val bicor: float
val bicor: seq1: seq<float> -> seq2: seq<float> -> float
<summary>Biweighted Midcorrelation. This is a median based correlation measure which is more robust against outliers.</summary>
<remarks></remarks>
<param name="seq1"></param>
<param name="seq2"></param>
<returns></returns>
<example><code></code></example>
val table: GenericChart.GenericChart
val header: string list
val rows: string list list
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>
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.Table: header: TraceObjects.TableHeader * cells: TraceObjects.TableCells * ?Name: string * ?ColumnOrder: seq<int> * ?ColumnWidth: float * ?MultiColumnWidth: seq<float> * ?UseDefaults: bool -> GenericChart.GenericChart
static member Chart.Table: headerValues: seq<#seq<'b>> * cellsValues: seq<#seq<'d>> * ?TransposeCells: bool * ?HeaderAlign: StyleParam.HorizontalAlign * ?HeaderMultiAlign: seq<StyleParam.HorizontalAlign> * ?HeaderFillColor: Color * ?HeaderHeight: int * ?HeaderOutlineColor: Color * ?HeaderOutlineWidth: float * ?HeaderOutlineMultiWidth: seq<float> * ?HeaderOutline: Line * ?CellsAlign: StyleParam.HorizontalAlign * ?CellsMultiAlign: seq<StyleParam.HorizontalAlign> * ?CellsFillColor: Color * ?CellsHeight: int * ?CellsOutlineColor: Color * ?CellsOutlineWidth: float * ?CellsOutlineMultiWidth: seq<float> * ?CellsOutline: Line * ?Name: string * ?ColumnOrder: seq<int> * ?ColumnWidth: float * ?MultiColumnWidth: seq<float> * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'b :> System.IConvertible and 'd :> System.IConvertible)
type Color =
override Equals: other: obj -> bool
override GetHashCode: unit -> int
static member fromARGB: a: int -> r: int -> g: int -> b: int -> Color
static member fromColorScaleValues: c: seq<#IConvertible> -> Color
static member fromColors: c: seq<Color> -> Color
static member fromHex: s: string -> Color
static member fromKeyword: c: ColorKeyword -> Color
static member fromRGB: r: int -> g: int -> b: int -> Color
static member fromString: c: string -> Color
member Value: obj
<summary>
Plotly color can be a single color, a sequence of colors, or a sequence of numeric values referencing the color of the colorscale obj
</summary>
static member Color.fromHex: s: string -> Color
static member Color.fromString: c: string -> Color
module GenericChart
from Plotly.NET
<summary>
Module to represent a GenericChart
</summary>
val toChartHTML: gChart: GenericChart.GenericChart -> string
val m: Matrix<float>
Multiple items
val matrix: ll: seq<#seq<float>> -> Matrix<float>
--------------------
type matrix = Matrix<float>
val pearsonCorrelationMatrix: Matrix<float>
module Matrix
from FSharp.Stats.Correlation
<summary>
Contains correlation functions optimized for matrices
</summary>
val rowWiseCorrelationMatrix: corrFunction: (seq<float> -> seq<float> -> float) -> m: matrix -> Matrix<float>
<summary>computes a matrix that contains the metric given by the corrFunction parameter applied rowwise for every row against every other row of the input matrix</summary>
<remarks></remarks>
<param name="corrFunction"></param>
<param name="m"></param>
<returns></returns>
<example><code></code></example>
module Seq
from FSharp.Stats.Correlation
<summary>
Contains correlation functions optimized for sequences
</summary>
val table2: GenericChart.GenericChart
val cellcolors: Color
val mapColor: (float -> float -> float -> Color)
val min: float
val max: float
val value: float
val proportion: int
Multiple items
val int: value: 'T -> int (requires member op_Explicit)
<summary>Converts the argument to signed 32-bit integer. This is a direct conversion for all
primitive numeric types. For strings, the input is converted using <c>Int32.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 int</returns>
<example id="int-example"><code lang="fsharp"></code></example>
--------------------
[<Struct>]
type int = int32
<summary>An abbreviation for the CLI type <see cref="T:System.Int32" />.</summary>
<category>Basic Types</category>
--------------------
type int<'Measure> =
int
<summary>The type of 32-bit signed integer 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.Int32" />.</summary>
<category>Basic Types with Units of Measure</category>
static member Color.fromARGB: a: int -> r: int -> g: int -> b: int -> Color
Multiple items
module Matrix
from FSharp.Stats.Correlation
<summary>
Contains correlation functions optimized for matrices
</summary>
--------------------
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 toJaggedArray: m: matrix -> float[][]
module JaggedArray
from FSharp.Stats
val map: mapping: ('T -> 'U) -> jArray: 'T[][] -> 'U[][]
<summary>Builds a new jagged array whose inner arrays are the results of applying the given function to each of their elements.</summary>
<remarks></remarks>
<param name="mapping"></param>
<param name="jArray"></param>
<returns></returns>
<example><code></code></example>
val transpose: arr: 'T[][] -> 'T[][]
<summary>Transposes a jagged array</summary>
<remarks></remarks>
<param name="arr"></param>
<returns></returns>
<example><code></code></example>
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 |> Array.map (fun x -> x.Length)
</code>
Evaluates to <c>[| 1; 3; 2 |]</c></example>
static member Color.fromColors: c: seq<Color> -> Color
val values: string[][]
namespace FSharp.Stats.Distributions
namespace FSharp.Stats.Distributions.Continuous
val lags: int list
val x: float list
val gaussPDF: (float -> float)
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 Normal.PDF: mu: float -> sigma: float -> x: float -> float
val yGauss: Vector<float>
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 |> List.map (fun x -> x.Length)
</code>
Evaluates to <c>[ 1; 3; 2 ]</c></example>
Multiple items
val vector: l: seq<float> -> Vector<float>
--------------------
type vector = Vector<float>
val autoCorrGauss: float list
val lag: int
val autoCorrelation: lag: int -> v1: vector -> float
<summary>computes the sample auto correlation (using pearson correlation) of a signal at a given lag.</summary>
<remarks></remarks>
<param name="lag"></param>
<param name="v1"></param>
<returns></returns>
<example><code></code></example>
val gaussAC: 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.withTraceInfo: ?Name: string * ?Visible: StyleParam.Visible * ?ShowLegend: bool * ?LegendRank: int * ?LegendGroup: string * ?LegendGroupTitle: Title -> (GenericChart.GenericChart -> GenericChart.GenericChart)
static member Chart.withTitle: title: Title -> (GenericChart.GenericChart -> GenericChart.GenericChart)
static member Chart.withTitle: title: string * ?TitleFont: Font -> (GenericChart.GenericChart -> GenericChart.GenericChart)
val c: GenericChart.GenericChart
static member Chart.withTemplate: template: Template -> (GenericChart.GenericChart -> GenericChart.GenericChart)
module ChartTemplates
from Plotly.NET
val lightMirrored: Template
static member Chart.Grid: ?SubPlots: (StyleParam.LinearAxisId * StyleParam.LinearAxisId)[][] * ?XAxes: StyleParam.LinearAxisId[] * ?YAxes: StyleParam.LinearAxisId[] * ?RowOrder: StyleParam.LayoutGridRowOrder * ?Pattern: StyleParam.LayoutGridPattern * ?XGap: float * ?YGap: float * ?Domain: LayoutObjects.Domain * ?XSide: StyleParam.LayoutGridXSide * ?YSide: StyleParam.LayoutGridYSide -> (#seq<'a1> -> GenericChart.GenericChart) (requires 'a1 :> seq<GenericChart.GenericChart>)
static member Chart.Grid: nRows: int * nCols: int * ?SubPlots: (StyleParam.LinearAxisId * StyleParam.LinearAxisId)[][] * ?XAxes: StyleParam.LinearAxisId[] * ?YAxes: StyleParam.LinearAxisId[] * ?RowOrder: StyleParam.LayoutGridRowOrder * ?Pattern: StyleParam.LayoutGridPattern * ?XGap: float * ?YGap: float * ?Domain: LayoutObjects.Domain * ?XSide: StyleParam.LayoutGridXSide * ?YSide: StyleParam.LayoutGridYSide -> (#seq<GenericChart.GenericChart> -> GenericChart.GenericChart)