From c33e6c39f50236c6b16f4c9c4a1700f4c2c4b023 Mon Sep 17 00:00:00 2001
From: Christoph Ruegg
Date: Sun, 27 Jun 2021 17:15:59 +0200
Subject: [PATCH] Math.NET Numerics: 5.0.0-alpha01 docs update
---
Build.html | 10 +--
DescriptiveStatistics.html | 72 ++++++++++----------
Generate.html | 19 ++++--
IFsharpNotebook.html | 111 +++++++++++++++++++------------
LinearEquations.html | 18 +++--
MKL.html | 15 +++--
Matrix.html | 66 +++++++++++++------
Probability.html | 130 ++++++++++++++++++++++++-------------
Random.html | 67 ++++++++++++-------
Regression.html | 4 +-
ReleaseNotes-MKL.html | 2 +-
ReleaseNotes-OpenBLAS.html | 2 +-
ReleaseNotes.html | 22 ++++++-
index.html | 11 ++--
14 files changed, 358 insertions(+), 191 deletions(-)
diff --git a/Build.html b/Build.html
index fbda6688..0d2ce427 100644
--- a/Build.html
+++ b/Build.html
@@ -104,14 +104,14 @@ is not required when using Visual Studio or the .NET Core SDK directly.
13:
14:
-./build.sh # normal build and unit tests, when using bash shell on Windows or Linux.
-build.cmd # normal build and unit tests, when using Windows CMD shell.
+./build.sh # normal build and unit tests, when using bash shell on Windows or Linux.
+build.cmd # normal build and unit tests, when using Windows CMD shell.
./build.sh build # normal build
./build.sh build strongname # normal build and also build strong-named variant
-./build.sh test # normal build, run unit tests
-./build.sh test quick # normal build, run unit tests except long running ones
+./build.sh test # normal build, run unit tests
+./build.sh test quick # normal build, run unit tests except long running ones
./build.sh clean # cleanup build artifacts
./build.sh docs # generate documentation
@@ -273,6 +273,8 @@ this is also what the unit tests do when you run the MklTest build
+type unit = Unit
Full name: Microsoft.FSharp.Core.unit
+val using : resource:'T -> action:('T -> 'U) -> 'U (requires 'T :> System.IDisposable)
Full name: Microsoft.FSharp.Core.Operators.using
diff --git a/DescriptiveStatistics.html b/DescriptiveStatistics.html
index eaf203cb..08853bae 100644
--- a/DescriptiveStatistics.html
+++ b/DescriptiveStatistics.html
@@ -148,13 +148,13 @@ The mean is affected by outliers, so if you need a more robust estimate consider
7:
8:
|
-let whiteNoise = Generate.Normal(1000, mean=10.0, standardDeviation=2.0)
+let whiteNoise = Generate.Normal(1000, mean=10.0, standardDeviation=2.0)
val samples : float [] = [|12.90021939; 9.631515037; 7.810008046; 14.13301053; ...|]
-Statistics.Mean whiteNoise
+Statistics.Mean whiteNoise
val it : float = 10.02162347
-let wave = Generate.Sinusoidal(1000, samplingRate=100., frequency=5., amplitude=0.5)
-Statistics.Mean wave
+let wave = Generate.Sinusoidal(1000, samplingRate=100., frequency=5., amplitude=0.5)
+Statistics.Mean wave
val it : float = -4.133520783e-17
|
@@ -180,12 +180,12 @@ Bessel's correction with an \(N-1\) normalizer to a sa
6:
7:
|
-Statistics.Variance whiteNoise
+Statistics.Variance whiteNoise
val it : float = 3.819436094
-Statistics.StandardDeviation whiteNoise
+Statistics.StandardDeviation whiteNoise
val it : float = 1.954337764
-Statistics.Variance wave
+Statistics.Variance wave
val it : float = 0.1251251251
|
@@ -199,7 +199,7 @@ that evaluate both in a single pass:
1:
2:
|
-Statistics.MeanVariance whiteNoise
+Statistics.MeanVariance whiteNoise
val it : float * float = (10.02162347, 3.819436094)
|
|
@@ -217,9 +217,9 @@ apply Bessel's correction to bias in case of sample data.
3:
4:
-Statistics.Covariance(whiteNoise, whiteNoise)
+Statistics.Covariance(whiteNoise, whiteNoise)
val it : float = 3.819436094
-Statistics.Covariance(whiteNoise, wave)
+Statistics.Covariance(whiteNoise, wave)
val it : float = 0.04397985084
|
@@ -257,17 +257,17 @@ and also the rest of the library.
11:
12:
|
-Statistics.OrderStatistic(whiteNoise, 1)
+Statistics.OrderStatistic(whiteNoise, 1)
val it : float = 3.633070184
-Statistics.OrderStatistic(whiteNoise, 1000)
+Statistics.OrderStatistic(whiteNoise, 1000)
val it : float = 16.65183566
-let os = Statistics.orderStatisticFunc whiteNoise
-os 250
+let os = Statistics.orderStatisticFunc whiteNoise
+os 250
val it : float = 8.645491746
-os 500
+os 500
val it : float = 10.11872428
-os 750
+os 750
val it : float = 11.33170746
|
@@ -288,9 +288,9 @@ median-unbiased regardless of the sample distribution. If you need another conve
3:
4:
|
-Statistics.Median whiteNoise
+Statistics.Median whiteNoise
val it : float = 10.11872428
-Statistics.Median wave
+Statistics.Median wave
val it : float = -2.452600839e-16
|
@@ -312,9 +312,9 @@ estimates the median as discussed above.
3:
4:
|
-Statistics.LowerQuartile whiteNoise
+Statistics.LowerQuartile whiteNoise
val it : float = 8.645491746
-Statistics.UpperQuartile whiteNoise
+Statistics.UpperQuartile whiteNoise
val it : float = 11.33213732
|
@@ -330,9 +330,9 @@ the maximum value. All these values can be visualized in the popular box plot di
3:
4:
|
-Statistics.FiveNumberSummary whiteNoise
+Statistics.FiveNumberSummary whiteNoise
val it : float [] = [|3.633070184; 8.645937823; 10.12165054; 11.33213732; 16.65183566|]
-Statistics.FiveNumberSummary wave
+Statistics.FiveNumberSummary wave
val it : float [] = [|-0.5; -0.3584185509; -2.452600839e-16; 0.3584185509; 0.5|]
|
@@ -346,7 +346,7 @@ and is a robust indicator of spread. In box plots the IQR is the total height of
1:
2:
|
-Statistics.InterquartileRange whiteNoise
+Statistics.InterquartileRange whiteNoise
val it : float = 2.686199498
|
|
@@ -366,9 +366,9 @@ The 0-percentile represents the minimum value, 25 the first quartile, 50 the med
3:
4:
-Statistics.Percentile(whiteNoise, 5)
+Statistics.Percentile(whiteNoise, 5)
val it : float = 6.693373507
-Statistics.Percentile(whiteNoise, 98)
+Statistics.Percentile(whiteNoise, 98)
val it : float = 13.97580653
|
@@ -385,7 +385,7 @@ the inverse cumulative distribution function of the sample distribution.
1:
2:
|
-Statistics.Quantile(whiteNoise, 0.98)
+Statistics.Quantile(whiteNoise, 0.98)
val it : float = 13.97580653
|
|
@@ -447,7 +447,7 @@ Similar to QuantileDefinition, the RankDefinition enum
5:
6:
-Statistics.Ranks(whiteNoise)
+Statistics.Ranks(whiteNoise)
val it : float [] = [|634.0; 736.0; 405.0; 395.0; 197.0; 167.0; 722.0; 44.0; ...|]
Statistics.Ranks([| 13.0; 14.0; 11.0; 12.0; 13.0 |], RankDefinition.Average)
val it : float [] = [|3.5; 5.0; 1.0; 2.0; 3.5|]
@@ -468,9 +468,9 @@ function crosses \(\tau\).
3:
4:
|
-Statistics.QuantileRank(whiteNoise, 13.0)
+Statistics.QuantileRank(whiteNoise, 13.0)
val it : float = 0.9370045563
-Statistics.QuantileRank(whiteNoise, 6.7, RankDefinition.Average)
+Statistics.QuantileRank(whiteNoise, 6.7, RankDefinition.Average)
val it : float = 0.04960610389
|
@@ -495,14 +495,14 @@ function crosses \(\tau\).
12:
13:
|
-let ecdf = Statistics.EmpiricalCDFFunc whiteNoise
-Generate.LinearSpacedMap(20, start=3.0, stop=17.0, map=ecdf)
+let ecdf = Statistics.EmpiricalCDFFunc whiteNoise
+Generate.LinearSpacedMap(20, start=3.0, stop=17.0, map=ecdf)
val it : float [] =
[|0.0; 0.001; 0.002; 0.005; 0.022; 0.05; 0.094; 0.172; 0.278; 0.423; 0.555;
0.705; 0.843; 0.921; 0.944; 0.983; 0.992; 0.997; 0.999; 1.0|]
-let eicdf = Statistics.empiricalInvCDFFunc whiteNoise
-[ for tau in 0.0..0.05..1.0 -> eicdf tau ]
+let eicdf = Statistics.empiricalInvCDFFunc whiteNoise
+[ for tau in 0.0..0.05..1.0 -> eicdf tau ]
val it : float [] =
[3.633070184; 6.682142043; 7.520000817; 8.040513497; 8.347587493;
8.645491746; 9.02681611; 9.298987151; 9.522627142; 9.819352699; 10.11872428;
@@ -534,6 +534,12 @@ correlation coefficient, as well as their correlation matrix for a set of vector
double correlation = Correlation.Pearson(dataF, dataG);
|
|
|
+val whiteNoise : obj
Full name: DescriptiveStatistics.whiteNoise
+val wave : obj
Full name: DescriptiveStatistics.wave
+val os : (int -> obj)
Full name: DescriptiveStatistics.os
+val ecdf : obj
Full name: DescriptiveStatistics.ecdf
+val eicdf : (float -> obj)
Full name: DescriptiveStatistics.eicdf
+val tau : float
diff --git a/Generate.html b/Generate.html
index 059a07c6..34f9b342 100644
--- a/Generate.html
+++ b/Generate.html
@@ -77,7 +77,7 @@ single colon : and double colon :: operators in MATLAB
|
[ 10.0 .. 2.0 .. 15.0 ]
val it : float list = [10.0; 12.0; 14.0]
-[ for x in 10.0 .. 2.0 .. 15.0 -> sin x ]
+[ for x in 10.0 .. 2.0 .. 15.0 -> sin x ]
val it : float list = [-0.5440211109; -0.536572918; 0.9906073557]
|
@@ -111,7 +111,7 @@ Generate.LinearSpacedMap(15, 0.0,
4:
5:
-Generate.linearSpacedMap 15 0.0 Math.PI sin
+Generate.linearSpacedMap 15 0.0 Math.PI sin
val it : float [] =
[|0.0; 0.222520934; 0.4338837391; 0.6234898019; 0.7818314825; 0.9009688679;
0.9749279122; 1.0; 0.9749279122; 0.9009688679; 0.7818314825; 0.6234898019;
@@ -245,7 +245,7 @@ Generate.Map(a, x => x 1:
2:
|
-Array.map ((+) 1.0) a
+Array.map ((+) 1.0) a
val it : float [] = [|3.0; 5.0; 4.0; 7.0|]
|
|
@@ -261,8 +261,8 @@ You can use LINQ, but that operates on sequences instead of arrays:
2:
3:
|
-let b = [| 1.0; -1.0; 2.0; -2.0 |]
-Generate.Map2(a, b, fun x y -> x + y)
+let b = [| 1.0; -1.0; 2.0; -2.0 |]
+Generate.Map2(a, b, fun x y -> x + y)
val it : float [] = [|3.0; 3.0; 5.0; 4.0|]
|
@@ -271,7 +271,7 @@ You can use LINQ, but that operates on sequences instead of arrays:
1:
2:
|
-Array.map2 (+) a b
+Array.map2 (+) a b
val it : float [] = [|3.0; 3.0; 5.0; 4.0|]
|
|
@@ -282,6 +282,13 @@ You can use LINQ, but that operates on sequences instead of arrays:
a.Zip(b, (x, y) => x + y).ToArray();
|
+val x : float
+val sin : value:'T -> 'T (requires member Sin)
Full name: Microsoft.FSharp.Core.Operators.sin
+module Array
from Microsoft.FSharp.Collections
+val map : mapping:('T -> 'U) -> array:'T [] -> 'U []
Full name: Microsoft.FSharp.Collections.Array.map
+val a : float []
Full name: Generate.a
+val b : float []
Full name: Generate.b
+val map2 : mapping:('T1 -> 'T2 -> 'U) -> array1:'T1 [] -> array2:'T2 [] -> 'U []
Full name: Microsoft.FSharp.Collections.Array.map2
diff --git a/IFsharpNotebook.html b/IFsharpNotebook.html
index 2ff9f805..fa2eaa33 100644
--- a/IFsharpNotebook.html
+++ b/IFsharpNotebook.html
@@ -129,54 +129,85 @@ Unfortunately loading this script requires the exact version in the path - if yo
|
open MathNet.Numerics.LinearAlgebra
-let inline (|Float|_|) (v:obj) =
- if v :? float then Some(v :?> float) else None
-let inline (|Float32|_|) (v:obj) =
- if v :? float32 then Some(v :?> float32) else None
-let inline (|PositiveInfinity|_|) (v: ^T) =
- if (^T : (static member IsPositiveInfinity: 'T -> bool) (v))
- then Some PositiveInfinity else None
-let inline (|NegativeInfinity|_|) (v: ^T) =
- if (^T : (static member IsNegativeInfinity: 'T -> bool) (v))
- then Some NegativeInfinity else None
-let inline (|NaN|_|) (v: ^T) =
- if (^T : (static member IsNaN: 'T -> bool) (v))
- then Some NaN else None
+let inline (|Float|_|) (v:obj) =
+ if v :? float then Some(v :?> float) else None
+let inline (|Float32|_|) (v:obj) =
+ if v :? float32 then Some(v :?> float32) else None
+let inline (|PositiveInfinity|_|) (v: ^T) =
+ if (^T : (static member IsPositiveInfinity: 'T -> bool) (v))
+ then Some PositiveInfinity else None
+let inline (|NegativeInfinity|_|) (v: ^T) =
+ if (^T : (static member IsNegativeInfinity: 'T -> bool) (v))
+ then Some NegativeInfinity else None
+let inline (|NaN|_|) (v: ^T) =
+ if (^T : (static member IsNaN: 'T -> bool) (v))
+ then Some NaN else None
-let inline formatMathValue (floatFormat:string) = function
- | PositiveInfinity -> "\\infty"
- | NegativeInfinity -> "-\\infty"
- | NaN -> "\\times"
- | Float v -> v.ToString(floatFormat)
- | Float32 v -> v.ToString(floatFormat)
- | v -> v.ToString()
+let inline formatMathValue (floatFormat:string) = function
+ | PositiveInfinity -> "\\infty"
+ | NegativeInfinity -> "-\\infty"
+ | NaN -> "\\times"
+ | Float v -> v.ToString(floatFormat)
+ | Float32 v -> v.ToString(floatFormat)
+ | v -> v.ToString()
-let inline formatMatrix (matrix: Matrix<'T>) =
- String.concat Environment.NewLine
- [ "\\begin{bmatrix}"
- matrix.ToMatrixString(10,4,7,2,"\\cdots","\\vdots","\\ddots",
- " & ", "\\\\ " + Environment.NewLine, (fun x -> formatMathValue "G4" x))
- "\\end{bmatrix}" ]
+let inline formatMatrix (matrix: Matrix<'T>) =
+ String.concat Environment.NewLine
+ [ "\\begin{bmatrix}"
+ matrix.ToMatrixString(10,4,7,2,"\\cdots","\\vdots","\\ddots",
+ " & ", "\\\\ " + Environment.NewLine, (fun x -> formatMathValue "G4" x))
+ "\\end{bmatrix}" ]
-let inline formatVector (vector: Vector<'T>) =
- String.concat Environment.NewLine
- [ "\\begin{bmatrix}"
- vector.ToVectorString(12, 80, "\\vdots", " & ", "\\\\ " + Environment.NewLine,
- (fun x -> formatMathValue "G4" x))
- "\\end{bmatrix}" ]
+let inline formatVector (vector: Vector<'T>) =
+ String.concat Environment.NewLine
+ [ "\\begin{bmatrix}"
+ vector.ToVectorString(12, 80, "\\vdots", " & ", "\\\\ " + Environment.NewLine,
+ (fun x -> formatMathValue "G4" x))
+ "\\end{bmatrix}" ]
-App.AddDisplayPrinter (fun (x:Matrix<float>) ->
- { ContentType = "text/latex"; Data = formatMatrix x })
-App.AddDisplayPrinter (fun (x:Matrix<float32>) ->
- { ContentType = "text/latex"; Data = formatMatrix x })
-App.AddDisplayPrinter (fun (x:Vector<float>) ->
- { ContentType = "text/latex"; Data = formatVector x })
-App.AddDisplayPrinter (fun (x:Vector<float32>) ->
- { ContentType = "text/latex"; Data = formatVector x })
+App.AddDisplayPrinter (fun (x:Matrix<float>) ->
+ { ContentType = "text/latex"; Data = formatMatrix x })
+App.AddDisplayPrinter (fun (x:Matrix<float32>) ->
+ { ContentType = "text/latex"; Data = formatMatrix x })
+App.AddDisplayPrinter (fun (x:Vector<float>) ->
+ { ContentType = "text/latex"; Data = formatVector x })
+App.AddDisplayPrinter (fun (x:Vector<float32>) ->
+ { ContentType = "text/latex"; Data = formatVector x })
|
|
+val v : obj
+type obj = System.Object
Full name: Microsoft.FSharp.Core.obj
+Multiple items val float : value:'T -> float (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.Operators.float
-------------------- type float = System.Double
Full name: Microsoft.FSharp.Core.float
-------------------- type float<'Measure> = float
Full name: Microsoft.FSharp.Core.float<_>
+union case Option.Some: Value: 'T -> Option<'T>
+union case Option.None: Option<'T>
+Multiple items val float32 : value:'T -> float32 (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.Operators.float32
-------------------- type float32 = System.Single
Full name: Microsoft.FSharp.Core.float32
-------------------- type float32<'Measure> = float32
Full name: Microsoft.FSharp.Core.float32<_>
+val v : 'T (requires member IsPositiveInfinity)
+type bool = System.Boolean
Full name: Microsoft.FSharp.Core.bool
+val v : 'T (requires member IsNegativeInfinity)
+val v : 'T (requires member IsNaN)
+val formatMathValue : floatFormat:string -> _arg1:'a -> string (requires member IsNaN and member IsPositiveInfinity and member IsNegativeInfinity)
Full name: IFsharpNotebook.formatMathValue
+val floatFormat : string
+Multiple items val string : value:'T -> string
Full name: Microsoft.FSharp.Core.Operators.string
-------------------- type string = System.String
Full name: Microsoft.FSharp.Core.string
+active recognizer PositiveInfinity: 'T -> unit option
Full name: IFsharpNotebook.( |PositiveInfinity|_| )
+active recognizer NegativeInfinity: 'T -> unit option
Full name: IFsharpNotebook.( |NegativeInfinity|_| )
+active recognizer NaN: 'T -> unit option
Full name: IFsharpNotebook.( |NaN|_| )
+active recognizer Float: obj -> float option
Full name: IFsharpNotebook.( |Float|_| )
+val v : float
+System.Double.ToString() : string System.Double.ToString(provider: System.IFormatProvider) : string System.Double.ToString(format: string) : string System.Double.ToString(format: string, provider: System.IFormatProvider) : string
+active recognizer Float32: obj -> float32 option
Full name: IFsharpNotebook.( |Float32|_| )
+val v : float32
+System.Single.ToString() : string System.Single.ToString(format: string) : string System.Single.ToString(provider: System.IFormatProvider) : string System.Single.ToString(format: string, provider: System.IFormatProvider) : string
+val v : 'a (requires member IsNaN and member IsPositiveInfinity and member IsNegativeInfinity)
+System.Object.ToString() : string
+val formatMatrix : matrix:'a -> string
Full name: IFsharpNotebook.formatMatrix
+val matrix : 'a
+module String
from Microsoft.FSharp.Core
+val concat : sep:string -> strings:seq<string> -> string
Full name: Microsoft.FSharp.Core.String.concat
+val formatVector : vector:'a -> string
Full name: IFsharpNotebook.formatVector
+val vector : 'a
+namespace Microsoft.FSharp.Data
diff --git a/LinearEquations.html b/LinearEquations.html
index 95c5d29e..6960e680 100644
--- a/LinearEquations.html
+++ b/LinearEquations.html
@@ -117,11 +117,11 @@ a_{m1} & a_{m2} & \cdots & a_{mn}
4:
5:
|
-let A = matrix [[ 3.0; 2.0; -1.0 ]
+let A = matrix [[ 3.0; 2.0; -1.0 ]
[ 2.0; -2.0; 4.0 ]
[ -1.0; 0.5; -1.0 ]]
-let b = vector [ 1.0; -2.0; 0.0 ]
-let x = A.Solve(b) // 1;-2;-2
+let b = vector [ 1.0; -2.0; 0.0 ]
+let x = A.Solve(b) // 1;-2;-2
|
|
@@ -158,16 +158,22 @@ become zero on the right side), by introducing a new column each. First we subtr
5:
6:
|
-let A' = matrix [[ 3.0; 4.0; -1.0; 0.0 ]
+let A' = matrix [[ 3.0; 4.0; -1.0; 0.0 ]
[ 4.0; 5.0; 0.0; -1.0 ]
[ 5.0; 6.0; 0.0; 0.0; ]
[ 6.0; 7.0; 0.0; 0.0 ]]
-let b' = vector [ 0.0; 0.0; 20.0; 0.0 ]
-let x' = A'.Solve(b') // -140; 120; 60; 40
+let b' = vector [ 0.0; 0.0; 20.0; 0.0 ]
+let x' = A'.Solve(b') // -140; 120; 60; 40
|
+val A : obj
Full name: LinearEquations.A
+val b : obj
Full name: LinearEquations.b
+val x : obj
Full name: LinearEquations.x
+val A' : obj
Full name: LinearEquations.A'
+val b' : obj
Full name: LinearEquations.b'
+val x' : obj
Full name: LinearEquations.x'
diff --git a/MKL.html b/MKL.html
index 3ecf7b73..b8af1576 100644
--- a/MKL.html
+++ b/MKL.html
@@ -174,8 +174,8 @@ directory somewhere and use them directly from there:
1:
2:
|
-Control.NativeProviderPath <- @"C:\MKL"
-Control.UseNativeMKL()
+Control.NativeProviderPath <- @"C:\MKL"
+Control.UseNativeMKL()
|
|
@@ -189,11 +189,11 @@ MKL provider automatically.
4:
5:
|
-open System.IO
+open System.IO
open MathNet.Numerics
-Control.NativeProviderPath <- Path.Combine(__SOURCE_DIRECTORY__,"../")
-Control.UseNativeMKL()
+Control.NativeProviderPath <- Path.Combine(__SOURCE_DIRECTORY__,"../")
+Control.UseNativeMKL()
|
@@ -320,6 +320,11 @@ Numerics MKL native provider for free for your own use. However, it does not
redistribute it again yourself to customers of your own product. If you need to redistribute,
buy a license from Intel. If unsure, contact the Intel sales team to clarify.
+namespace Microsoft.FSharp.Control
+namespace System
+namespace System.IO
+type Path = static val DirectorySeparatorChar : char static val AltDirectorySeparatorChar : char static val VolumeSeparatorChar : char static val InvalidPathChars : char[] static val PathSeparator : char static member ChangeExtension : path:string * extension:string -> string static member Combine : [<ParamArray>] paths:string[] -> string + 3 overloads static member GetDirectoryName : path:string -> string static member GetExtension : path:string -> string static member GetFileName : path:string -> string ...
Full name: System.IO.Path
+Path.Combine([<System.ParamArray>] paths: string []) : string Path.Combine(path1: string, path2: string) : string Path.Combine(path1: string, path2: string, path3: string) : string Path.Combine(path1: string, path2: string, path3: string, path4: string) : string
diff --git a/Matrix.html b/Matrix.html
index 013c57f6..5ad08d90 100644
--- a/Matrix.html
+++ b/Matrix.html
@@ -325,31 +325,31 @@ V.Dense(x);
24:
25:
|
-let m1 = matrix [[ 2.0; 3.0 ]
+let m1 = matrix [[ 2.0; 3.0 ]
[ 4.0; 5.0 ]]
-let v1 = vector [ 1.0; 2.0; 3.0 ]
+let v1 = vector [ 1.0; 2.0; 3.0 ]
// dense 3x4 matrix filled with zeros.
// (usually the type is inferred, but not for zero matrices)
-let m2 = DenseMatrix.zero<float> 3 4
+let m2 = DenseMatrix.zero<float> 3 4
// dense 3x4 matrix initialized by a function
-let m3 = DenseMatrix.init 3 4 (fun i j -> float (i+j))
+let m3 = DenseMatrix.init 3 4 (fun i j -> float (i+j))
// diagonal 4x4 identity matrix of single precision
-let m4 = DiagonalMatrix.identity<float32> 4
+let m4 = DiagonalMatrix.identity<float32> 4
// dense 3x4 matrix created from a sequence of sequence-columns
-let x = Seq.init 4 (fun c -> Seq.init 3 (fun r -> float (100*r + c)))
-let m5 = DenseMatrix.ofColumnSeq x
+let x = Seq.init 4 (fun c -> Seq.init 3 (fun r -> float (100*r + c)))
+let m5 = DenseMatrix.ofColumnSeq x
// random matrix with standard distribution:
-let m6 = DenseMatrix.randomStandard<float> 3 4
+let m6 = DenseMatrix.randomStandard<float> 3 4
// random matrix with a uniform and one with a Gamma distribution:
-let m7a = DenseMatrix.random<float> 3 4 (ContinuousUniform(-2.0, 4.0))
-let m7b = DenseMatrix.random<float> 3 4 (Gamma(1.0, 2.0))
+let m7a = DenseMatrix.random<float> 3 4 (ContinuousUniform(-2.0, 4.0))
+let m7b = DenseMatrix.random<float> 3 4 (Gamma(1.0, 2.0))
|
@@ -367,14 +367,14 @@ operators .*, ./ and .% available for con
7:
8:
|
-let m = matrix [[ 1.0; 4.0; 7.0 ]
+let m = matrix [[ 1.0; 4.0; 7.0 ]
[ 2.0; 5.0; 8.0 ]
[ 3.0; 6.0; 9.0 ]]
-let v = vector [ 10.0; 20.0; 30.0 ]
+let v = vector [ 10.0; 20.0; 30.0 ]
-let v' = m * v
-let m' = m + 2.0*m
+let v' = m * v
+let m' = m + 2.0*m
|
@@ -571,7 +571,7 @@ m[0,2]; // -1In F#:
1:
|
-m.[2,0] // 20
+m.[2,0] // 20
|
|
@@ -599,11 +599,11 @@ to overwrite those elements with the provided data.
4:
5:
|
-let m = DenseMatrix.init 6 4 (fun i j -> float (10*i + j))
-m.[0,0..3] // vector [0,1,2,3]
-m.[1..2,0..3] // matrix [10,11,12,13; 20,21,22,23]
+let m = DenseMatrix.init 6 4 (fun i j -> float (10*i + j))
+m.[0,0..3] // vector [0,1,2,3]
+m.[1..2,0..3] // matrix [10,11,12,13; 20,21,22,23]
// overwrite a sub-matrix with the content of another matrix:
-m.[0..1,1..2] <- matrix [[ 3.0; 4.0 ]; [ 5.0; 6.0 ]]
+m.[0..1,1..2] <- matrix [[ 3.0; 4.0 ]; [ 5.0; 6.0 ]]
|
@@ -689,8 +689,8 @@ Vector<Double> v = u.Map(c =
1:
2:
|
-let u = DenseVector.randomStandard<Complex> 10
-let v = u |> Vector.map (fun c -> c.Real)
+let u = DenseVector.randomStandard<Complex> 10
+let v = u |> Vector.map (fun c -> c.Real)
|
|
@@ -917,6 +917,30 @@ DenseMatrix 5x100-Double
to load the MathNet.Numerics.fsx script of the F# package. Besides loading
the assemblies it also adds proper FSI printers for both matrices and vectors.
+val m1 : obj
Full name: Matrix.m1
+val v1 : obj
Full name: Matrix.v1
+val m2 : obj
Full name: Matrix.m2
+Multiple items val float : value:'T -> float (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.Operators.float
-------------------- type float = System.Double
Full name: Microsoft.FSharp.Core.float
-------------------- type float<'Measure> = float
Full name: Microsoft.FSharp.Core.float<_>
+val m3 : obj
Full name: Matrix.m3
+val m4 : obj
Full name: Matrix.m4
+Multiple items val float32 : value:'T -> float32 (requires member op_Explicit)
Full name: Microsoft.FSharp.Core.Operators.float32
-------------------- type float32 = System.Single
Full name: Microsoft.FSharp.Core.float32
-------------------- type float32<'Measure> = float32
Full name: Microsoft.FSharp.Core.float32<_>
+val x : seq<seq<float>>
Full name: Matrix.x
+module Seq
from Microsoft.FSharp.Collections
+val init : count:int -> initializer:(int -> 'T) -> seq<'T>
Full name: Microsoft.FSharp.Collections.Seq.init
+val c : int
+val r : int
+val m5 : obj
Full name: Matrix.m5
+val m6 : obj
Full name: Matrix.m6
+val m7a : obj
Full name: Matrix.m7a
+val m7b : obj
Full name: Matrix.m7b
+val m : float
Full name: Matrix.m
+val v : float
Full name: Matrix.v
+val v' : float
Full name: Matrix.v'
+val m' : float
Full name: Matrix.m'
+val m : obj
Full name: Matrix.m
+val u : obj
Full name: Matrix.u
+Multiple items type Complex = struct new : real:float * imaginary:float -> Complex member Equals : obj:obj -> bool + 1 overload member GetHashCode : unit -> int member Imaginary : float member Magnitude : float member Phase : float member Real : float member ToString : unit -> string + 3 overloads static val Zero : Complex static val One : Complex ... end
Full name: System.Numerics.Complex
-------------------- Complex() Complex(real: float, imaginary: float) : unit
+val v : obj
Full name: Matrix.v
diff --git a/Probability.html b/Probability.html
index 16f593ae..7eea1fbd 100644
--- a/Probability.html
+++ b/Probability.html
@@ -198,12 +198,12 @@ gamma2.RandomSource = 7:
|
// some probability distributions
-let normal = Normal.WithMeanVariance(3.0, 1.5, a)
-let exponential = Exponential(2.4)
-let gamma = Gamma(2.0, 1.5, Random.crypto())
-let cauchy = Cauchy(0.0, 1.0, Random.mrg32k3aWith 10 false)
-let poisson = Poisson(3.0)
-let geometric = Geometric(0.8, Random.system())
+let normal = Normal.WithMeanVariance(3.0, 1.5, a)
+let exponential = Exponential(2.4)
+let gamma = Gamma(2.0, 1.5, Random.crypto())
+let cauchy = Cauchy(0.0, 1.0, Random.mrg32k3aWith 10 false)
+let poisson = Poisson(3.0)
+let geometric = Geometric(0.8, Random.system())
|
@@ -213,9 +213,9 @@ estimation from a set of samples:
2:
3:
|
-let estimation = LogNormal.Estimate([| 2.0; 1.5; 2.1; 1.2; 3.0; 2.4; 1.8 |])
-let mean, variance = estimation.Mean, estimation.Variance
-let moreSamples = estimation.Samples() |> Seq.take 10 |> Seq.toArray
+let estimation = LogNormal.Estimate([| 2.0; 1.5; 2.1; 1.2; 3.0; 2.4; 1.8 |])
+let mean, variance = estimation.Mean, estimation.Variance
+let moreSamples = estimation.Samples() |> Seq.take 10 |> Seq.toArray
|
@@ -249,16 +249,16 @@ but one can easily replace this with more sophisticated random number generators
|
// sample some random numbers from these distributions
// continuous distributions sample to floating-point numbers:
-let continuous =
- [ yield normal.Sample()
- yield exponential.Sample()
- yield! gamma.Samples() |> Seq.take 10 ]
+let continuous =
+ [ yield normal.Sample()
+ yield exponential.Sample()
+ yield! gamma.Samples() |> Seq.take 10 ]
// discrete distributions on the other hand sample to integers:
-let discrete =
- [ poisson.Sample()
- poisson.Sample()
- geometric.Sample() ]
+let discrete =
+ [ poisson.Sample()
+ poisson.Sample()
+ geometric.Sample() ]
|
@@ -273,12 +273,12 @@ Note that no intermediate value caching is possible this way and parameters must
7:
// using the default number generator (SystemRandomSource.Default)
-let w = Rayleigh.Sample(1.5)
-let x = Hypergeometric.Sample(100, 20, 5)
+let w = Rayleigh.Sample(1.5)
+let x = Hypergeometric.Sample(100, 20, 5)
// or by manually providing the uniform random number generator
-let u = Normal.Sample(Random.system(), 2.0, 4.0)
-let v = Laplace.Samples(Random.mersenneTwister(), 1.0, 3.0) |> Seq.take 100 |> List.ofSeq
+let u = Normal.Sample(Random.system(), 2.0, 4.0)
+let v = Laplace.Samples(Random.mersenneTwister(), 1.0, 3.0) |> Seq.take 100 |> List.ofSeq
|
@@ -297,8 +297,8 @@ Laplace.Samples(samples, 1.0, 2.0)
1:
2:
|
-Seq.scan (+) 0.0 (Normal.Samples(0.0, 1.0)) |> Seq.take 10 |> Seq.toArray
-Seq.scan (+) 0.0 (Cauchy.Samples(0.0, 1.0)) |> Seq.take 10 |> Seq.toArray
+Seq.scan (+) 0.0 (Normal.Samples(0.0, 1.0)) |> Seq.take 10 |> Seq.toArray
+Seq.scan (+) 0.0 (Cauchy.Samples(0.0, 1.0)) |> Seq.take 10 |> Seq.toArray
|
|
@@ -331,26 +331,26 @@ some of them are also available with the Ln-suffix.
21:
// distribution properties of the gamma we've configured above
-let gammaStats =
- ( gamma.Mean,
- gamma.Variance,
- gamma.StdDev,
- gamma.Entropy,
- gamma.Skewness,
- gamma.Mode )
+let gammaStats =
+ ( gamma.Mean,
+ gamma.Variance,
+ gamma.StdDev,
+ gamma.Entropy,
+ gamma.Skewness,
+ gamma.Mode )
// probability distribution functions of the normal we've configured above.
-let nd = normal.Density(4.0) (* PDF *)
-let ndLn = normal.DensityLn(4.0) (* ln(PDF) *)
-let nc = normal.CumulativeDistribution(4.0) (* CDF *)
-let nic = normal.InverseCumulativeDistribution(0.7) (* CDF^(-1) *)
+let nd = normal.Density(4.0) (* PDF *)
+let ndLn = normal.DensityLn(4.0) (* ln(PDF) *)
+let nc = normal.CumulativeDistribution(4.0) (* CDF *)
+let nic = normal.InverseCumulativeDistribution(0.7) (* CDF^(-1) *)
// Distribution functions can also be evaluated without creating an object,
// but then you have to pass in the distribution parameters as first arguments:
-let nd2 = Normal.PDF(3.0, sqrt 1.5, 4.0)
-let ndLn2 = Normal.PDFLn(3.0, sqrt 1.5, 4.0)
-let nc2 = Normal.CDF(3.0, sqrt 1.5, 4.0)
-let nic2 = Normal.InvCDF(3.0, sqrt 1.5, 0.7)
+let nd2 = Normal.PDF(3.0, sqrt 1.5, 4.0)
+let ndLn2 = Normal.PDFLn(3.0, sqrt 1.5, 4.0)
+let nc2 = Normal.CDF(3.0, sqrt 1.5, 4.0)
+let nic2 = Normal.InvCDF(3.0, sqrt 1.5, 0.7)
|
@@ -376,25 +376,65 @@ This way they can be composed and transformed arbitrarily if curried:
16:
/// Transform a sample from a distribution
-let s1 rng = tanh (Sample.normal 2.0 0.5 rng)
+let s1 rng = tanh (Sample.normal 2.0 0.5 rng)
/// But we really want to transform the function, not the resulting sample:
-let s1f rng = Sample.map tanh (Sample.normal 2.0 0.5) rng
+let s1f rng = Sample.map tanh (Sample.normal 2.0 0.5) rng
/// Exactly the same also works with functions generating full sequences
-let s1s rng = Sample.mapSeq tanh (Sample.normalSeq 2.0 0.5) rng
+let s1s rng = Sample.mapSeq tanh (Sample.normalSeq 2.0 0.5) rng
/// Now with multiple distributions, e.g. their product:
-let s2 rng = (Sample.normal 2.0 1.5 rng) * (Sample.cauchy 2.0 0.5 rng)
-let s2f rng = Sample.map2 (*) (Sample.normal 2.0 1.5) (Sample.cauchy 2.0 0.5) rng
-let s2s rng = Sample.mapSeq2 (*) (Sample.normalSeq 2.0 1.5) (Sample.cauchySeq 2.0 0.5) rng
+let s2 rng = (Sample.normal 2.0 1.5 rng) * (Sample.cauchy 2.0 0.5 rng)
+let s2f rng = Sample.map2 (*) (Sample.normal 2.0 1.5) (Sample.cauchy 2.0 0.5) rng
+let s2s rng = Sample.mapSeq2 (*) (Sample.normalSeq 2.0 1.5) (Sample.cauchySeq 2.0 0.5) rng
// Taking some samples from the composed function
-Seq.take 10 (s2s (Random.system())) |> Seq.toArray
+Seq.take 10 (s2s (Random.system())) |> Seq.toArray
|
+val normal : obj
Full name: Probability.normal
+val exponential : obj
Full name: Probability.exponential
+val gamma : obj
Full name: Probability.gamma
+val cauchy : obj
Full name: Probability.cauchy
+val poisson : obj
Full name: Probability.poisson
+val geometric : obj
Full name: Probability.geometric
+val estimation : obj
Full name: Probability.estimation
+val mean : obj
Full name: Probability.mean
+val variance : obj
Full name: Probability.variance
+val moreSamples : obj []
Full name: Probability.moreSamples
+module Seq
from Microsoft.FSharp.Collections
+val take : count:int -> source:seq<'T> -> seq<'T>
Full name: Microsoft.FSharp.Collections.Seq.take
+val toArray : source:seq<'T> -> 'T []
Full name: Microsoft.FSharp.Collections.Seq.toArray
+val continuous : obj list
Full name: Probability.continuous
+val discrete : obj list
Full name: Probability.discrete
+val w : obj
Full name: Probability.w
+val x : obj
Full name: Probability.x
+val u : obj
Full name: Probability.u
+val v : obj list
Full name: Probability.v
+Multiple items
module List
from Microsoft.FSharp.Collections
--------------------
type List<'T> =
| ( [] )
| ( :: ) of Head: 'T * Tail: 'T list
interface IEnumerable
interface IEnumerable<'T>
member GetSlice : startIndex:int option * endIndex:int option -> 'T list
member Head : 'T
member IsEmpty : bool
member Item : index:int -> 'T with get
member Length : int
member Tail : 'T list
static member Cons : head:'T * tail:'T list -> 'T list
static member Empty : 'T list
Full name: Microsoft.FSharp.Collections.List<_>
+val ofSeq : source:seq<'T> -> 'T list
Full name: Microsoft.FSharp.Collections.List.ofSeq
+val scan : folder:('State -> 'T -> 'State) -> state:'State -> source:seq<'T> -> seq<'State>
Full name: Microsoft.FSharp.Collections.Seq.scan
+val gammaStats : obj * obj * obj * obj * obj * obj
Full name: Probability.gammaStats
+val nd : obj
Full name: Probability.nd
+val ndLn : obj
Full name: Probability.ndLn
+val nc : obj
Full name: Probability.nc
+val nic : obj
Full name: Probability.nic
+val nd2 : obj
Full name: Probability.nd2
+val sqrt : value:'T -> 'U (requires member Sqrt)
Full name: Microsoft.FSharp.Core.Operators.sqrt
+val ndLn2 : obj
Full name: Probability.ndLn2
+val nc2 : obj
Full name: Probability.nc2
+val nic2 : obj
Full name: Probability.nic2
+val s1 : rng:'a -> float
Full name: Probability.s1
Transform a sample from a distribution
+val rng : 'a
+val tanh : value:'T -> 'T (requires member Tanh)
Full name: Microsoft.FSharp.Core.Operators.tanh
+val s1f : rng:'a -> 'b
Full name: Probability.s1f
But we really want to transform the function, not the resulting sample:
+val s1s : rng:'a -> 'b
Full name: Probability.s1s
Exactly the same also works with functions generating full sequences
+val s2 : rng:'a -> obj
Full name: Probability.s2
Now with multiple distributions, e.g. their product:
+val s2f : rng:'a -> 'b
Full name: Probability.s2f
+val s2s : rng:'a -> 'b
Full name: Probability.s2s
diff --git a/Random.html b/Random.html
index 5063f527..da7d01b4 100644
--- a/Random.html
+++ b/Random.html
@@ -124,18 +124,18 @@ System.Random rng
= SystemRandomSource.Default;
11:
12:
-
let samples = Random.doubles 1000
+let samples = Random.doubles 1000
// overwrite the whole array with new random values
-Random.doubleFill samples
+Random.doubleFill samples
// create an infinite sequence:
-let sampleSeq = Random.doubleSeq ()
+let sampleSeq = Random.doubleSeq ()
// take a single random value
-let rng = Random.shared
-let sample = rng.NextDouble()
-let sampled = rng.NextDecimal()
+let rng = Random.shared
+let sample = rng.NextDouble()
+let sampled = rng.NextDecimal()
|
@@ -187,9 +187,9 @@ or else a combination of a random number from a shared RNG, the time and a Guid
2:
3:
|
-
let someTimeSeed = RandomSeed.Time() // not recommended
-let someGuidSeed = RandomSeed.Guid()
-let someRobustSeed = RandomSeed.Robust() // recommended, used by default
+let someTimeSeed = RandomSeed.Time() // not recommended
+let someGuidSeed = RandomSeed.Guid()
+let someRobustSeed = RandomSeed.Robust() // recommended, used by default
|
@@ -198,9 +198,9 @@ or else a combination of a random number from a shared RNG, the time and a Guid
2:
3:
|
-
let samplesSeeded = Random.doublesSeed 42 1000
-Random.doubleFillSeed 42 samplesSeeded
-let samplesSeqSeeded = Random.doubleSeqSeed 42
+let samplesSeeded = Random.doublesSeed 42 1000
+Random.doubleFillSeed 42 samplesSeeded
+let samplesSeqSeeded = Random.doubleSeqSeed 42
|
@@ -269,18 +269,18 @@ In case of the latter, all objects will be cast to their common base type
13:
|
// By using the normal constructor (random1 has type MersenneTwister)
-let random1 = MersenneTwister()
-let random1b = MersenneTwister(42) // with seed
+let random1 = MersenneTwister()
+let random1b = MersenneTwister(42) // with seed
// By using the Random module (random2 has type System.Random)
-let random2 = Random.mersenneTwister ()
-let random2b = Random.mersenneTwisterSeed 42 // with seed
-let random2c = Random.mersenneTwisterWith 42 false // opt-out of thread-safety
+let random2 = Random.mersenneTwister ()
+let random2b = Random.mersenneTwisterSeed 42 // with seed
+let random2c = Random.mersenneTwisterWith 42 false // opt-out of thread-safety
// Using some other algorithms:
-let random3 = Random.crypto ()
-let random4 = Random.xorshift ()
-let random5 = Random.wh2006 ()
+let random3 = Random.crypto ()
+let random4 = Random.xorshift ()
+let random5 = Random.wh2006 ()
|
@@ -314,11 +314,11 @@ unless explicitly disabled by a constructor argument or by setting
Control
4:
5:
-let a = Random.systemShared
-let b = Random.mersenneTwisterShared
+let a = Random.systemShared
+let b = Random.mersenneTwisterShared
// or if you don't care, simply
-let c = Random.shared;
+let c = Random.shared;
|
@@ -351,6 +351,27 @@ Normal.Samples(c, 0.0, 1.0);
|
See Probability Distributions for details.
+val samples : obj
Full name: Random.samples
+val sampleSeq : obj
Full name: Random.sampleSeq
+val rng : obj
Full name: Random.rng
+val sample : obj
Full name: Random.sample
+val sampled : obj
Full name: Random.sampled
+val someTimeSeed : obj
Full name: Random.someTimeSeed
+val someGuidSeed : obj
Full name: Random.someGuidSeed
+val someRobustSeed : obj
Full name: Random.someRobustSeed
+val samplesSeeded : obj
Full name: Random.samplesSeeded
+val samplesSeqSeeded : obj
Full name: Random.samplesSeqSeeded
+val random1 : obj
Full name: Random.random1
+val random1b : obj
Full name: Random.random1b
+val random2 : obj
Full name: Random.random2
+val random2b : obj
Full name: Random.random2b
+val random2c : obj
Full name: Random.random2c
+val random3 : obj
Full name: Random.random3
+val random4 : obj
Full name: Random.random4
+val random5 : obj
Full name: Random.random5
+val a : obj
Full name: Random.a
+val b : obj
Full name: Random.b
+val c : obj
Full name: Random.c
diff --git a/Regression.html b/Regression.html
index f3838f65..fcccdbcb 100644
--- a/Regression.html
+++ b/Regression.html
@@ -89,7 +89,7 @@ Tuple<
double,
double> p
Or in F#:
1:
|
-let a, b = Fit.Line ([|10.0;20.0;30.0|], [|15.0;20.0;25.0|])
+let a, b = Fit.Line ([|10.0;20.0;30.0|], [|15.0;20.0;25.0|])
|
|
@@ -285,6 +285,8 @@ are dependent on the point of interest \(t\).
+val a : obj
Full name: Regression.a
+val b : obj
Full name: Regression.b
diff --git a/ReleaseNotes-MKL.html b/ReleaseNotes-MKL.html
index 179290fc..a6310cb4 100644
--- a/ReleaseNotes-MKL.html
+++ b/ReleaseNotes-MKL.html
@@ -58,7 +58,7 @@