Skip to content

Commit 8054b5c

Browse files
committed
- Fix xml doc errors
- Fix typo (VCrossvalidation > shuffelAndSplit -> shuffleAndSplit)
1 parent bd10bfe commit 8054b5c

25 files changed

+104
-100
lines changed

src/FSharp.Stats/Array.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ module ArrayExtension =
645645
/// </summary>
646646
/// <param name="start">start value (is included)</param>
647647
/// <param name="stop">end value (by default is included )</param>
648-
/// <param name="um">sets the number of elements in the array. If not set, stepsize = 1.</param>
648+
/// <param name="num">sets the number of elements in the array. If not set, stepsize = 1.</param>
649649
/// <param name="IncludeEndpoint">If false, the array does not contain the stop value</param>
650650
static member linspace(start:float,stop:float,num:int,?IncludeEndpoint:bool) : float [] =
651651

src/FSharp.Stats/Correlation.fs

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -298,19 +298,19 @@ module Correlation =
298298
/// <summary>
299299
/// Tau A - Make no adjustments for ties
300300
/// </summary>
301-
/// <param name="x">The first array of observations.</param>
302-
/// <param name="y">The second array of observations.</param>
301+
/// <param name="_x">The first array of observations.</param>
302+
/// <param name="_y">The second array of observations.</param>
303303
/// <param name="pq">Number of concordant minues the number of discordant pairs.</param>
304304
/// <param name="n0">n(n-1)/2 or (n choose 2), where n is the number of observations.</param>
305-
/// <param name="n1">sum_i(t_i(t_i-1)/2) where t_is is t_i he number of pairs of observations with the same x value.</param>
306-
/// <param name="n2">sum_i(u_i(u_i-1)/2) where u_is is u_i he number of pairs of observations with the same y value.</param>
305+
/// <param name="_n1">sum_i(t_i(t_i-1)/2) where t_is is t_i he number of pairs of observations with the same x value.</param>
306+
/// <param name="_n2">sum_i(u_i(u_i-1)/2) where u_is is u_i he number of pairs of observations with the same y value.</param>
307307
/// <returns>The Kendall tau A statistic.</returns>
308308
let tauA _x _y pq n0 _n1 _n2 = pq / float n0
309309
/// <summary>
310310
/// Tau B - Adjust for ties. tau_b = pq / sqrt((n0 - n1)(n0 - n2))
311311
/// </summary>
312-
/// <param name="x">The first array of observations.</param>
313-
/// <param name="y">The second array of observations.</param>
312+
/// <param name="_x">The first array of observations.</param>
313+
/// <param name="_y">The second array of observations.</param>
314314
/// <param name="pq">Number of concordant minues the number of discordant pairs.</param>
315315
/// <param name="n0">n(n-1)/2 or (n choose 2), where n is the number of observations.</param>
316316
/// <param name="n1">sum_i(t_i(t_i-1)/2) where t_is is t_i he number of pairs of observations with the same x value.</param>
@@ -325,9 +325,9 @@ module Correlation =
325325
/// <param name="x">The first array of observations.</param>
326326
/// <param name="y">The second array of observations.</param>
327327
/// <param name="pq">Number of concordant minues the number of discordant pairs.</param>
328-
/// <param name="n0">n(n-1)/2 or (n choose 2), where n is the number of observations.</param>
329-
/// <param name="n1">sum_i(t_i(t_i-1)/2) where t_is is t_i he number of pairs of observations with the same x value.</param>
330-
/// <param name="n2">sum_i(u_i(u_i-1)/2) where u_is is u_i he number of pairs of observations with the same y value.</param>
328+
/// <param name="_n0">n(n-1)/2 or (n choose 2), where n is the number of observations.</param>
329+
/// <param name="_n1">sum_i(t_i(t_i-1)/2) where t_is is t_i he number of pairs of observations with the same x value.</param>
330+
/// <param name="_n2">sum_i(u_i(u_i-1)/2) where u_is is u_i he number of pairs of observations with the same y value.</param>
331331
/// <returns>The Kendall tau C statistic.</returns>
332332
let tauC (x : _[]) y pq _n0 _n1 _n2 =
333333
let n = x.Length

src/FSharp.Stats/DistanceMetrics.fs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -124,8 +124,8 @@ module DistanceMetrics =
124124

