Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update docs and related tooling #337

Draft
wants to merge 2 commits into
base: developer
Choose a base branch
from
Draft
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 6
uses: actions/setup-dotnet@v1
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.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 6
uses: actions/setup-dotnet@v1
- uses: actions/checkout@v4
- name: Setup .NET 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: '6.x.x'
dotnet-version: '8.x.x'
- name: Restore local tools
run: dotnet tool restore
- name: Build and test
Expand Down
11 changes: 5 additions & 6 deletions FSharp.Stats.sln
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,20 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "docs", "docs", "{23F9FB2E-6
docs\Intervals.fsx = docs\Intervals.fsx
docs\LinearAlgebra.fsx = docs\LinearAlgebra.fsx
docs\Matrix_Vector.fsx = docs\Matrix_Vector.fsx
docs\ML.fsx = docs\ML.fsx
docs\Normalization.fsx = docs\Normalization.fsx
docs\NuGet.config = docs\NuGet.config
docs\Optimization.fsx = docs\Optimization.fsx
docs\Quantiles.fsx = docs\Quantiles.fsx
docs\NuGet.config = docs\NuGet.config
docs\Rank.fsx = docs\Rank.fsx
docs\Signal.fsx = docs\Signal.fsx
docs\Normalization.fsx = docs\Normalization.fsx
docs\ML.fsx = docs\ML.fsx
docs\Testing.fsx = docs\Testing.fsx
docs\_template.html = docs\_template.html
docs\_template.ipynb = docs\_template.ipynb
docs\_head.html = docs\_head.html
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "content", "content", "{50E3E339-AA4D-4FD2-8791-DEBD2EBF0504}"
ProjectSection(SolutionItems) = preProject
docs\content\fsdocs-custom.css = docs\content\fsdocs-custom.css
docs\content\fsdocs-theme.css = docs\content\fsdocs-theme.css
EndProjectSection
EndProject
Project("{6EC3EE1D-3C4E-46DD-8F32-0CC8E7565705}") = "FSharp.Stats.Interactive", "src\FSharp.Stats.Interactive\FSharp.Stats.Interactive.fsproj", "{D7BCF5C0-9E2B-4170-9390-607B0B65A8CD}"
Expand Down
12 changes: 11 additions & 1 deletion build/BasicTasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,15 @@ let clean = BuildTask.create "Clean" [] {

let build = BuildTask.create "Build" [clean] {
solutionFile
|> DotNet.build id
|> DotNet.build (fun p ->
let msBuildParams =
{p.MSBuildParams with
DisableInternalBinLog = true
}
{
p with
MSBuildParams = msBuildParams
}
|> DotNet.Options.withCustomParams (Some "-tl")
)
}
5 changes: 5 additions & 0 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 @@ -22,12 +23,14 @@ let pack = BuildTask.create "Pack" [clean; build; runTests] {
"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 @@ -44,13 +47,15 @@ let packPrerelease = BuildTask.create "PackPrerelease" [setPrereleaseTag; clean;
"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
3 changes: 3 additions & 0 deletions build/TestTasks.fs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ let runTests = BuildTask.create "RunTests" [clean; build] {
Logger = Some "console;verbosity=detailed"
Configuration = DotNet.BuildConfiguration.fromString configuration
NoBuild = true
MSBuildParams = { testParams.MSBuildParams with DisableInternalBinLog = true }
}
|> DotNet.Options.withCustomParams (Some "-tl")
) testProject
}

Expand All @@ -30,6 +32,7 @@ let runTestsWithCodeCov = BuildTask.create "RunTestsWithCodeCov" [clean; build]
"AltCoverCobertura","../../codeCov.xml"
"AltCoverForce","true"
]
DisableInternalBinLog = true
};
Logger = Some "console;verbosity=detailed"
}
Expand Down
18 changes: 9 additions & 9 deletions build/build.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<OutputType>Exe</OutputType>
</PropertyGroup>

Expand All @@ -20,15 +20,15 @@

<ItemGroup>
<PackageReference Include="BlackFox.Fake.BuildTask" Version="0.1.3" />
<PackageReference Include="Fake.Api.Github" Version="5.22.0" />
<PackageReference Include="Fake.Core.Process" Version="5.22.0" />
<PackageReference Include="Fake.Core.ReleaseNotes" Version="5.22.0" />
<PackageReference Include="Fake.Core.Target" Version="5.22.0" />
<PackageReference Include="Fake.DotNet.Cli" Version="5.22.0" />
<PackageReference Include="Fake.DotNet.MSBuild" Version="5.22.0" />
<PackageReference Include="Fake.Api.Github" Version="6.0.0" />
<PackageReference Include="Fake.Core.Process" Version="6.0.0" />
<PackageReference Include="Fake.Core.ReleaseNotes" Version="6.0.0" />
<PackageReference Include="Fake.Core.Target" Version="6.0.0" />
<PackageReference Include="Fake.DotNet.Cli" Version="6.0.0" />
<PackageReference Include="Fake.DotNet.MSBuild" Version="6.0.0" />
<PackageReference Include="Fake.Extensions.Release" Version="0.2.0" />
<PackageReference Include="Fake.IO.FileSystem" Version="5.22.0" />
<PackageReference Include="Fake.Tools.Git" Version="5.22.0" />
<PackageReference Include="Fake.IO.FileSystem" Version="6.0.0" />
<PackageReference Include="Fake.Tools.Git" Version="6.0.0" />
</ItemGroup>

</Project>
20 changes: 6 additions & 14 deletions docs/BasicStats.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,12 @@ 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"
#I "../src/FSharp.Stats/bin/Release/netstandard2.0/"
#r "FSharp.Stats.dll"

(*** condition: ipynb ***)
#if IPYNB
Expand All @@ -26,19 +31,6 @@ categoryindex: 0

_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
27 changes: 5 additions & 22 deletions docs/Clustering.fsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,24 +10,23 @@ categoryindex: 0
(*** hide ***)

(*** condition: prepare ***)
#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"
#I "../src/FSharp.Stats/bin/Release/netstandard2.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"


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 @@ -39,22 +38,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
Loading