Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 9 additions & 7 deletions .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,19 @@
"version": 1,
"isRoot": true,
"tools": {
"fsdocs-tool": {
"version": "16.1.1",
"commands": [
"fsdocs"
]
},
"fantomas": {
"version": "6.1.1",
"commands": [
"fantomas"
]
],
"rollForward": false
},
"fsdocs-tool": {
"version": "20.0.1",
"commands": [
"fsdocs"
],
"rollForward": false
}
}
}
14 changes: 7 additions & 7 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ jobs:

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x.x'
dotnet-version: '8.x.x'
- name: Restore local tools
run: dotnet tool restore
- name: make script executable
Expand All @@ -30,11 +30,11 @@ jobs:
runs-on: windows-latest

steps:
- uses: actions/checkout@v2
- name: Setup .NET
uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '9.x.x'
dotnet-version: '8.x.x'
- name: Restore local tools
run: dotnet tool restore
- name: Build and test
Expand Down
12 changes: 11 additions & 1 deletion build/BasicTasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,17 @@ let clean = BuildTask.create "Clean" [] {
let build = BuildTask.create "Build" [clean] {
solutionFile
|> DotNet.build (fun p ->
{ p with MSBuildParams = { p.MSBuildParams with DisableInternalBinLog = true }}
let msBuildParams =
{p.MSBuildParams with
Properties = ([
"warnon", "3390"
])
DisableInternalBinLog = true
}
{
p with
MSBuildParams = msBuildParams
}
|> DotNet.Options.withCustomParams (Some "-tl")
)
}
7 changes: 5 additions & 2 deletions build/PackageTasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ open TestTasks

open BlackFox.Fake
open Fake.Core
open Fake.DotNet
open Fake.IO.Globbing.Operators

let pack = BuildTask.create "Pack" [clean; build; runTests] {
Expand All @@ -18,17 +19,18 @@ let pack = BuildTask.create "Pack" [clean; build; runTests] {
|> Seq.iter (Fake.DotNet.DotNet.pack (fun p ->
let msBuildParams =
{p.MSBuildParams with
DisableInternalBinLog = true
Properties = ([
"Version",stableVersionTag
"PackageReleaseNotes", (release.Notes |> String.concat "\r\n")
] @ p.MSBuildParams.Properties)
DisableInternalBinLog = true
}
{
p with
MSBuildParams = msBuildParams
OutputPath = Some pkgDir
}
|> DotNet.Options.withCustomParams (Some "--no-dependencies -tl")
))
else failwith "aborted"
}
Expand All @@ -41,18 +43,19 @@ let packPrerelease = BuildTask.create "PackPrerelease" [setPrereleaseTag; clean;
|> Seq.iter (Fake.DotNet.DotNet.pack (fun p ->
let msBuildParams =
{p.MSBuildParams with
DisableInternalBinLog = true
Properties = ([
"Version", prereleaseTag
"PackageReleaseNotes", (release.Notes |> String.toLines )
] @ p.MSBuildParams.Properties)
DisableInternalBinLog = true
}
{
p with
VersionSuffix = Some prereleaseSuffix
OutputPath = Some pkgDir
MSBuildParams = msBuildParams
}
|> DotNet.Options.withCustomParams (Some "--no-dependencies -tl")
))
else
failwith "aborted"
Expand Down
18 changes: 9 additions & 9 deletions build/TestTasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@ open ProjectInfo
open BasicTasks

let runTests = BuildTask.create "RunTests" [clean; build] {
testProject
|> Fake.DotNet.DotNet.test (fun testParams ->
{ testParams with
Logger = Some "console;verbosity=detailed"
Configuration = DotNet.BuildConfiguration.fromString configuration
NoBuild = true
MSBuildParams = { testParams.MSBuildParams with DisableInternalBinLog = true }
Fake.DotNet.DotNet.test(fun testParams ->
{
testParams with
Logger = Some "console;verbosity=detailed"
Configuration = DotNet.BuildConfiguration.fromString configuration
NoBuild = true
MSBuildParams = { testParams.MSBuildParams with DisableInternalBinLog = true }
}
|> DotNet.Options.withCustomParams (Some "-tl")
)
) testProject
}

// to do: use this once we have actual tests
Expand All @@ -27,12 +27,12 @@ let runTestsWithCodeCov = BuildTask.create "RunTestsWithCodeCov" [clean; build]
testParams with
MSBuildParams = {
standardParams with
DisableInternalBinLog = true
Properties = [
"AltCover","true"
"AltCoverCobertura","../../codeCov.xml"
"AltCoverForce","true"
]
DisableInternalBinLog = true
};
Logger = Some "console;verbosity=detailed"
}
Expand Down
4 changes: 0 additions & 4 deletions build/build.fsproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,4 @@
<PackageReference Include="Fake.Tools.Git" Version="6.1.3" />
</ItemGroup>

<ItemGroup>
<PackageReference Update="FSharp.Core" Version="9.0.202" />
</ItemGroup>

</Project>
21 changes: 6 additions & 15 deletions docs/BasicStats.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,13 @@ categoryindex: 0
(*** hide ***)

(*** condition: prepare ***)
#r "../src/FSharp.Stats/bin/Release/netstandard2.0/FSharp.Stats.dll"
#r "nuget: FSharpAux.Core, 2.0.0"
#r "nuget: FSharpAux, 2.0.0"
#r "nuget: FSharpAux.IO, 2.0.0"
#r "nuget: OptimizedPriorityQueue, 5.1.0"
#r "nuget: FsMath, 0.0.1"
open FsMath
#I "../src/FSharp.Stats/bin/Release/.net8.0/"
#r "FSharp.Stats.dll"
(*** condition: ipynb ***)
#if IPYNB
#r "nuget: FSharp.Stats"
Expand All @@ -27,19 +31,6 @@ open FsMath

_Summary:_ this tutorial gives an overview over how to do some of the basic statistical measurements with FSharp.Stats.

### Table of contents

- [Central tendency](#Central-tendency)
- [Mean](#Mean)
- [Truncated mean](#Truncated-mean)
- [Median](#Median)
- [Harmonic mean](#Harmonic-mean)
- [Geometric mean](#Geometric-mean)
- [Dispersion](#Dispersion)
- [Range](#Range)
- [Variance and Standard Deviation](#Variance-and-standard-deviation)
- [Coefficient of variation](#Coefficient-of-variation)

## Central tendency

A [central tendency](https://en.wikipedia.org/wiki/Central_tendency) (or measure of central tendency) is a central or typical value for a probability distribution.
Expand Down
33 changes: 8 additions & 25 deletions docs/Clustering.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,24 @@ categoryindex: 0
(*** hide ***)

(*** condition: prepare ***)
#I "../src/FSharp.Stats/bin/Release/netstandard2.0/"
#r "nuget: FSharpAux.Core, 2.0.0"
#r "nuget: FSharpAux, 2.0.0"
#r "nuget: FSharpAux.IO, 2.0.0"
#r "nuget: OptimizedPriorityQueue, 5.1.0"
#r "nuget: FsMath, 0.0.1"
#I "../src/FSharp.Stats/bin/Release/.net8.0/"
#r "FSharp.Stats.dll"
#r "nuget: Plotly.NET, 4.0.0"
#r "nuget: FSharpAux, 1.0.0"
#r "nuget: Cyjs.NET"
#r "nuget: OptimizedPriorityQueue, 5.1.0"
#r "nuget: FsMath, 0.0.1"
open FsMath


Plotly.NET.Defaults.DefaultDisplayOptions <-
Plotly.NET.DisplayOptions.init (PlotlyJSReference = Plotly.NET.PlotlyJSReference.NoReference)

(*** condition: ipynb ***)
#if IPYNB
#r "nuget: Plotly.NET, 4.0.0"
#r "nuget: Plotly.NET.Interactive, 4.0.0"
#r "nuget: OptimizedPriorityQueue, 5.1.0"
#r "nuget: FSharpAux, 1.0.0"
#r "nuget: FSharp.Stats"
#r "nuget: Plotly.NET, 4.0.0"
#r "nuget: Cyjs.NET"
#endif // IPYNB

Expand All @@ -40,22 +39,6 @@ Plotly.NET.Defaults.DefaultDisplayOptions <-

_Summary:_ this tutorial demonstrates several clustering methods in FSharp.Stats and how to visualize the results with Plotly.NET.

### Table of contents

- [Iterative Clustering](#Iterative-Clustering)
- [k-means clustering](#k-means-clustering)
- [Density based clustering](#Density-based-clustering)
- [DBSCAN](#DBSCAN)
- [Hierarchical clustering](#Hierarchical-Clustering)
- [Distance measures](#Distance-measures)
- [Linkages](#Linkages)
- [Determining the optimal number of clusters](#Determining-the-optimal-number-of-clusters)
- [Rule of thumb](#Rule-of-thumb)
- [Elbow criterion](#Elbow-criterion)
- [AIC](#AIC)
- [Silhouette coefficient](#Silhouette-coefficient)
- [GapStatistics](#GapStatistics)

Clustering methods can be used to group elements of a huge data set based on their similarity. Elements sharing similar properties cluster together and can be reported as coherent group.

**Column wise standardization**
Expand Down
Loading