125125
/// <summary>The [Minkowski distance](https://en.wikipedia.org/wiki/Minkowski_distance) between two vectors of order `p`.</summary>
126126
/// <remarks>The two vectors need not have equal lengths: when one vectors is exhausted any remaining elements in the other vectors are ignored.</remarks>
127-
/// <param name="s1">first vector</param>
128-
/// <param name="s2">second vector</param>
127+
/// <param name="v1">first vector</param>
128+
/// <param name="v2">second vector</param>
129129
/// <param name="p">float constrained to `p > 0`</param>
130130
/// <returns>Minkowski distance between elements of given vectors. Returns NaN if vectors contain NaN.</returns>
131131
/// <example>
@@ -163,8 +163,8 @@ module DistanceMetrics =
163163
/// <summary>The [Minkowski distance](https://en.wikipedia.org/wiki/Minkowski_distance) between two vectors (ignores NaN) of order `p`.</summary>
164164
/// <remarks>Non-regular differences between the sequences are ignored.
165165
/// The two vectors need not have equal lengths: when one vectors is exhausted any remaining elements in the other vectors are ignored.</remarks>
166-
/// <param name="s1">first vector</param>
167-
/// <param name="s2">second vector</param>
166+
/// <param name="v1">first vector</param>
167+
/// <param name="v2">second vector</param>
168168
/// <param name="p">float constrained to `p > 0`</param>
169169
/// <returns>Minkowski distance between elements of given vectors.</returns>
170170
/// <example>
@@ -319,8 +319,8 @@ module DistanceMetrics =
319319

320320
/// <summary>The [Minkowski distance](https://en.wikipedia.org/wiki/Minkowski_distance) between two arrays of order `p`.</summary>
321321
/// <remarks>The two arrays need not have equal lengths: when one array is exhausted any remaining elements in the other array are ignored.</remarks>
322-
/// <param name="s1">first array</param>
323-
/// <param name="s2">second array</param>
322+
/// <param name="a1">first array</param>
323+
/// <param name="a2">second array</param>
324324
/// <param name="p">float constrained to `p > 0`</param>
325325
/// <returns>Minkowski distance between elements of given arrays. Returns NaN if arrays contain NaN.</returns>
326326
/// <example>
@@ -358,8 +358,8 @@ module DistanceMetrics =
358358
/// <summary>The [Minkowski distance](https://en.wikipedia.org/wiki/Minkowski_distance) between two arrays (ignores NaN) of order `p`.</summary>
359359
/// <remarks>Non-regular differences between the sequences are ignored.
360360
/// The two arrays need not have equal lengths: when one array is exhausted any remaining elements in the other array are ignored.</remarks>
361-
/// <param name="s1">first array</param>
362-
/// <param name="s2">second array</param>
361+
/// <param name="a1">first array</param>
362+
/// <param name="a2">second array</param>
363363
/// <param name="p">float constrained to `p > 0`</param>
364364
/// <returns>Minkowski distance between elements of given arrays.</returns>
365365
/// <example>

src/FSharp.Stats/Distributions/Continuous/ChiSquared.fs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ type ChiSquared =
6767
ChiSquared.CheckParam dof
6868
sqrt (dof * 2.)
6969

70-
/// <param name="k">Degrees of freedom (must be positive).</param>
70+
/// <param name="dof">Degrees of freedom (must be positive).</param>
7171
/// <returns>A sample from χ²(dof), interpreted as Gamma(dof/2, 2).</returns>
7272
static member SampleUnchecked (dof: float) : float =
7373
let alpha = dof / 2.0

src/FSharp.Stats/Distributions/Discrete/Binomial.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,6 @@ type Binomial =
8282

8383
/// <summary>Produces a random sample using the current random number generator (from GetSampleGenerator()).<br />No parameter checking!</summary>
8484
/// <remarks></remarks>
85-
/// <param name="SampleUnchecked"></param>
8685
/// <param name="p"></param>
8786
/// <param name="n"></param>
8887
/// <returns></returns>

src/FSharp.Stats/Distributions/Discrete/Hypergeometric.fs

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,6 @@ type Hypergeometric =
100100

101101
/// <summary>Produces a random sample using the current random number generator (from GetSampleGenerator()).<br />No parameter checking!</summary>
102102
/// <remarks></remarks>
103-
/// <param name="SampleUnchecked"></param>
104103
/// <param name="N"></param>
105104
/// <param name="K"></param>
106105
/// <param name="n"></param>
@@ -253,11 +252,17 @@ type Hypergeometric =
253252

