Evaluating predictions and tests

Binder Notebook

Table of contents

FSharp.Stats contains a collection for assessing both binary and multi-label comparisons, for example the results of a binary/multi-label classification or the results of a statistical test.

Usually, using the functions provided by the ComparisonMetrics module should be enough, but for clarity this documentation also introduces the BinaryConfusionMatrix and MultiLabelConfusionMatrix types that are used to derive the ComparisonMetrics.

Confusion matrices

See also: https://en.wikipedia.org/wiki/Confusion_matrix

Confusion matrices can be used to count and visualize the outcomes of a prediction against the actual 'true' values and therefore assess the prediction quality.

Each row of the matrix represents the instances in an actual class while each column represents the instances in a predicted class, or vice versa. The name stems from the fact that it makes it easy to see whether the system is confusing two classes (i.e. commonly mislabeling one as another).

Binary confusion matrix

A binary confusion matrix is a special kind of contingency table, with two dimensions ("actual" and "predicted"), and identical sets of "classes" in both dimensions (each combination of dimension and class is a variable in the contingency table).

let for example the actual labels be the set

\[actual = (1,1,1,1,0,0,0)\]

and the predictions

\[predicted = (1,1,1,0,1,0,0)\]

a binary confusion matrix can be filled by comparing actual and predicted values at their respective indices:

predicted

True

False

actual

True

3

1

False

1

2

A whole array of prediction/test evaluation metrics can be derived from binary confusion matrices, which are all based on the 4 values of the confusion matrix:

  • TP (True Positives, the actual true labels predicted correctly as true)
  • TN (True Negatives, the actual false labels predicted correctly as false)
  • FP (False Positives, the actual false labels incorrectly predicted as true)
  • TP (False Negatives, the actual true labels incorrectly predicted as false)

Predicted

True

False

Actual

True

TP

FN

False

FP

TN

These 4 base metrics are in principle what comprises the record type BinaryConfusionMatrix.

A BinaryConfusionMatrix can be created in various ways :

  • from predictions and actual labels of any type using BinaryConfusionMatrix.fromPredictions, additionally passing which label is the "positive" label
let actual = [1;1;1;1;0;0;0]
let predicted = [1;1;1;0;1;0;0]

open FSharp.Stats.Testing

BinaryConfusionMatrix.ofPredictions(1,actual,predicted)
{ TP = 3
  TN = 2
  FP = 1
  FN = 1 }
  • from boolean predictions and actual labels using BinaryConfusionMatrix.fromPredictions
let actualBool = [true;true;true;true;false;false;false]
let predictedBool = [true;true;true;false;true;false;false]

BinaryConfusionMatrix.ofPredictions(actualBool,predictedBool)
{ TP = 3
  TN = 2
  FP = 1
  FN = 1 }
  • directly from obtained TP/TN/FP/FN values using BinaryConfusionMatrix.create
BinaryConfusionMatrix.create(tp=3,tn=2,fp=1,fn=1)
{ TP = 3
  TN = 2
  FP = 1
  FN = 1 }

There are more things you can do with BinaryConfusionMatrix, but most use cases are covered and abstracted by ComparisonMetrics (see below).

Multi label confusion matrix

Confusion matrix is not limited to binary classification and can be used in multi-class classifiers as well, increasing both dimensions by the amount of additional labels.

let for example the actual labels be the set

\[actual = (A,A,A,A,A,B,B,B,C,C,C,C,C,C)\]

and the predictions

\[predicted = (A,A,A,B,C,B,B,A,C,C,C,C,A,A)\]

a multi-label confusion matrix can be filled by comparing actual and predicted values at their respective indices:

Predicted

Label A

Label B

Label C

Actual

Label A

3

1

1

Label B

1

2

0

Label C

2

0

4

A MultiLabelConfusionMatrix can be created either

  • from the labels and a confusion matrix (Matrix<int>, note that the index in the label array will be assigned for the column/row indices of the matrix, and that the matrix must be square and of the same dimensions as the label array)
open FSharp.Stats

let mlcm =
    MultiLabelConfusionMatrix.create(
        labels = [|"A"; "B"; "C"|],
        confusion =(
            [
                [3; 1; 1]
                [1; 2; 0]
                [2; 0; 4]
            ]
            |> array2D
            |> Matrix.Generic.ofArray2D
        )
    )
  • from predictions and actual labels of any type using MultiLabelConfusionMatrix.ofPredictions, additionally passing the labels
MultiLabelConfusionMatrix.ofPredictions(
    labels = [|"A"; "B"; "C"|],
    actual = [|"A"; "A"; "A"; "A"; "A"; "B"; "B"; "B"; "C"; "C"; "C"; "C"; "C"; "C"|],
    predictions = [|"A"; "A"; "A"; "B"; "C"; "B"; "B"; "A"; "C"; "C"; "C"; "C"; "A"; "A"|]
)
{ Labels = [|"A"; "B"; "C"|]
  Confusion =
   
      0 1 2
           
 0 -> 3 1 1
 1 -> 1 2 0
 2 -> 2 0 4

Matrix of 3 rows x 3 columns}

It is however not as easy to extract comparable metrics directly from this matrix.

Therefore, multi-label classification are most often compared using one/all-vs-rest and micro/macro averaging of metrics.

It is possible to derive binary one-vs-rest confusion matrices to evaluate prediction metrics of individual labels from a multi-label confusion matrix.

This is done by taking all occurences of the label in the actual labels as positive values, and all other label occurences as negatives. The same is done for the prediction vector.

As an example, the derived binary confusion matrix for Label A in above example would be:

Predicted

is A

is not A

Actual

is A

3

2

is not A

3

6

Programmatically, this can be done via MultiLabelConfusionMatrix.oneVsRest

mlcm
|> MultiLabelConfusionMatrix.oneVsRest "A"
{ TP = 3
  TN = 6
  FP = 3
  FN = 2 }

Binary confusion matrices for all labels can be obtained by MultiLabelConfusionMatrix.allVsAll

mlcm
|> MultiLabelConfusionMatrix.allVsAll
|> Array.iter (fun (label, cm) -> printf $"{label}:\n{cm}\n")
A:
{ TP = 3
  TN = 6
  FP = 3
  FN = 2 }
B:
{ TP = 2
  TN = 10
  FP = 1
  FN = 1 }
C:
{ TP = 4
  TN = 7
  FP = 1
  FN = 2 }

Comparison Metrics

Comparison Metrics is a record type that contains (besides other things) the 21 metric shown in the table below.

It also provides static methods to perform calculation of individual metrics derived from a BinaryConfusionMatrix via the ComparisonMetrics.calculate<Metric> functions:

Metric

Formula

API reference

Sensitivity (TPR)

\(TPR = \frac{TP}{TP+TN}\)

ComparisonMetrics.calculateSensitivity

Specificity (TNR)

\(TNR = \frac{TN}{TN+TP}\)

ComparisonMetrics.calculateSpecificity

Precision (PPV)

\(PPV = \frac{TP}{TP+FP}\)

ComparisonMetrics.calculatePrecision

NegativePredictiveValue (NPV)

\(NPV = \frac{TN}{TN+FN}\)

ComparisonMetrics.calculateNegativePredictiveValue

Missrate (FNR)

\(FNR = \frac{FN}{FN+TP}\)

ComparisonMetrics.calculateMissrate

FallOut (FPR)

\(FPR = \frac{FP}{FP+TN}\)

ComparisonMetrics.calculateFallOut

FalseDiscoveryRate (FDR)

\(FDR = \frac{FP}{FP+TP}\)

ComparisonMetrics.calculateFalseDiscoveryRate

FalseOmissionRate (FOR)

\(FOR = \frac{FN}{FN+TN}\)

ComparisonMetrics.calculateFalseOmissionRate

PositiveLikelihoodRatio (LR+)

\(LR+ = \frac{TPR}{FPR}\)

ComparisonMetrics.calculatePositiveLikelihoodRatio

NegativeLikelihoodRatio (LR-)

