fslaborg / FSharp.Stats

statistical testing, linear algebra, machine learning, fitting and signal processing in F#
https://fslab.org/FSharp.Stats/
Other
205 stars 54 forks source link

[BUG] Seq.weightedMean returns a function #329

Closed kevmal closed 1 month ago

kevmal commented 1 month ago

The signature for Seq.weightedMean is off. For example:

#r "nuget:FSharp.Stats"
open FSharp.Stats

let values = [1.0; 2.0; 3.0; 4.0; 5.0]
let weights = [1.0;2.0;1.0;2.0;1.0]
Seq.weightedMean weights values

Result:

val values: float list = [1.0; 2.0; 3.0; 4.0; 5.0]
val weights: float list = [1.0; 2.0; 1.0; 2.0; 1.0]
val it: (float -> float)

Expecting a float.