254253
/// <summary> Initializes a hypergeometric distribution.
255254
///
256-
/// <summary>The hypergeometric distribution is a discrete probability distribution<br />that describes the probability of `k` successes (random draws for which the object<br />drawn has a specified feature) in `n` draws, without replacement, from a finite<br />population of size `N` that contains exactly `K` objects with that feature,<br />wherein each draw is either a success (`1.0`) or a failure (`0.0`).</summary><br /><param name="N">The population size</param><br /><param name="K">The number of success states in the population</param><br /><param name="n">The number of draws</param></summary>
255+
/// <summary>
256+
/// The hypergeometric distribution is a discrete probability distribution
257+
/// that describes the probability of `k` successes (random draws for which the object
258+
/// drawn has a specified feature) in `n` draws, without replacement, from a finite
259+
/// population of size `N` that contains exactly `K` objects with that feature,
260+
/// wherein each draw is either a success (`1.0`) or a failure (`0.0`).
261+
/// </summary>
262+
/// <param name="N">The population size</param>
263+
/// <param name="K">The number of success states in the population</param>
264+
/// <param name="n">The number of draws</param>
257265
/// <remarks></remarks>
258-
/// <param name="N"></param>
259-
/// <param name="K"></param>
260-
/// <param name="n"></param>
261266
/// <returns></returns>
262267
/// <example>
263268
/// <code>

src/FSharp.Stats/Distributions/Discrete/NegativeBinomial.fs

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
namespace FSharp.Stats.Distributions.Discrete
1+
Fkspace FSharp.Stats.Distributions.Discrete
22

33
open System
44
open FSharp.Stats
@@ -154,10 +154,13 @@ type NegativeBinomial_trials =
154154
sprintf "NegativeBinomial_trials(r = %i, p = %f)" r p
155155

156156
/// <summary> Initializes a negative binomial distribution.
157-
/// <summary>The negative binomial distribution is a discrete probability distribution<br />that models the number of trials needed x to get the rth success in repeated <br />independent Bernoulli trials with probability p.<br /></summary><br /><param name="r">The number of success states</param><br /><param name="p">The probability of each independent bernoulli trial</param><br /><param name="x">The number of trials until the rth success</param></summary>
157+
/// The negative binomial distribution is a discrete probability distribution
158+
/// that models the number of trials needed x to get the rth success in repeated
159+
/// independent Bernoulli trials with probability p.
160+
/// </summary>
161+
/// <param name="r">The number of success states</param>
162+
/// <param name="p">The probability of each independent bernoulli trial</param>
158163
/// <remarks></remarks>
159-
/// <param name="r"></param>
160-
/// <param name="p"></param>
161164
/// <returns></returns>
162165
/// <example>
163166
/// <code>

src/FSharp.Stats/Distributions/Discrete/Poisson.fs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ type Poisson =
8686

8787
/// <summary>Produces a random sample using the current random number generator (from GetSampleGenerator()).<br />No parameter checking!</summary>
8888
/// <remarks></remarks>
89-
/// <param name="SampleUnchecked"></param>
9089
/// <param name="lambda"></param>
9190
/// <returns></returns>
9291
/// <example>

src/FSharp.Stats/Distributions/Distance.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -201,13 +201,13 @@ module Distance =
201201
/// <param name="xs"></param>
202202
/// <param name="ys"></param>
203203
/// <param name="xWeights"></param>
204-
/// <param name="yWeights "></param>
204+
/// <param name="yWeights"></param>
205205
/// <returns></returns>
206206
/// <example>
207207
/// <code>
208208
/// </code>
209209
/// </example>
210-
let cdfDistanceWeighted p (xs : float []) (ys : float []) xWeights yWeights =
210+
let cdfDistanceWeighted p (xs : float []) (ys : float []) xWeights yWeights =
211211

212212
if xs.Length = 0 then failwith "Given distribtuion xs is empty"
213213
if ys.Length = 0 then failwith "Given distribtuion ys is empty"

src/FSharp.Stats/Distributions/Empirical.fs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -327,8 +327,8 @@ module Empirical =
327327
/// <summary>Merges two maps into a single map. If a key exists in both maps, the value is determined by f with the first value being from mapA and the second originating from mapB.</summary>
328328
/// <param name="equalBandwidthOrNominal">Is the binwidth equal for both distributions? For nominal data set to true.</param>
329329
/// <param name="f">Function to transform values if key is present in both histograms. `histA-value &#8594; histB-value &#8594; newValue`</param>
330-
/// <param name="mapA">Empirical distribution A</param>
331-
/// <param name="mapB">Empirical distribution B</param>
330+
/// <param name="histA">Empirical distribution A</param>
331+
/// <param name="histB">Empirical distribution B</param>
332332
/// <remarks>When applied to continuous data the bandwidths must be equal!</remarks>
333333
/// <remarks>This function is not commutative! (mergeBy f a b) is not equal to (mergeBy f b a)</remarks>
334334
/// <returns>New frequency map that results from merged maps mapA and mapB. Values from keys that are present in both maps are handled by f</returns>

0 commit comments

Comments
 (0)