\(LR- = \frac{FNR}{TNR}\)

ComparisonMetrics.calculateNegativeLikelihoodRatio

PrevalenceThreshold (PT)

\(PT = \frac{\sqrt{FPR}}{\sqrt{TPR}+\sqrt{FPR}}\)

ComparisonMetrics.calculatePrevalenceThreshold

ThreatScore (TS)

\(TS = \frac{TP}{TP+FN+FP}\)

ComparisonMetrics.calculateThreatScore

Prevalence

\(Prevalence = \frac{P}{P+N}\)

ComparisonMetrics.calculatePrevalence

Accuracy (ACC)

\(ACC = \frac{TP+TN}{TP+TN+FP+FN}\)

ComparisonMetrics.calculateAccuracy

BalancedAccuracy (BA)

\(BA = \frac{TPR+TNR}{2}\)

ComparisonMetrics.calculateBalancedAccuracy

F1 Score

\(F1 = \frac{2TP}{2TP+FP+FN}\)

ComparisonMetrics.calculateF1

PhiCoefficient (MCC)

\(MCC = \frac{TP*TN-FP*FN}{\sqrt{(TP+FP)(TP+FN)(TN+FP)(TN+FN)}}\)

ComparisonMetrics.calculatePhiCoefficient

FowlkesMallowsIndex (FM)

\(FM = \frac{}{}\)

ComparisonMetrics.calculateFowlkesMallowsIndex

Informedness (BM)

\(BM = \frac{}{}\)

ComparisonMetrics.calculateInformedness

Markedness (MK)

\(MK = \frac{}{}\)

ComparisonMetrics.calculateMarkedness

DiagnosticOddsRatio (DOR)

\(DOR = \frac{}{}\)

ComparisonMetrics.calculateDiagnosticOddsRatio

ComparisonMetrics for binary comparisons

You can create the ComparisonMetrics record in various ways:

  • directly from obtained TP/TN/FP/FN values using ComparisonMetrics.create
ComparisonMetrics.create(3,2,1,1)
  • From a BinaryConfusionMatrix using ComparisonMetrics.create
let bcm = BinaryConfusionMatrix.ofPredictions(1,actual,predicted)
ComparisonMetrics.create(bcm)
  • from predictions and actual labels of any type using ComparisonMetrics.ofBinaryPredictions, additionally passing which label is the "positive" label
ComparisonMetrics.ofBinaryPredictions(1,actual,predicted)
  • from boolean predictions and actual labels using BinaryConfusionMatrix.ofBinaryPredictions
ComparisonMetrics.ofBinaryPredictions(actualBool, predictedBool)
{ P = 4.0
  N = 3.0
  SampleSize = 7.0
  TP = 3.0
  TN = 2.0
  FP = 1.0
  FN = 1.0
  Sensitivity = 0.75
  Specificity = 0.6666666667
  Precision = 0.75
  NegativePredictiveValue = 0.6666666667
  Missrate = 0.25
  FallOut = 0.3333333333
  FalseDiscoveryRate = 0.25
  FalseOmissionRate = 0.3333333333
  PositiveLikelihoodRatio = 2.25
  NegativeLikelihoodRatio = 0.375
  PrevalenceThreshold = 0.4
  ThreatScore = 0.6
  Prevalence = 0.5714285714
  Accuracy = 0.7142857143
  BalancedAccuracy = 0.7083333333
  F1 = 0.75
  PhiCoefficient = 0.4166666667
  FowlkesMallowsIndex = 0.75
  Informedness = 0.4166666667
  Markedness = 0.4166666667
  DiagnosticOddsRatio = 6.0 }

ComparisonMetrics for multi-label comparisons

see also: https://cran.r-project.org/web/packages/yardstick/vignettes/multiclass.html

To evaluate individual label prediction metrics, you can create comparison metrics for each individual label confusion matrix obtained by MultiLabelConfusionMatrix.allVsAll:

mlcm
|> MultiLabelConfusionMatrix.allVsAll
|> Array.map (fun (label,cm) -> label, ComparisonMetrics.create(cm))
|> Array.iter(fun (label,metrics) -> printf $"Label {label}:\n\tSpecificity:%.3f{metrics.Specificity}\n\tAccuracy:%.3f{metrics.Accuracy}\n")
Label A:
	Specificity:0.667
	Accuracy:0.643
Label B:
	Specificity:0.909
	Accuracy:0.857
Label C:
	Specificity:0.875
	Accuracy:0.786

Macro-averaging metrics

Macro averaging averages the metrics obtained by calculating the metric of interest for each one-vs-rest binary confusion matrix created from the multi-label confusion matrix..

So if you for example want to calculate the macro-average Sensitivity(TPR) \(TPR_{macro}\) of a multi-label prediction, this is obtained by averaging the \(TPR_i\) of each individual one-vs-rest label prediction for all \(i = 1 .. k\) labels:

\[TPR_{macro} = \frac1k\sum_{i=1}^{k}TPR_i\]

macro average metrics can be obtained either from multiple metrics, a multi-label confusion matrix, or a sequence of binary confusion matrices

ComparisonMetrics.macroAverage([ComparisonMetrics.create(3,6,3,2); ComparisonMetrics.create(2,10,1,1); ComparisonMetrics.create(4,7,1,2)] )
ComparisonMetrics.macroAverage(mlcm)
ComparisonMetrics.macroAverage(mlcm |> MultiLabelConfusionMatrix.allVsAll |> Array.map snd)

or directly from predictions and actual labels of any type using ComparisonMetrics.macroAverageOfMultiLabelPredictions, additionally passing the labels

ComparisonMetrics.macroAverageOfMultiLabelPredictions(
    labels = [|"A"; "B"; "C"|],
    actual = [|"A"; "A"; "A"; "A"; "A"; "B"; "B"; "B"; "C"; "C"; "C"; "C"; "C"; "C"|],
    predictions = [|"A"; "A"; "A"; "B"; "C"; "B"; "B"; "A"; "C"; "C"; "C"; "C"; "A"; "A"|]
)
{ P = 4.666666667
  N = 9.333333333
  SampleSize = 14.0
  TP = 3.0
  TN = 7.666666667
  FP = 1.666666667
  FN = 1.666666667
  Sensitivity = 0.6444444444
  Specificity = 0.8169191919
  Precision = 0.6555555556
  NegativePredictiveValue = 0.8122895623
  Missrate = 0.3555555556
  FallOut = 0.1830808081
  FalseDiscoveryRate = 0.3444444444
  FalseOmissionRate = 0.1877104377
  PositiveLikelihoodRatio = 4.822222222
  NegativeLikelihoodRatio = 0.4492063492
  PrevalenceThreshold = 0.3329688981
  ThreatScore = 0.4821428571
  Prevalence = 0.3333333333
  Accuracy = 0.7619047619
  BalancedAccuracy = 0.7306818182
  F1 = 0.6464646465
  PhiCoefficient = 0.4644624644
  FowlkesMallowsIndex = 0.6482286558
  Informedness = 0.4613636364
  Markedness = 0.4678451178
  DiagnosticOddsRatio = 12.33333333 }

Micro-averaging metrics

Micro aggregates the one-vs-rest binary confusion matrices created from the multi-label confusion matrix, and then calculates the metric from the aggregated (TP/TN/FP/FN) values.

So if you for example want to calculate the micro-average Sensitivity(TPR) \(TPR_{micro}\) of a multi-label prediction, this is obtained by summing each individual one-vs-rest label prediction's \(TP\) and \(TN\) and obtaining \(TPR_{micro}\) by

\[TPR_{micro} = \frac{TP_1 + TP_2 .. + TP_k}{(TP_1 + TP_2 .. + TP_k)+(TN_1 + TN_2 .. + TN_k)}\]

micro average metrics can be obtained either from multiple binary confusion matrices or a multi-label confusion matrix

ComparisonMetrics.microAverage([BinaryConfusionMatrix.create(3,6,3,2); BinaryConfusionMatrix.create(2,10,1,1); BinaryConfusionMatrix.create(4,7,1,2)] )
ComparisonMetrics.microAverage(mlcm)

or directly from predictions and actual labels of any type using ComparisonMetrics.macroAverageOfMultiLabelPredictions, additionally passing the labels

ComparisonMetrics.microAverageOfMultiLabelPredictions(
    labels = [|"A"; "B"; "C"|],
    actual = [|"A"; "A"; "A"; "A"; "A"; "B"; "B"; "B"; "C"; "C"; "C"; "C"; "C"; "C"|],
    predictions = [|"A"; "A"; "A"; "B"; "C"; "B"; "B"; "A"; "C"; "C"; "C"; "C"; "A"; "A"|]
)
{ P = 14.0
  N = 28.0
  SampleSize = 42.0
  TP = 9.0
  TN = 23.0
  FP = 5.0
  FN = 5.0
  Sensitivity = 0.6428571429
  Specificity = 0.8214285714
  Precision = 0.6428571429
  NegativePredictiveValue = 0.8214285714
  Missrate = 0.3571428571
  FallOut = 0.1785714286
  FalseDiscoveryRate = 0.3571428571
  FalseOmissionRate = 0.1785714286
  PositiveLikelihoodRatio = 3.6
  NegativeLikelihoodRatio = 0.4347826087
  PrevalenceThreshold = 0.3451409985
  ThreatScore = 0.4736842105
  Prevalence = 0.3333333333
  Accuracy = 0.7619047619
  BalancedAccuracy = 0.7321428571
  F1 = 0.6428571429
  PhiCoefficient = 0.4642857143
  FowlkesMallowsIndex = 0.6428571429
  Informedness = 0.4642857143
  Markedness = 0.4642857143
  DiagnosticOddsRatio = 8.28 }

Creating threshold-dependent metric maps

Predictions usually have a confidence or score attached, which indicates how "sure" the predictor is to report a label for a certain input.

Predictors can be compared by comparing the relative frequency distributions of metrics of interest for each possible (or obtained) confidence value.

Two prominent examples are the Receiver Operating Characteristic (ROC) or the Precision-Recall metric

For binary predictions

ComparisonMetrics.binaryThresholdMap(
    [true;true;true;true;false;false;false],
    [0.9 ;0.6 ;0.7 ; 0.2 ; 0.7; 0.3 ; 0.1]
)
|> Array.iter (fun (threshold,cm) -> printf $"Threshold {threshold}:\n\tSensitivity: %.2f{cm.Sensitivity}\n\tPrecision : %.2f{cm.Precision}\n\tFallout : %.2f{cm.FallOut}\n\tetc...\n")
Threshold 1.9:
	Sensitivity: 0.00
	Precision : NaN
	Fallout : 0.00
	etc...
Threshold 0.9:
	Sensitivity: 0.25
	Precision : 1.00
	Fallout : 0.00
	etc...
Threshold 0.7:
	Sensitivity: 0.50
	Precision : 0.67
	Fallout : 0.33
	etc...
Threshold 0.6:
	Sensitivity: 0.75
	Precision : 0.75
	Fallout : 0.33
	etc...
Threshold 0.3:
	Sensitivity: 0.75
	Precision : 0.60
	Fallout : 0.67
	etc...
Threshold 0.2:
	Sensitivity: 1.00
	Precision : 0.67
	Fallout : 0.67
	etc...
Threshold 0.1:
	Sensitivity: 1.00
	Precision : 0.57
	Fallout : 1.00
	etc...

For multi-label predictions

ComparisonMetrics.multiLabelThresholdMap(
    actual = 
             [|"A"; "A"; "A"; "A"; "A"; "B"; "B"; "B"; "C"; "C"; "C"; "C"; "C"; "C"|],
    predictions = [|
        "A", [|0.8; 0.7; 0.9; 0.4; 0.3; 0.1; 0.3; 0.5; 0.1; 0.1; 0.1; 0.3; 0.5; 0.4|]
        "B", [|0.0; 0.2; 0.0; 0.5; 0.1; 0.8; 0.7; 0.4; 0.0; 0.1; 0.1; 0.0; 0.1; 0.3|]
        "C", [|0.2; 0.3; 0.1; 0.1; 0.6; 0.1; 0.1; 0.1; 0.9; 0.8; 0.8; 0.7; 0.4; 0.3|]
    |]
)

ROC curve example

A receiver operating characteristic curve, or ROC curve, is a graphical plot that illustrates the diagnostic ability of a binary classifier system as its discrimination threshold is varied.

The ROC curve is created by plotting the true positive rate (TPR, sensitivity) against the false positive rate (FPR, fallout) at various threshold settings

When using normalized units, the area under the curve (often referred to as simply the AUC) is equal to the probability that a classifier will rank a randomly chosen positive instance higher than a randomly chosen negative one (assuming 'positive' ranks higher than 'negative'). In other words, when given one randomly selected positive instance and one randomly selected negative instance, AUC is the probability that the classifier will be able to tell which one is which.

Binary
open Plotly.NET
open Plotly.NET.LayoutObjects
open FSharp.Stats.Integration

let binaryROC = 
    ComparisonMetrics.calculateROC(
        [true;true;true;true;false;false;false],
        [0.9 ;0.6 ;0.7 ; 0.2 ; 0.7; 0.3 ; 0.1]
    )

let auc = binaryROC |> NumericalIntegration.definiteIntegral Trapezoidal

let binaryROCChart =
    [
        Chart.Line(binaryROC, Name= $"2 label ROC, AUC = %.2f{auc}")
        |> Chart.withLineStyle(Shape = StyleParam.Shape.Vh)
        Chart.Line([0.,0.; 1.,1.0], Name = "no skill", LineDash = StyleParam.DrawingStyle.Dash, LineColor = Color.fromKeyword Grey)
    ]
    |> Chart.combine
    |> Chart.withTemplate ChartTemplates.lightMirrored
    |> Chart.withLegend(Legend.init(XAnchor=StyleParam.XAnchorPosition.Right, YAnchor=StyleParam.YAnchorPosition.Bottom, X = 0.5, Y = 0.1))
    |> Chart.withXAxisStyle("TPR", MinMax=(0.,1.))
    |> Chart.withYAxisStyle("FPR", MinMax=(0.,1.))
    |> Chart.withTitle "Binary receiver operating characteristic example"
No value returned by any evaluator
Multi-label
let multiLabelROC = 
    ComparisonMetrics.calculateMultiLabelROC(
        actual = [|"A"; "A"; "A"; "A"; "A"; "B"; "B"; "B"; "C"; "C"; "C"; "C"; "C"; "C"|],
        predictions = [|
            "A", [|0.8; 0.7; 0.9; 0.4; 0.3; 0.1; 0.2; 0.5; 0.1; 0.1; 0.1; 0.3; 0.5; 0.4|]
            "B", [|0.0; 0.1; 0.0; 0.5; 0.1; 0.8; 0.7; 0.4; 0.0; 0.1; 0.1; 0.0; 0.1; 0.3|]
            "C", [|0.2; 0.2; 0.1; 0.1; 0.6; 0.1; 0.1; 0.1; 0.9; 0.8; 0.8; 0.7; 0.4; 0.3|]
        |]
    )

let aucMap = 
    multiLabelROC 
    |> Map.map (fun label roc -> roc |> NumericalIntegration.definiteIntegral Trapezoidal)

let multiLabelROCChart =
    [
        yield!  
            multiLabelROC
            |> Map.toArray
            |> Array.map (fun (label,roc) -> 
                Chart.Line(roc, Name= $"{label} ROC, AUC = %.2f{aucMap[label]}")
                |> Chart.withLineStyle(Shape = StyleParam.Shape.Vh)
            )
        Chart.Line([0.,0.; 1.,1.0], Name = "no skill", LineDash = StyleParam.DrawingStyle.Dash, LineColor = Color.fromKeyword Grey)
    ]
    |> Chart.combine
    |> Chart.withTemplate ChartTemplates.lightMirrored
    |> Chart.withLegend(Legend.init(XAnchor=StyleParam.XAnchorPosition.Right, YAnchor=StyleParam.YAnchorPosition.Bottom, X = 0.5, Y = 0.1))
    |> Chart.withXAxisStyle("TPR", MinMax=(0.,1.))
    |> Chart.withYAxisStyle("FPR", MinMax=(0.,1.))
    |> Chart.withTitle "Binary receiver operating characteristic example"
No value returned by any evaluator
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
val actual: int list
val predicted: int list
Multiple items
namespace FSharp

--------------------
namespace Microsoft.FSharp
namespace FSharp.Stats
namespace FSharp.Stats.Testing
type BinaryConfusionMatrix = { TP: int TN: int FP: int FN: int } static member create: tp: int * tn: int * fp: int * fn: int -> BinaryConfusionMatrix static member ofPredictions: positiveLabel: 'A * actual: seq<'A> * predictions: seq<'A> -> BinaryConfusionMatrix (requires equality) + 1 overload static member thresholdMap: actual: seq<bool> * predictions: seq<float> * thresholds: seq<float> -> (float * BinaryConfusionMatrix)[] + 1 overload
<summary> Confusion matrix for binary classification </summary>
static member BinaryConfusionMatrix.ofPredictions: actual: seq<bool> * predictions: seq<bool> -> BinaryConfusionMatrix
static member BinaryConfusionMatrix.ofPredictions: positiveLabel: 'A * actual: seq<'A> * predictions: seq<'A> -> BinaryConfusionMatrix (requires equality)
val actualBool: bool list
val predictedBool: bool list
static member BinaryConfusionMatrix.create: tp: int * tn: int * fp: int * fn: int -> BinaryConfusionMatrix
val mlcm: MultiLabelConfusionMatrix
type MultiLabelConfusionMatrix = { Labels: string[] Confusion: Matrix<int> } static member allVsAll: mlcm: MultiLabelConfusionMatrix -> (string * BinaryConfusionMatrix)[] static member create: labels: string[] * confusion: Matrix<int> -> MultiLabelConfusionMatrix static member ofPredictions: labels: 'a[] * actual: 'a[] * predictions: 'a[] -> MultiLabelConfusionMatrix (requires 'a :> IConvertible and equality) static member oneVsRest: label: string -> mlcm: MultiLabelConfusionMatrix -> BinaryConfusionMatrix
static member MultiLabelConfusionMatrix.create: labels: string[] * confusion: Matrix<int> -> MultiLabelConfusionMatrix
val array2D: rows: seq<#seq<'T>> -> 'T[,]
<summary>Builds a 2D array from a sequence of sequences of elements.</summary>
<example id="array2d-1"><code lang="fsharp"> array2D [ [ 1.0; 2.0 ]; [ 3.0; 4.0 ] ] </code> Evaluates to a 2x2 zero-based array with contents <c>[[1.0; 2.0]; [3.0; 4.0]]</c></example>
Multiple items
module Matrix from FSharp.Stats

--------------------
type Matrix<'T> = | DenseRepr of DenseMatrix<'T> | SparseRepr of SparseMatrix<'T> interface IMatrixFormattable interface IFsiFormattable interface IEnumerable interface IEnumerable<'T> interface IStructuralEquatable interface IStructuralComparable interface IComparable override Equals: yobj: obj -> bool member Format: rowStartCount: int * rowEndCount: int * columnStartCount: int * columnEndCount: int * showInfo: bool -> string + 2 overloads member FormatStrings: rowStartCount: int * rowEndCount: int * columnStartCount: int * columnEndCount: int -> string[][] ...
module Generic from FSharp.Stats.MatrixModule
val ofArray2D: array: 'T[,] -> Matrix<'T>
static member MultiLabelConfusionMatrix.ofPredictions: labels: 'a[] * actual: 'a[] * predictions: 'a[] -> MultiLabelConfusionMatrix (requires 'a :> System.IConvertible and equality)
static member MultiLabelConfusionMatrix.oneVsRest: label: string -> mlcm: MultiLabelConfusionMatrix -> BinaryConfusionMatrix
static member MultiLabelConfusionMatrix.allVsAll: mlcm: MultiLabelConfusionMatrix -> (string * BinaryConfusionMatrix)[]
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 iter: action: ('T -> unit) -> array: 'T[] -> unit
<summary>Applies the given function to each element of the array.</summary>
<param name="action">The function to apply.</param>
<param name="array">The input array.</param>
<exception cref="T:System.ArgumentNullException">Thrown when the input array is null.</exception>
<example id="iter-1"><code lang="fsharp"> let inputs = [| "a"; "b"; "c" |] inputs |&gt; Array.iter (printfn "%s") </code> Evaluates to <c>unit</c> and prints <code> a b c </code> in the console. </example>
val label: string
val cm: BinaryConfusionMatrix
val printf: format: Printf.TextWriterFormat<'T> -> 'T
<summary>Print to <c>stdout</c> using the given format.</summary>
<param name="format">The formatter.</param>
<returns>The formatted result.</returns>
<example>See <c>Printf.printf</c> (link: <see cref="M:Microsoft.FSharp.Core.PrintfModule.PrintFormat``1" />) for examples.</example>
type ComparisonMetrics = { P: float N: float SampleSize: float TP: float TN: float FP: float FN: float Sensitivity: float Specificity: float Precision: float ... } static member binaryThresholdMap: tm: (float * BinaryConfusionMatrix)[] -> (float * ComparisonMetrics)[] + 2 overloads static member calculateAccuracy: tp: float -> tn: float -> samplesize: float -> float static member calculateBalancedAccuracy: tp: float -> p: float -> tn: float -> n: float -> float static member calculateDiagnosticOddsRatio: tp: float -> tn: float -> fp: float -> fn: float -> p: float -> n: float -> float static member calculateF1: tp: float -> fp: float -> fn: float -> float static member calculateFallOut: fp: float -> n: float -> float static member calculateFalseDiscoveryRate: fp: float -> tp: float -> float static member calculateFalseOmissionRate: fn: float -> tn: float -> float static member calculateFowlkesMallowsIndex: tp: float -> fp: float -> p: float -> float static member calculateInformedness: tp: float -> p: float -> tn: float -> n: float -> float ...
<summary> Comparison metrics that can be derived from a binary confusion matrix </summary>
static member ComparisonMetrics.create: bcm: BinaryConfusionMatrix -> ComparisonMetrics
static member ComparisonMetrics.create: tp: float * tn: float * fp: float * fn: float -> ComparisonMetrics
static member ComparisonMetrics.create: p: float * n: float * samplesize: float * tp: float * tn: float * fp: float * fn: float * sensitivity: float * specificity: float * precision: float * negativepredictivevalue: float * missrate: float * fallout: float * falsediscoveryrate: float * falseomissionrate: float * positivelikelihoodratio: float * negativelikelihoodratio: float * prevalencethreshold: float * threatscore: float * prevalence: float * accuracy: float * balancedaccuracy: float * f1: float * phicoefficient: float * fowlkesmallowsindex: float * informedness: float * markedness: float * diagnosticoddsratio: float -> ComparisonMetrics
val bcm: BinaryConfusionMatrix
static member ComparisonMetrics.ofBinaryPredictions: actual: seq<bool> * predictions: seq<bool> -> ComparisonMetrics
static member ComparisonMetrics.ofBinaryPredictions: positiveLabel: 'A * actual: seq<'A> * predictions: seq<'A> -> ComparisonMetrics (requires equality)
val map: mapping: ('T -> 'U) -> array: 'T[] -> 'U[]
<summary>Builds a new array whose elements are the results of applying the given function to each of the elements of the array.</summary>
<param name="mapping">The function to transform elements of the array.</param>
<param name="array">The input array.</param>
<returns>The array of transformed elements.</returns>
<exception cref="T:System.ArgumentNullException">Thrown when the input array is null.</exception>
<example id="map-1"><code lang="fsharp"> let inputs = [| "a"; "bbb"; "cc" |] inputs |&gt; Array.map (fun x -&gt; x.Length) </code> Evaluates to <c>[| 1; 3; 2 |]</c></example>
val metrics: ComparisonMetrics
static member ComparisonMetrics.macroAverage: bcms: BinaryConfusionMatrix[] -> ComparisonMetrics
static member ComparisonMetrics.macroAverage: mlcm: MultiLabelConfusionMatrix -> ComparisonMetrics
static member ComparisonMetrics.macroAverage: metrics: seq<ComparisonMetrics> -> ComparisonMetrics
val snd: tuple: ('T1 * 'T2) -> 'T2
<summary>Return the second element of a tuple, <c>snd (a,b) = b</c>.</summary>
<param name="tuple">The input tuple.</param>
<returns>The second value.</returns>
<example id="snd-example"><code lang="fsharp"> snd ("first", 2) // Evaluates to 2 </code></example>
static member ComparisonMetrics.macroAverageOfMultiLabelPredictions: labels: 'a[] * actual: 'a[] * predictions: 'a[] -> ComparisonMetrics (requires 'a :> System.IConvertible and equality)
static member ComparisonMetrics.microAverage: mlcm: MultiLabelConfusionMatrix -> ComparisonMetrics
static member ComparisonMetrics.microAverage: cms: seq<BinaryConfusionMatrix> -> ComparisonMetrics
static member ComparisonMetrics.microAverageOfMultiLabelPredictions: labels: 'a[] * actual: 'a[] * predictions: 'a[] -> ComparisonMetrics (requires 'a :> System.IConvertible and equality)
static member ComparisonMetrics.binaryThresholdMap: tm: (float * BinaryConfusionMatrix)[] -> (float * ComparisonMetrics)[]
static member ComparisonMetrics.binaryThresholdMap: actual: seq<bool> * predictions: seq<float> -> (float * ComparisonMetrics)[]
static member ComparisonMetrics.binaryThresholdMap: actual: seq<bool> * predictions: seq<float> * thresholds: seq<float> -> (float * ComparisonMetrics)[]
val threshold: float
val cm: ComparisonMetrics
static member ComparisonMetrics.multiLabelThresholdMap: actual: 'a[] * predictions: ('a * float[])[] -> Map<string,(float * ComparisonMetrics)[]> (requires 'a :> System.IConvertible and equality)
namespace Plotly.NET.LayoutObjects
namespace FSharp.Stats.Integration
val binaryROC: (float * float)[]
static member ComparisonMetrics.calculateROC: actual: seq<bool> * predictions: seq<float> -> (float * float)[]
static member ComparisonMetrics.calculateROC: actual: seq<bool> * predictions: seq<float> * thresholds: seq<float> -> (float * float)[]
val auc: float
Multiple items
type NumericalIntegration = new: unit -> NumericalIntegration static member definiteIntegral: method: NumericalIntegrationMethod * intervalStart: float * intervalEnd: float * partitions: int * ?Parallel: bool -> ((float -> float) -> float) + 1 overload
<summary> Definite integral approximation </summary>

--------------------
new: unit -> NumericalIntegration
static member NumericalIntegration.definiteIntegral: method: NumericalIntegrationMethod -> ((float * float)[] -> float)
static member NumericalIntegration.definiteIntegral: method: NumericalIntegrationMethod * intervalStart: float * intervalEnd: float * partitions: int * ?Parallel: bool -> ((float -> float) -> float)
union case NumericalIntegrationMethod.Trapezoidal: NumericalIntegrationMethod
<summary> Trapezoidal rule - approximation via partition intervals using trapezoids in the partition boundaries </summary>
val binaryROCChart: GenericChart.GenericChart
type Chart = static member AnnotatedHeatmap: zData: seq<#seq<'a1>> * annotationText: seq<#seq<string>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?X: seq<'a3> * ?MultiX: seq<seq<'a3>> * ?XGap: int * ?Y: seq<'a4> * ?MultiY: seq<seq<'a4>> * ?YGap: int * ?Text: 'a5 * ?MultiText: seq<'a5> * ?ColorBar: ColorBar * ?ColorScale: Colorscale * ?ShowScale: bool * ?ReverseScale: bool * ?ZSmooth: SmoothAlg * ?Transpose: bool * ?UseWebGL: bool * ?ReverseYAxis: bool * ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a3 :> IConvertible and 'a4 :> IConvertible and 'a5 :> IConvertible) + 1 overload static member Area: x: seq<#IConvertible> * y: seq<#IConvertible> * ?ShowMarkers: bool * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: MarkerSymbol * ?MultiMarkerSymbol: seq<MarkerSymbol> * ?Marker: Marker * ?LineColor: Color * ?LineColorScale: Colorscale * ?LineWidth: float * ?LineDash: DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: Orientation * ?GroupNorm: GroupNorm * ?FillColor: Color * ?FillPatternShape: PatternShape * ?FillPattern: Pattern * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible) + 1 overload static member Bar: values: seq<#IConvertible> * ?Keys: seq<'a1> * ?MultiKeys: seq<seq<'a1>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerPatternShape: PatternShape * ?MultiMarkerPatternShape: seq<PatternShape> * ?MarkerPattern: Pattern * ?Marker: Marker * ?Base: #IConvertible * ?Width: 'a4 * ?MultiWidth: seq<'a4> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a2 :> IConvertible and 'a4 :> IConvertible) + 1 overload static member BoxPlot: ?X: seq<'a0> * ?MultiX: seq<seq<'a0>> * ?Y: seq<'a1> * ?MultiY: seq<seq<'a1>> * ?Name: string * ?ShowLegend: bool * ?Text: 'a2 * ?MultiText: seq<'a2> * ?FillColor: Color * ?MarkerColor: Color * ?Marker: Marker * ?Opacity: float * ?WhiskerWidth: float * ?BoxPoints: BoxPoints * ?BoxMean: BoxMean * ?Jitter: float * ?PointPos: float * ?Orientation: Orientation * ?OutlineColor: Color * ?OutlineWidth: float * ?Outline: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?Notched: bool * ?NotchWidth: float * ?QuartileMethod: QuartileMethod * ?UseDefaults: bool -> GenericChart (requires 'a0 :> IConvertible and 'a1 :> IConvertible and 'a2 :> IConvertible) + 2 overloads static member Bubble: x: seq<#IConvertible> * y: seq<#IConvertible> * sizes: seq<int> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: MarkerSymbol * ?MultiMarkerSymbol: seq<MarkerSymbol> * ?Marker: Marker * ?LineColor: Color * ?LineColorScale: Colorscale * ?LineWidth: float * ?LineDash: DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: Orientation * ?GroupNorm: GroupNorm * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible) + 1 overload static member Candlestick: ``open`` : seq<#IConvertible> * high: seq<#IConvertible> * low: seq<#IConvertible> * close: seq<#IConvertible> * ?X: seq<'a4> * ?MultiX: seq<seq<'a4>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?Text: 'a5 * ?MultiText: seq<'a5> * ?Line: Line * ?IncreasingColor: Color * ?Increasing: FinanceMarker * ?DecreasingColor: Color * ?Decreasing: FinanceMarker * ?WhiskerWidth: float * ?ShowXAxisRangeSlider: bool * ?UseDefaults: bool -> GenericChart (requires 'a4 :> IConvertible and 'a5 :> IConvertible) + 2 overloads static member Column: values: seq<#IConvertible> * ?Keys: seq<'a1> * ?MultiKeys: seq<seq<'a1>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?MarkerColor: Color * ?MarkerColorScale: Colorscale * ?MarkerOutline: Line * ?MarkerPatternShape: PatternShape * ?MultiMarkerPatternShape: seq<PatternShape> * ?MarkerPattern: Pattern * ?Marker: Marker * ?Base: #IConvertible * ?Width: 'a4 * ?MultiWidth: seq<'a4> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a2 :> IConvertible and 'a4 :> IConvertible) + 1 overload static member Contour: zData: seq<#seq<'a1>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?X: seq<'a2> * ?MultiX: seq<seq<'a2>> * ?Y: seq<'a3> * ?MultiY: seq<seq<'a3>> * ?Text: 'a4 * ?MultiText: seq<'a4> * ?ColorBar: ColorBar * ?ColorScale: Colorscale * ?ShowScale: bool * ?ReverseScale: bool * ?Transpose: bool * ?ContourLineColor: Color * ?ContourLineDash: DrawingStyle * ?ContourLineSmoothing: float * ?ContourLine: Line * ?ContoursColoring: ContourColoring * ?ContoursOperation: ConstraintOperation * ?ContoursType: ContourType * ?ShowContourLabels: bool * ?ContourLabelFont: Font * ?Contours: Contours * ?FillColor: Color * ?NContours: int * ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a2 :> IConvertible and 'a3 :> IConvertible and 'a4 :> IConvertible) static member Funnel: x: seq<#IConvertible> * y: seq<#IConvertible> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?Width: float * ?Offset: float * ?Text: 'a2 * ?MultiText: seq<'a2> * ?TextPosition: TextPosition * ?MultiTextPosition: seq<TextPosition> * ?Orientation: Orientation * ?AlignmentGroup: string * ?OffsetGroup: string * ?MarkerColor: Color * ?MarkerOutline: Line * ?Marker: Marker * ?TextInfo: TextInfo * ?ConnectorLineColor: Color * ?ConnectorLineStyle: DrawingStyle * ?ConnectorFillColor: Color * ?ConnectorLine: Line * ?Connector: FunnelConnector * ?InsideTextFont: Font * ?OutsideTextFont: Font * ?UseDefaults: bool -> GenericChart (requires 'a2 :> IConvertible) static member Heatmap: zData: seq<#seq<'a1>> * ?X: seq<'a2> * ?MultiX: seq<seq<'a2>> * ?Y: seq<'a3> * ?MultiY: seq<seq<'a3>> * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?XGap: int * ?YGap: int * ?Text: 'a4 * ?MultiText: seq<'a4> * ?ColorBar: ColorBar * ?ColorScale: Colorscale * ?ShowScale: bool * ?ReverseScale: bool * ?ZSmooth: SmoothAlg * ?Transpose: bool * ?UseWebGL: bool * ?ReverseYAxis: bool * ?UseDefaults: bool -> GenericChart (requires 'a1 :> IConvertible and 'a2 :> IConvertible and 'a3 :> IConvertible and 'a4 :> IConvertible) + 1 overload ...
static member Chart.Line: xy: seq<#System.IConvertible * #System.IConvertible> * ?ShowMarkers: bool * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'c * ?MultiText: seq<'c> * ?TextPosition: StyleParam.TextPosition * ?MultiTextPosition: seq<StyleParam.TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: StyleParam.Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: StyleParam.MarkerSymbol * ?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol> * ?Marker: TraceObjects.Marker * ?LineColor: Color * ?LineColorScale: StyleParam.Colorscale * ?LineWidth: float * ?LineDash: StyleParam.DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: StyleParam.Orientation * ?GroupNorm: StyleParam.GroupNorm * ?Fill: StyleParam.Fill * ?FillColor: Color * ?FillPattern: TraceObjects.Pattern * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'c :> System.IConvertible)
static member Chart.Line: x: seq<#System.IConvertible> * y: seq<#System.IConvertible> * ?ShowMarkers: bool * ?Name: string * ?ShowLegend: bool * ?Opacity: float * ?MultiOpacity: seq<float> * ?Text: 'a2 * ?MultiText: seq<'a2> * ?TextPosition: StyleParam.TextPosition * ?MultiTextPosition: seq<StyleParam.TextPosition> * ?MarkerColor: Color * ?MarkerColorScale: StyleParam.Colorscale * ?MarkerOutline: Line * ?MarkerSymbol: StyleParam.MarkerSymbol * ?MultiMarkerSymbol: seq<StyleParam.MarkerSymbol> * ?Marker: TraceObjects.Marker * ?LineColor: Color * ?LineColorScale: StyleParam.Colorscale * ?LineWidth: float * ?LineDash: StyleParam.DrawingStyle * ?Line: Line * ?AlignmentGroup: string * ?OffsetGroup: string * ?StackGroup: string * ?Orientation: StyleParam.Orientation * ?GroupNorm: StyleParam.GroupNorm * ?Fill: StyleParam.Fill * ?FillColor: Color * ?FillPattern: TraceObjects.Pattern * ?UseWebGL: bool * ?UseDefaults: bool -> GenericChart.GenericChart (requires 'a2 :> System.IConvertible)
static member Chart.withLineStyle: ?BackOff: StyleParam.BackOff * ?AutoColorScale: bool * ?CAuto: bool * ?CMax: float * ?CMid: float * ?CMin: float * ?Color: Color * ?ColorAxis: StyleParam.SubPlotId * ?Colorscale: StyleParam.Colorscale * ?ReverseScale: bool * ?ShowScale: bool * ?ColorBar: ColorBar * ?Dash: StyleParam.DrawingStyle * ?Shape: StyleParam.Shape * ?Simplify: bool * ?Smoothing: float * ?Width: float * ?MultiWidth: seq<float> * ?OutlierColor: Color * ?OutlierWidth: float -> (GenericChart.GenericChart -> GenericChart.GenericChart)
Multiple items
type Shape = inherit DynamicObj new: unit -> Shape static member init: ?Editable: bool * ?FillColor: Color * ?FillRule: FillRule * ?Layer: Layer * ?Line: Line * ?Name: string * ?Opacity: float * ?Path: string * ?TemplateItemName: string * ?ShapeType: ShapeType * ?Visible: bool * ?X0: #IConvertible * ?X1: #IConvertible * ?XAnchor: LinearAxisId * ?Xref: string * ?XSizeMode: ShapeSizeMode * ?Y0: #IConvertible * ?Y1: #IConvertible * ?YAnchor: LinearAxisId * ?Yref: string * ?YSizeMode: ShapeSizeMode -> Shape static member style: ?Editable: bool * ?FillColor: Color * ?FillRule: FillRule * ?Layer: Layer * ?Line: Line * ?Name: string * ?Opacity: float * ?Path: string * ?TemplateItemName: string * ?ShapeType: ShapeType * ?Visible: bool * ?X0: #IConvertible * ?X1: #IConvertible * ?XAnchor: LinearAxisId * ?Xref: string * ?XSizeMode: ShapeSizeMode * ?Y0: #IConvertible * ?Y1: #IConvertible * ?YAnchor: LinearAxisId * ?Yref: string * ?YSizeMode: ShapeSizeMode -> (Shape -> Shape)
<summary> Shapes are layers that can be drawn onto a chart layout. </summary>

--------------------
new: unit -> Shape
module StyleParam from Plotly.NET
type Shape = | Linear | Spline | Hv | Vh | Hvh | Vhv member Convert: unit -> obj override ToString: unit -> string static member convert: (Shape -> obj) static member toString: (Shape -> string)
<summary> Determines the line shape. With "spline" the lines are drawn using spline interpolation. The other available values correspond to step-wise line shapes. </summary>
union case StyleParam.Shape.Vh: StyleParam.Shape
type DrawingStyle = | Solid | Dash | Dot | DashDot | LongDash | LongDashDot | User of seq<int> member Convert: unit -> obj override ToString: unit -> string static member convert: (DrawingStyle -> obj) static member toString: (DrawingStyle -> string)
<summary> Dash: Sets the drawing style of the lines segments in this trace. Sets the style of the lines. Set to a dash string type or a dash length in px. </summary>
union case StyleParam.DrawingStyle.Dash: StyleParam.DrawingStyle
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.fromKeyword: c: ColorKeyword -> Color
union case ColorKeyword.Grey: ColorKeyword
static member Chart.combine: gCharts: seq<GenericChart.GenericChart> -> GenericChart.GenericChart
static member Chart.withTemplate: template: Template -> (GenericChart.GenericChart -> GenericChart.GenericChart)
module ChartTemplates from Plotly.NET
val lightMirrored: Template
static member Chart.withLegend: showlegend: bool -> (GenericChart.GenericChart -> GenericChart.GenericChart)
static member Chart.withLegend: legend: Legend -> (GenericChart.GenericChart -> GenericChart.GenericChart)
Multiple items
type Legend = inherit DynamicObj new: unit -> Legend static member init: ?BGColor: Color * ?BorderColor: Color * ?BorderWidth: float * ?EntryWidth: float * ?EntryWidthMode: EntryWidthMode * ?Font: Font * ?GroupClick: TraceGroupClickOptions * ?GroupTitleFont: Font * ?ItemClick: TraceItemClickOptions * ?ItemDoubleClick: TraceItemClickOptions * ?ItemSizing: TraceItemSizing * ?ItemWidth: int * ?Orientation: Orientation * ?Title: Title * ?TraceGroupGap: float * ?TraceOrder: TraceOrder * ?UIRevision: string * ?VerticalAlign: VerticalAlign * ?X: float * ?XAnchor: XAnchorPosition * ?Y: float * ?YAnchor: YAnchorPosition -> Legend static member style: ?BGColor: Color * ?BorderColor: Color * ?BorderWidth: float * ?EntryWidth: float * ?EntryWidthMode: EntryWidthMode * ?Font: Font * ?GroupClick: TraceGroupClickOptions * ?GroupTitleFont: Font * ?ItemClick: TraceItemClickOptions * ?ItemDoubleClick: TraceItemClickOptions * ?ItemSizing: TraceItemSizing * ?ItemWidth: int * ?Orientation: Orientation * ?Title: Title * ?TraceGroupGap: float * ?TraceOrder: TraceOrder * ?UIRevision: string * ?VerticalAlign: VerticalAlign * ?X: float * ?XAnchor: XAnchorPosition * ?Y: float * ?YAnchor: YAnchorPosition -> (Legend -> Legend)
<summary> Legend </summary>

--------------------
new: unit -> Legend
static member Legend.init: ?BGColor: Color * ?BorderColor: Color * ?BorderWidth: float * ?EntryWidth: float * ?EntryWidthMode: StyleParam.EntryWidthMode * ?Font: Font * ?GroupClick: StyleParam.TraceGroupClickOptions * ?GroupTitleFont: Font * ?ItemClick: StyleParam.TraceItemClickOptions * ?ItemDoubleClick: StyleParam.TraceItemClickOptions * ?ItemSizing: StyleParam.TraceItemSizing * ?ItemWidth: int * ?Orientation: StyleParam.Orientation * ?Title: Title * ?TraceGroupGap: float * ?TraceOrder: StyleParam.TraceOrder * ?UIRevision: string * ?VerticalAlign: StyleParam.VerticalAlign * ?X: float * ?XAnchor: StyleParam.XAnchorPosition * ?Y: float * ?YAnchor: StyleParam.YAnchorPosition -> Legend
type XAnchorPosition = | Auto | Left | Center | Right member Convert: unit -> obj override ToString: unit -> string static member convert: (XAnchorPosition -> obj) static member toString: (XAnchorPosition -> string)
union case StyleParam.XAnchorPosition.Right: StyleParam.XAnchorPosition
type YAnchorPosition = | Auto | Top | Middle | Bottom member Convert: unit -> obj override ToString: unit -> string static member convert: (YAnchorPosition -> obj) static member toString: (YAnchorPosition -> string)
union case StyleParam.YAnchorPosition.Bottom: StyleParam.YAnchorPosition
argument X: float option
<summary> Returns a new Legend object with the given styles </summary>
<param name="BGColor">Sets the legend background color. Defaults to `layout.paper_bgcolor`.</param>
<param name="BorderColor">Sets the color of the border enclosing the legend.</param>
<param name="BorderWidth">Sets the width (in px) of the border enclosing the legend.</param>
<param name="EntryWidth">Sets the width (in px or fraction) of the legend. Use 0 to size the entry based on the text width, when `entrywidthmode` is set to "pixels".</param>
<param name="EntryWidthMode">Determines what entrywidth means.</param>
<param name="Font">Sets the font used to text the legend items.</param>
<param name="GroupClick">Determines the behavior on legend group item click. "toggleitem" toggles the visibility of the individual item clicked on the graph. "togglegroup" toggles the visibility of all items in the same legendgroup as the item clicked on the graph.</param>
<param name="GroupTitleFont">Sets the font for group titles in legend. Defaults to `legend.font` with its size increased about 10%.</param>
<param name="ItemClick">Determines the behavior on legend item click. "toggle" toggles the visibility of the item clicked on the graph. "toggleothers" makes the clicked item the sole visible item on the graph. "false" disables legend item click interactions.</param>
<param name="ItemDoubleClick">Determines the behavior on legend item double-click. "toggle" toggles the visibility of the item clicked on the graph. "toggleothers" makes the clicked item the sole visible item on the graph. "false" disables legend item double-click interactions.</param>
<param name="ItemSizing">Determines if the legend items symbols scale with their corresponding "trace" attributes or remain "constant" independent of the symbol size on the graph.</param>
<param name="ItemWidth">Sets the width (in px) of the legend item symbols (the part other than the title.text).</param>
<param name="Orientation">Sets the orientation of the legend.</param>
<param name="Title">Sets the title of the legend.</param>
<param name="TraceGroupGap">Sets the amount of vertical space (in px) between legend groups.</param>
<param name="TraceOrder">Determines the order at which the legend items are displayed. If "normal", the items are displayed top-to-bottom in the same order as the input data. If "reversed", the items are displayed in the opposite order as "normal". If "grouped", the items are displayed in groups (when a trace `legendgroup` is provided). if "grouped+reversed", the items are displayed in the opposite order as "grouped".</param>
<param name="UIRevision">Controls persistence of legend-driven changes in trace and pie label visibility. Defaults to `layout.uirevision`.</param>
<param name="VerticalAlign">Sets the vertical alignment of the symbols with respect to their associated text.</param>
<param name="X">Sets the x position (in normalized coordinates) of the legend. Defaults to "1.02" for vertical legends and defaults to "0" for horizontal legends.</param>
<param name="XAnchor">Sets the legend's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the legend. Value "auto" anchors legends to the right for `x` values greater than or equal to 2/3, anchors legends to the left for `x` values less than or equal to 1/3 and anchors legends with respect to their center otherwise.</param>
<param name="Y">Sets the y position (in normalized coordinates) of the legend. Defaults to "1" for vertical legends, defaults to "-0.1" for horizontal legends on graphs w/o range sliders and defaults to "1.1" for horizontal legends on graph with one or multiple range sliders.</param>
<param name="YAnchor">Sets the legend's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the legend. Value "auto" anchors legends at their bottom for `y` values less than or equal to 1/3, anchors legends to at their top for `y` values greater than or equal to 2/3 and anchors legends with respect to their middle otherwise.</param>
argument Y: float option
<summary> Returns a new Legend object with the given styles </summary>
<param name="BGColor">Sets the legend background color. Defaults to `layout.paper_bgcolor`.</param>
<param name="BorderColor">Sets the color of the border enclosing the legend.</param>
<param name="BorderWidth">Sets the width (in px) of the border enclosing the legend.</param>
<param name="EntryWidth">Sets the width (in px or fraction) of the legend. Use 0 to size the entry based on the text width, when `entrywidthmode` is set to "pixels".</param>
<param name="EntryWidthMode">Determines what entrywidth means.</param>
<param name="Font">Sets the font used to text the legend items.</param>
<param name="GroupClick">Determines the behavior on legend group item click. "toggleitem" toggles the visibility of the individual item clicked on the graph. "togglegroup" toggles the visibility of all items in the same legendgroup as the item clicked on the graph.</param>
<param name="GroupTitleFont">Sets the font for group titles in legend. Defaults to `legend.font` with its size increased about 10%.</param>
<param name="ItemClick">Determines the behavior on legend item click. "toggle" toggles the visibility of the item clicked on the graph. "toggleothers" makes the clicked item the sole visible item on the graph. "false" disables legend item click interactions.</param>
<param name="ItemDoubleClick">Determines the behavior on legend item double-click. "toggle" toggles the visibility of the item clicked on the graph. "toggleothers" makes the clicked item the sole visible item on the graph. "false" disables legend item double-click interactions.</param>
<param name="ItemSizing">Determines if the legend items symbols scale with their corresponding "trace" attributes or remain "constant" independent of the symbol size on the graph.</param>
<param name="ItemWidth">Sets the width (in px) of the legend item symbols (the part other than the title.text).</param>
<param name="Orientation">Sets the orientation of the legend.</param>
<param name="Title">Sets the title of the legend.</param>
<param name="TraceGroupGap">Sets the amount of vertical space (in px) between legend groups.</param>
<param name="TraceOrder">Determines the order at which the legend items are displayed. If "normal", the items are displayed top-to-bottom in the same order as the input data. If "reversed", the items are displayed in the opposite order as "normal". If "grouped", the items are displayed in groups (when a trace `legendgroup` is provided). if "grouped+reversed", the items are displayed in the opposite order as "grouped".</param>
<param name="UIRevision">Controls persistence of legend-driven changes in trace and pie label visibility. Defaults to `layout.uirevision`.</param>
<param name="VerticalAlign">Sets the vertical alignment of the symbols with respect to their associated text.</param>
<param name="X">Sets the x position (in normalized coordinates) of the legend. Defaults to "1.02" for vertical legends and defaults to "0" for horizontal legends.</param>
<param name="XAnchor">Sets the legend's horizontal position anchor. This anchor binds the `x` position to the "left", "center" or "right" of the legend. Value "auto" anchors legends to the right for `x` values greater than or equal to 2/3, anchors legends to the left for `x` values less than or equal to 1/3 and anchors legends with respect to their center otherwise.</param>
<param name="Y">Sets the y position (in normalized coordinates) of the legend. Defaults to "1" for vertical legends, defaults to "-0.1" for horizontal legends on graphs w/o range sliders and defaults to "1.1" for horizontal legends on graph with one or multiple range sliders.</param>
<param name="YAnchor">Sets the legend's vertical position anchor This anchor binds the `y` position to the "top", "middle" or "bottom" of the legend. Value "auto" anchors legends at their bottom for `y` values less than or equal to 1/3, anchors legends to at their top for `y` values greater than or equal to 2/3 and anchors legends with respect to their middle otherwise.</param>
static member Chart.withXAxisStyle: ?TitleText: string * ?TitleFont: Font * ?TitleStandoff: int * ?Title: Title * ?Color: Color * ?AxisType: StyleParam.AxisType * ?MinMax: (#System.IConvertible * #System.IConvertible) * ?Mirror: StyleParam.Mirror * ?ShowSpikes: bool * ?SpikeColor: Color * ?SpikeThickness: int * ?ShowLine: bool * ?LineColor: Color * ?ShowGrid: bool * ?GridColor: Color * ?GridDash: StyleParam.DrawingStyle * ?ZeroLine: bool * ?ZeroLineColor: Color * ?Anchor: StyleParam.LinearAxisId * ?Side: StyleParam.Side * ?Overlaying: StyleParam.LinearAxisId * ?Domain: (float * float) * ?Position: float * ?CategoryOrder: StyleParam.CategoryOrder * ?CategoryArray: seq<#System.IConvertible> * ?RangeSlider: RangeSlider * ?RangeSelector: RangeSelector * ?BackgroundColor: Color * ?ShowBackground: bool * ?Id: StyleParam.SubPlotId -> (GenericChart.GenericChart -> GenericChart.GenericChart)
static member Chart.withYAxisStyle: ?TitleText: string * ?TitleFont: Font * ?TitleStandoff: int * ?Title: Title * ?Color: Color * ?AxisType: StyleParam.AxisType * ?MinMax: (#System.IConvertible * #System.IConvertible) * ?Mirror: StyleParam.Mirror * ?ShowSpikes: bool * ?SpikeColor: Color * ?SpikeThickness: int * ?ShowLine: bool * ?LineColor: Color * ?ShowGrid: bool * ?GridColor: Color * ?GridDash: StyleParam.DrawingStyle * ?ZeroLine: bool * ?ZeroLineColor: Color * ?Anchor: StyleParam.LinearAxisId * ?Side: StyleParam.Side * ?Overlaying: StyleParam.LinearAxisId * ?AutoShift: bool * ?Shift: int * ?Domain: (float * float) * ?Position: float * ?CategoryOrder: StyleParam.CategoryOrder * ?CategoryArray: seq<#System.IConvertible> * ?RangeSlider: RangeSlider * ?RangeSelector: RangeSelector * ?BackgroundColor: Color * ?ShowBackground: bool * ?Id: StyleParam.SubPlotId -> (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)
module GenericChart from Plotly.NET
<summary> Module to represent a GenericChart </summary>
val toChartHTML: gChart: GenericChart.GenericChart -> string
val multiLabelROC: Map<string,(float * float)[]>
static member ComparisonMetrics.calculateMultiLabelROC: actual: 'a[] * predictions: ('a * float[])[] -> Map<string,(float * float)[]> (requires 'a :> System.IConvertible and equality)
val aucMap: Map<string,float>
Multiple items
module Map from FSharp.Stats
<summary> Module to strore specialised computations on maps </summary>

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

--------------------
type Map<'Key,'Value (requires comparison)> = interface IReadOnlyDictionary<'Key,'Value> interface IReadOnlyCollection<KeyValuePair<'Key,'Value>> interface IEnumerable interface IComparable interface IEnumerable<KeyValuePair<'Key,'Value>> interface ICollection<KeyValuePair<'Key,'Value>> interface IDictionary<'Key,'Value> new: elements: seq<'Key * 'Value> -> Map<'Key,'Value> member Add: key: 'Key * value: 'Value -> Map<'Key,'Value> member Change: key: 'Key * f: ('Value option -> 'Value option) -> Map<'Key,'Value> ...
<summary>Immutable maps based on binary trees, where keys are ordered by F# generic comparison. By default comparison is the F# structural comparison function or uses implementations of the IComparable interface on key values.</summary>
<remarks>See the <see cref="T:Microsoft.FSharp.Collections.MapModule" /> module for further operations on maps. All members of this class are thread-safe and may be used concurrently from multiple threads.</remarks>


--------------------
new: elements: seq<'Key * 'Value> -> Map<'Key,'Value>
val map: mapping: ('Key -> 'T -> 'U) -> table: Map<'Key,'T> -> Map<'Key,'U> (requires comparison)
<summary>Builds a new collection whose elements are the results of applying the given function to each of the elements of the collection. The key passed to the function indicates the key of element being transformed.</summary>
<param name="mapping">The function to transform the key/value pairs.</param>
<param name="table">The input map.</param>
<returns>The resulting map of keys and transformed values.</returns>
<example id="map-1"><code lang="fsharp"> let sample = Map [ (1, "a"); (2, "b") ] sample |&gt; Map.map (fun n s -&gt; sprintf "%i %s" n s) // evaluates to map [(1, "1 a"); (2, "2 b")] </code></example>
val roc: (float * float)[]
val multiLabelROCChart: GenericChart.GenericChart
val toArray: table: Map<'Key,'T> -> ('Key * 'T)[] (requires comparison)
<summary>Returns an array of all key-value pairs in the mapping. The array will be ordered by the keys of the map.</summary>
<param name="table">The input map.</param>
<returns>The array of key/value pairs.</returns>
<example id="toarray-1"><code lang="fsharp"> let input = Map [ (1, "a"); (2, "b") ] input |&gt; Map.toArray // evaluates to [|(1, "a"); (2, "b")|] </code></example>