From 70ef474abc2111dd6be64382e3af1a4e9d3f5cae Mon Sep 17 00:00:00 2001 From: Mads Dabros Date: Sat, 20 Jan 2024 22:39:14 +0100 Subject: [PATCH] Target netstandard2.0 for libraries, target net8 for tests, and switch to github actions for CI (#147) --- .github/workflows/dotnet.yml | 44 ++++++++++++ LICENSE.md | 18 +---- README.md | 5 +- SharpLearning.sln | 5 +- azure-pipelines.yaml | 68 ------------------- global.json | 7 ++ .../Models/ClassificationAdaBoostModelTest.cs | 7 +- .../Models/RegressionAdaBoostModelTest.cs | 2 +- .../SharpLearning.AdaBoost.Test.csproj | 10 +-- .../SharpLearning.AdaBoost.csproj | 2 +- .../SharpLearning.Common.Interfaces.csproj | 2 +- .../SharpLearning.Containers.Test.csproj | 10 +-- .../SharpLearning.Containers.csproj | 2 +- .../SharpLearning.CrossValidation.Test.csproj | 10 +-- .../SharpLearning.CrossValidation.csproj | 2 +- .../ClassificationDecisionTreeModelTest.cs | 5 +- .../Models/RegressionDecisionTreeModelTest.cs | 5 +- .../SharpLearning.DecisionTrees.Test.csproj | 10 +-- .../SharpLearning.DecisionTrees.csproj | 2 +- .../SharpLearning.Ensemble.Test.csproj | 10 +-- .../SharpLearning.Ensemble.csproj | 2 +- ...earning.FeatureTransformations.Test.csproj | 10 +-- ...harpLearning.FeatureTransformations.csproj | 2 +- .../SharpLearning.GradientBoost.Test.csproj | 10 +-- .../SharpLearning.GradientBoost.csproj | 2 +- .../SharpLearning.InputOutput.Test.csproj | 16 +++-- .../SharpLearning.InputOutput.csproj | 2 +- .../SharpLearning.Metrics.Test.csproj | 10 +-- .../SharpLearning.Metrics.csproj | 2 +- .../SharpLearning.Neural.Test.csproj | 10 +-- .../SharpLearning.Neural.csproj | 2 +- .../SharpLearning.Optimization.Test.csproj | 10 +-- .../SharpLearning.Optimization.csproj | 2 +- .../Models/ClassificationForestModelTest.cs | 2 +- .../SharpLearning.RandomForest.Test.csproj | 10 +-- .../SharpLearning.RandomForest.csproj | 2 +- .../SharpLearning.XGBoost.Test.csproj | 10 +-- .../SharpLearning.XGBoost.csproj | 2 +- 38 files changed, 156 insertions(+), 176 deletions(-) create mode 100644 .github/workflows/dotnet.yml delete mode 100644 azure-pipelines.yaml create mode 100644 global.json diff --git a/.github/workflows/dotnet.yml b/.github/workflows/dotnet.yml new file mode 100644 index 00000000..e914c7cd --- /dev/null +++ b/.github/workflows/dotnet.yml @@ -0,0 +1,44 @@ +# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json + +name: dotnet + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + workflow_dispatch: + inputs: + version: + description: 'Release version to tag and create' + required: false + +env: + DOTNET_SKIP_FIRST_TIME_EXPERIENCE: 1 + DOTNET_NOLOGO: true + +jobs: + build: + strategy: + matrix: + os: [windows-latest] + configuration: [Debug, Release] + + runs-on: ${{ matrix.os }} + + steps: + - uses: actions/checkout@v3 + - name: Setup .NET + uses: actions/setup-dotnet@v3 + with: + global-json-file: global.json + - name: Restore dependencies + run: dotnet restore + - name: Build + run: dotnet build -c ${{ matrix.configuration }} --no-restore + - name: Test + run: dotnet test -c ${{ matrix.configuration }} --no-build --verbosity normal --collect:"XPlat Code Coverage" + - name: Upload coverage reports to Codecov + uses: codecov/codecov-action@v3 + with: + flags: ${{ matrix.os }},${{ matrix.configuration }} diff --git a/LICENSE.md b/LICENSE.md index 48f9e34d..7bafb0ee 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,19 +1,6 @@ -COPYRIGHT +MIT License -All contributions by Mads Dabros: -Copyright (c) 2014, Mads Dabros. -All rights reserved. - -All other contributions: -Copyright (c) 2017, the respective contributors. -All rights reserved. - -Each contributor holds copyright over their respective contributions. -The project versioning (Git) records all such contribution source information. - -LICENSE - -The MIT License (MIT) +Copyright (c) 2024 mdabros Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal @@ -32,4 +19,3 @@ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - diff --git a/README.md b/README.md index 5a1c4fb2..cee9d3ba 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,7 @@ -[![Build Status](https://machinelearning.visualstudio.com/sharplearning-github-build/_apis/build/status/sharplearning-CI?branchName=master)](https://machinelearning.visualstudio.com/sharplearning-github-build/_build/latest?definitionId=28&branchName=master) +[![Build Status](https://github.com/mdabros/SharpLearning/actions/workflows/dotnet.yml/badge.svg?branch=master)](https://github.com/mdabros/SharpLearning/actions/workflows/dotnet.yml) +[![Nuget](https://img.shields.io/nuget/v/SharpLearning.Containers?color=purple)](https://www.nuget.org/packages/SharpLearning.Containers/) +[![downloads](https://img.shields.io/nuget/dt/SharpLearning.Containers)](https://www.nuget.org/packages/SharpLearning.Containers) +[![License](https://img.shields.io/github/license/mdabros/SharpLearning)](https://github.com/mdabros/SharpLearning/blob/master/LICENSE.md) SharpLearning ================= diff --git a/SharpLearning.sln b/SharpLearning.sln index b278f109..7aaf6ae0 100644 --- a/SharpLearning.sln +++ b/SharpLearning.sln @@ -1,7 +1,7 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 15 -VisualStudioVersion = 15.0.26730.3 +# Visual Studio Version 17 +VisualStudioVersion = 17.8.34511.84 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpLearning.InputOutput.Test", "src\SharpLearning.InputOutput.Test\SharpLearning.InputOutput.Test.csproj", "{9B29211D-9211-4C36-872D-5747D6C51878}" EndProject @@ -55,7 +55,6 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "SharpLearning.InputOutput", EndProject Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{55C8F585-6918-4373-A349-EDF167D77FBB}" ProjectSection(SolutionItems) = preProject - azure-pipelines.yaml = azure-pipelines.yaml CONTRIBUTING.md = CONTRIBUTING.md src\Directory.Build.props = src\Directory.Build.props README.md = README.md diff --git a/azure-pipelines.yaml b/azure-pipelines.yaml deleted file mode 100644 index 496b0e1c..00000000 --- a/azure-pipelines.yaml +++ /dev/null @@ -1,68 +0,0 @@ -# Trigger CI only on master branch. -trigger: - - master - -# Pull request validation against master branch only. -pr: - - master - -variables: - #buildPlatform: 'Any CPU' # specify platform ('x86', 'x64', 'Any CPU'). - testProjectsSearchPattern: '**/*.Test.csproj' - -jobs: -- job: 'CI' - displayName: 'CI' - pool: - name: Hosted VS2017 - - strategy: - matrix: - Debug: - buildConfiguration: 'Debug' - Release: - buildConfiguration: 'Release' - - steps: - - task: DotNetCoreCLI@2 - displayName: Restore - inputs: - command: 'restore' - projects: '**/*.csproj' - - - task: DotNetCoreCLI@2 - displayName: Build - inputs: - command: build - projects: '**/*.csproj' - arguments: '--configuration $(buildConfiguration)' - - - task: DotNetCoreCLI@2 - displayName: Test - inputs: - command: test - projects: '$(testProjectsSearchPattern)' - arguments: '--configuration $(BuildConfiguration)' - - - task: PublishTestResults@2 - displayName: Publish Test Results - condition: succeededOrFailed() - inputs: - testRunner: VSTest - testResultsFiles: '**/*.trx' - - - task: DotNetCoreCLI@2 - displayName: 'dotnet pack' - inputs: - command: pack - packagesToPack: '**/*.csproj;-:**/*.Test.csproj' - - - task: NuGetCommand@2 - displayName: 'NuGet push' - inputs: - command: push - packagesToPush: '$(Build.ArtifactStagingDirectory)/*.nupkg' - nuGetFeedType: external - publishFeedCredentials: 'nuget/mdabros Api' - enabled: true - condition: and(and(succeeded(), eq(variables['Build.SourceBranch'], 'refs/heads/master')), eq(variables['buildConfiguration'], 'Release')) diff --git a/global.json b/global.json new file mode 100644 index 00000000..c8471613 --- /dev/null +++ b/global.json @@ -0,0 +1,7 @@ +{ + "sdk": { + "version": "8.0.100", + "rollForward": "latestFeature", + "allowPrerelease": true + } +} \ No newline at end of file diff --git a/src/SharpLearning.AdaBoost.Test/Models/ClassificationAdaBoostModelTest.cs b/src/SharpLearning.AdaBoost.Test/Models/ClassificationAdaBoostModelTest.cs index c39191c9..2ad393d9 100644 --- a/src/SharpLearning.AdaBoost.Test/Models/ClassificationAdaBoostModelTest.cs +++ b/src/SharpLearning.AdaBoost.Test/Models/ClassificationAdaBoostModelTest.cs @@ -13,7 +13,7 @@ namespace SharpLearning.AdaBoost.Test.Models [TestClass] public class ClassificationAdaBoostModelTest { - readonly string m_classificationAdaBoostModelString = "\r\n\r\n \r\n 1.4350845252893221\r\n 1.4163266482187662\r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 4\r\n 20\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 2.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 3\r\n -1\r\n 0\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 4\r\n -1\r\n 1\r\n \r\n \r\n \r\n \r\n 0.49056603773584911\r\n 0.509433962264151\r\n \r\n \r\n 0.57534246575342463\r\n 0.42465753424657537\r\n \r\n \r\n 0.4642857142857143\r\n 0.5357142857142857\r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0\r\n 0.18033248802479651\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 4\r\n 13.5\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 4.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 3\r\n -1\r\n 0\r\n \r\n \r\n 1\r\n -1\r\n 5\r\n 4\r\n 6\r\n 20\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 5\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 3\r\n -1\r\n 6\r\n -1\r\n 1\r\n \r\n \r\n \r\n \r\n 0.46391752577319589\r\n 0.53608247422680411\r\n \r\n \r\n 0.55718475073313778\r\n 0.44281524926686211\r\n \r\n \r\n 0.42899408284023677\r\n 0.57100591715976334\r\n \r\n \r\n 0.4642857142857143\r\n 0.5357142857142857\r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0\r\n 0.17822779700804667\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\r\n 0.51122114132712881\r\n \r\n"; + readonly string m_classificationAdaBoostModelString = "\r\n\r\n \r\n 1.435084525289322\r\n 1.4163266482187662\r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 4\r\n 20\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 2.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 3\r\n -1\r\n 0\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 4\r\n -1\r\n 1\r\n \r\n \r\n \r\n \r\n 0.4905660377358491\r\n 0.509433962264151\r\n \r\n \r\n 0.5753424657534246\r\n 0.4246575342465754\r\n \r\n \r\n 0.4642857142857143\r\n 0.5357142857142857\r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0\r\n 0.1803324880247965\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 4\r\n 13.5\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 4.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 3\r\n -1\r\n 0\r\n \r\n \r\n 1\r\n -1\r\n 5\r\n 4\r\n 6\r\n 20\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 5\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 3\r\n -1\r\n 6\r\n -1\r\n 1\r\n \r\n \r\n \r\n \r\n 0.4639175257731959\r\n 0.5360824742268041\r\n \r\n \r\n 0.5571847507331378\r\n 0.4428152492668621\r\n \r\n \r\n 0.42899408284023677\r\n 0.5710059171597633\r\n \r\n \r\n 0.4642857142857143\r\n 0.5357142857142857\r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0\r\n 0.17822779700804667\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\r\n 0.5112211413271288\r\n \r\n"; [TestMethod] public void ClassificationAdaBoostModel_Predict_Single() @@ -148,8 +148,9 @@ public void ClassificationAdaBoostModel_Save() var writer = new StringWriter(); sut.Save(() => writer); - - Assert.AreEqual(m_classificationAdaBoostModelString, writer.ToString()); + + var actual = writer.ToString(); + Assert.AreEqual(m_classificationAdaBoostModelString, actual); } [TestMethod] diff --git a/src/SharpLearning.AdaBoost.Test/Models/RegressionAdaBoostModelTest.cs b/src/SharpLearning.AdaBoost.Test/Models/RegressionAdaBoostModelTest.cs index 408119ca..26a2f8af 100644 --- a/src/SharpLearning.AdaBoost.Test/Models/RegressionAdaBoostModelTest.cs +++ b/src/SharpLearning.AdaBoost.Test/Models/RegressionAdaBoostModelTest.cs @@ -11,7 +11,7 @@ namespace SharpLearning.AdaBoost.Test.Models [TestClass] public class RegressionAdaBoostModelTest { - readonly string m_regressionDecisionTreeModelString = "\r\n\r\n \r\n 1.0840134892469564\r\n 1.2719860712587807\r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 6\r\n 13.5\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 2.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 1\r\n \r\n \r\n 0\r\n -1\r\n 4\r\n 3\r\n 5\r\n 1.5\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 4\r\n -1\r\n 0.14285714285714285\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 5\r\n -1\r\n 0\r\n \r\n \r\n 0\r\n -1\r\n 7\r\n 6\r\n 8\r\n 3\r\n \r\n \r\n -1\r\n 3\r\n -1\r\n 7\r\n -1\r\n 1\r\n \r\n \r\n 1\r\n -1\r\n 9\r\n 8\r\n 10\r\n 17\r\n \r\n \r\n -1\r\n 4\r\n -1\r\n 9\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 5\r\n -1\r\n 10\r\n -1\r\n 0.5\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0.10622710622710622\r\n 3.6787585479535942\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 6\r\n 20\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 4.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 1\r\n \r\n \r\n 1\r\n -1\r\n 4\r\n 3\r\n 5\r\n 9.5\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 4\r\n -1\r\n 0\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 5\r\n -1\r\n 0.21428571428571427\r\n \r\n \r\n -1\r\n 3\r\n -1\r\n 6\r\n -1\r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0\r\n 2.9853081700907786\r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\r\n 0\r\n \r\n \r\n 0.11515161607385251\r\n 7.7850943004347517\r\n \r\n"; + readonly string m_regressionDecisionTreeModelString = "\r\n\r\n \r\n 1.0840134892469564\r\n 1.2719860712587807\r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 6\r\n 13.5\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 2.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 1\r\n \r\n \r\n 0\r\n -1\r\n 4\r\n 3\r\n 5\r\n 1.5\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 4\r\n -1\r\n 0.14285714285714285\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 5\r\n -1\r\n 0\r\n \r\n \r\n 0\r\n -1\r\n 7\r\n 6\r\n 8\r\n 3\r\n \r\n \r\n -1\r\n 3\r\n -1\r\n 7\r\n -1\r\n 1\r\n \r\n \r\n 1\r\n -1\r\n 9\r\n 8\r\n 10\r\n 17\r\n \r\n \r\n -1\r\n 4\r\n -1\r\n 9\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 5\r\n -1\r\n 10\r\n -1\r\n 0.5\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0.10622710622710622\r\n 3.6787585479535942\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 6\r\n 20\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 4.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 1\r\n \r\n \r\n 1\r\n -1\r\n 4\r\n 3\r\n 5\r\n 9.5\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 4\r\n -1\r\n 0\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 5\r\n -1\r\n 0.21428571428571427\r\n \r\n \r\n -1\r\n 3\r\n -1\r\n 6\r\n -1\r\n 1\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0\r\n 2.9853081700907786\r\n \r\n \r\n \r\n \r\n \r\n \r\n 0\r\n 0\r\n \r\n \r\n 0.1151516160738525\r\n 7.785094300434752\r\n \r\n"; [TestMethod] public void RegressionAdaBoostModel_Predict_Single() diff --git a/src/SharpLearning.AdaBoost.Test/SharpLearning.AdaBoost.Test.csproj b/src/SharpLearning.AdaBoost.Test/SharpLearning.AdaBoost.Test.csproj index 22e5c9ec..ff4ded0c 100644 --- a/src/SharpLearning.AdaBoost.Test/SharpLearning.AdaBoost.Test.csproj +++ b/src/SharpLearning.AdaBoost.Test/SharpLearning.AdaBoost.Test.csproj @@ -1,11 +1,11 @@ - + true - netcoreapp2.0 + net8 false @@ -19,9 +19,9 @@ - - - + + + diff --git a/src/SharpLearning.AdaBoost/SharpLearning.AdaBoost.csproj b/src/SharpLearning.AdaBoost/SharpLearning.AdaBoost.csproj index a252b866..4c8d89bd 100644 --- a/src/SharpLearning.AdaBoost/SharpLearning.AdaBoost.csproj +++ b/src/SharpLearning.AdaBoost/SharpLearning.AdaBoost.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 false SharpLearning.AdaBoost Provides learning algorithms and models for AdaBoost regression and classification. diff --git a/src/SharpLearning.Common.Interfaces/SharpLearning.Common.Interfaces.csproj b/src/SharpLearning.Common.Interfaces/SharpLearning.Common.Interfaces.csproj index 806e2b02..7d8c3491 100644 --- a/src/SharpLearning.Common.Interfaces/SharpLearning.Common.Interfaces.csproj +++ b/src/SharpLearning.Common.Interfaces/SharpLearning.Common.Interfaces.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 false SharpLearning.Common.Interfaces Provides common interfaces for SharpLearning. diff --git a/src/SharpLearning.Containers.Test/SharpLearning.Containers.Test.csproj b/src/SharpLearning.Containers.Test/SharpLearning.Containers.Test.csproj index 7581562d..0a1dc7da 100644 --- a/src/SharpLearning.Containers.Test/SharpLearning.Containers.Test.csproj +++ b/src/SharpLearning.Containers.Test/SharpLearning.Containers.Test.csproj @@ -1,11 +1,11 @@ - + true - netcoreapp2.0 + net8 false @@ -21,9 +21,9 @@ - - - + + + diff --git a/src/SharpLearning.Containers/SharpLearning.Containers.csproj b/src/SharpLearning.Containers/SharpLearning.Containers.csproj index 2a2f7333..8a588e7e 100644 --- a/src/SharpLearning.Containers/SharpLearning.Containers.csproj +++ b/src/SharpLearning.Containers/SharpLearning.Containers.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 false SharpLearning.Containers Provides containers and base extension methods for SharpLearning. diff --git a/src/SharpLearning.CrossValidation.Test/SharpLearning.CrossValidation.Test.csproj b/src/SharpLearning.CrossValidation.Test/SharpLearning.CrossValidation.Test.csproj index acce0774..9f55ab0c 100644 --- a/src/SharpLearning.CrossValidation.Test/SharpLearning.CrossValidation.Test.csproj +++ b/src/SharpLearning.CrossValidation.Test/SharpLearning.CrossValidation.Test.csproj @@ -1,11 +1,11 @@ - + true - netcoreapp2.0 + net8 false @@ -19,9 +19,9 @@ - - - + + + diff --git a/src/SharpLearning.CrossValidation/SharpLearning.CrossValidation.csproj b/src/SharpLearning.CrossValidation/SharpLearning.CrossValidation.csproj index fdeb7a79..e02e6766 100644 --- a/src/SharpLearning.CrossValidation/SharpLearning.CrossValidation.csproj +++ b/src/SharpLearning.CrossValidation/SharpLearning.CrossValidation.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 false SharpLearning.CrossValidation Provides cross-validation, training/test set samplers and learning curves for SharpLearning. diff --git a/src/SharpLearning.DecisionTrees.Test/Models/ClassificationDecisionTreeModelTest.cs b/src/SharpLearning.DecisionTrees.Test/Models/ClassificationDecisionTreeModelTest.cs index 67dd1fff..3360cd62 100644 --- a/src/SharpLearning.DecisionTrees.Test/Models/ClassificationDecisionTreeModelTest.cs +++ b/src/SharpLearning.DecisionTrees.Test/Models/ClassificationDecisionTreeModelTest.cs @@ -14,7 +14,7 @@ namespace SharpLearning.DecisionTrees.Test.suts [TestClass] public class ClassificationDecisionTreeModelTest { - readonly string m_classificationDecisionTreeModelString = "\r\n\r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 4\r\n 20\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 2.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 3\r\n -1\r\n 0\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 4\r\n -1\r\n 1\r\n \r\n \r\n \r\n \r\n 0.33333333333333331\r\n 0.66666666666666663\r\n \r\n \r\n 0.73913043478260865\r\n 0.2608695652173913\r\n \r\n \r\n 0.16666666666666666\r\n 0.83333333333333326\r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0\r\n 0.18033248802479571\r\n \r\n \r\n \r\n"; + readonly string m_classificationDecisionTreeModelString = "\r\n\r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 4\r\n 20\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 2.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 3\r\n -1\r\n 0\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 4\r\n -1\r\n 1\r\n \r\n \r\n \r\n \r\n 0.3333333333333333\r\n 0.6666666666666666\r\n \r\n \r\n 0.7391304347826086\r\n 0.2608695652173913\r\n \r\n \r\n 0.16666666666666666\r\n 0.8333333333333333\r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0\r\n 0.1803324880247957\r\n \r\n \r\n \r\n"; [TestMethod] public void ClassificationDecisionTreeModel_Predict_Single() @@ -188,7 +188,8 @@ public void ClassificationDecisionTreeModel_Save() var writer = new StringWriter(); sut.Save(() => writer); - Assert.AreEqual(m_classificationDecisionTreeModelString, writer.ToString()); + var actual = writer.ToString(); + Assert.AreEqual(m_classificationDecisionTreeModelString, actual); } [TestMethod] diff --git a/src/SharpLearning.DecisionTrees.Test/Models/RegressionDecisionTreeModelTest.cs b/src/SharpLearning.DecisionTrees.Test/Models/RegressionDecisionTreeModelTest.cs index ba779f7d..1b30118d 100644 --- a/src/SharpLearning.DecisionTrees.Test/Models/RegressionDecisionTreeModelTest.cs +++ b/src/SharpLearning.DecisionTrees.Test/Models/RegressionDecisionTreeModelTest.cs @@ -11,7 +11,7 @@ namespace SharpLearning.DecisionTrees.Test.Models [TestClass] public class RegressionDecisionTreeModelTest { - readonly string m_regressionDecisionTreeModelString = "\r\n\r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 10\r\n 0.397254\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 5\r\n 0.20301550000000002\r\n \r\n \r\n 1\r\n -1\r\n 3\r\n 2\r\n 4\r\n 0.14998250000000002\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 3\r\n -1\r\n -0.054810500000000005\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 4\r\n -1\r\n 0.071894545454545447\r\n \r\n \r\n 1\r\n -1\r\n 6\r\n 5\r\n 7\r\n 0.3190235\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 6\r\n -1\r\n 1.094141117647059\r\n \r\n \r\n 1\r\n -1\r\n 8\r\n 7\r\n 9\r\n 0.3652945\r\n \r\n \r\n -1\r\n 3\r\n -1\r\n 8\r\n -1\r\n 0.80301928571428582\r\n \r\n \r\n -1\r\n 4\r\n -1\r\n 9\r\n -1\r\n 1.1078694999999998\r\n \r\n \r\n 1\r\n -1\r\n 11\r\n 10\r\n 18\r\n 0.59574250000000006\r\n \r\n \r\n 1\r\n -1\r\n 12\r\n 11\r\n 13\r\n 0.48716800000000005\r\n \r\n \r\n -1\r\n 5\r\n -1\r\n 12\r\n -1\r\n 1.88108975\r\n \r\n \r\n 1\r\n -1\r\n 14\r\n 13\r\n 15\r\n 0.5380695\r\n \r\n \r\n -1\r\n 6\r\n -1\r\n 14\r\n -1\r\n 2.0843065555555551\r\n \r\n \r\n 1\r\n -1\r\n 16\r\n 15\r\n 17\r\n 0.56256449999999991\r\n \r\n \r\n -1\r\n 7\r\n -1\r\n 16\r\n -1\r\n 1.81453875\r\n \r\n \r\n -1\r\n 8\r\n -1\r\n 17\r\n -1\r\n 2.072091\r\n \r\n \r\n 1\r\n -1\r\n 19\r\n 18\r\n 24\r\n 0.8071625\r\n \r\n \r\n 1\r\n -1\r\n 20\r\n 19\r\n 21\r\n 0.6214955\r\n \r\n \r\n -1\r\n 9\r\n -1\r\n 20\r\n -1\r\n 3.1442664000000002\r\n \r\n \r\n 1\r\n -1\r\n 22\r\n 21\r\n 23\r\n 0.66172000000000009\r\n \r\n \r\n -1\r\n 10\r\n -1\r\n 22\r\n -1\r\n 2.8252029999999997\r\n \r\n \r\n -1\r\n 11\r\n -1\r\n 23\r\n -1\r\n 2.9832834545454552\r\n \r\n \r\n -1\r\n 12\r\n -1\r\n 24\r\n -1\r\n 3.9871632\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 1.88318\r\n 0.063908\r\n 3.042257\r\n 2.305004\r\n -0.067698\r\n 1.662809\r\n 3.275749\r\n 1.118077\r\n 2.095059\r\n 1.181912\r\n 0.221663\r\n 0.938453\r\n 4.149409\r\n 3.105444\r\n 1.896278\r\n -0.121345\r\n 3.161652\r\n 4.135358\r\n 0.859063\r\n 1.170272\r\n 1.68796\r\n 1.979745\r\n 0.06869\r\n 4.052137\r\n 3.156316\r\n 2.95063\r\n 0.068935\r\n 2.85402\r\n 0.999743\r\n 4.048082\r\n 0.230923\r\n 0.816693\r\n 0.130713\r\n -0.537706\r\n -0.339109\r\n 2.124538\r\n 2.708292\r\n 4.01739\r\n 4.004021\r\n 1.022555\r\n 3.657442\r\n 4.073619\r\n 0.011994\r\n 3.640429\r\n 1.808497\r\n 1.431404\r\n 3.935544\r\n 1.162152\r\n -0.22733\r\n -0.068728\r\n 0.825051\r\n 2.008645\r\n 0.664566\r\n 4.180202\r\n 0.864845\r\n 1.851174\r\n 2.761993\r\n 4.075914\r\n 0.110229\r\n 2.181987\r\n 3.152528\r\n 3.046564\r\n 0.128954\r\n 1.062726\r\n 3.651742\r\n 4.40195\r\n 3.022888\r\n 2.874917\r\n 2.946801\r\n 2.893644\r\n 0.072131\r\n 1.748275\r\n 1.912047\r\n 3.710686\r\n 1.719148\r\n 2.17409\r\n 3.656357\r\n 3.522504\r\n 2.234126\r\n 1.859772\r\n 2.097017\r\n 0.001794\r\n 1.231928\r\n 2.953862\r\n -0.116803\r\n 2.638864\r\n 3.943428\r\n -0.328513\r\n -0.099866\r\n -0.030836\r\n 2.359786\r\n 3.212581\r\n 0.188975\r\n 1.904109\r\n 3.007114\r\n 3.845834\r\n 3.079411\r\n 1.939739\r\n 2.880078\r\n 3.063577\r\n 4.116296\r\n -0.240963\r\n 4.066299\r\n 4.011834\r\n 0.07771\r\n 3.103069\r\n 2.811897\r\n -0.10463\r\n 0.025216\r\n 4.330063\r\n 3.087091\r\n 2.269988\r\n 4.010701\r\n 3.119542\r\n 3.723411\r\n 2.792078\r\n 2.192787\r\n 2.081305\r\n 1.714463\r\n 0.885854\r\n 1.028187\r\n 1.951497\r\n 1.709427\r\n 0.144068\r\n 3.88024\r\n 0.921876\r\n 1.979316\r\n 3.085768\r\n 3.476122\r\n 3.993679\r\n 3.07788\r\n -0.105365\r\n -0.164703\r\n 1.096814\r\n 3.092879\r\n 2.987926\r\n 2.061264\r\n 2.746854\r\n 0.71671\r\n 0.103831\r\n 0.023776\r\n -0.033299\r\n 1.942286\r\n -0.006338\r\n 3.808753\r\n 0.652799\r\n 4.053747\r\n 4.56929\r\n -0.032773\r\n 2.066236\r\n 0.222785\r\n 1.089268\r\n 1.487788\r\n 2.852033\r\n 0.024486\r\n 3.73775\r\n 0.045017\r\n 0.001238\r\n 3.892763\r\n 2.819376\r\n 2.830665\r\n 0.234633\r\n 1.810782\r\n 4.237235\r\n 3.034768\r\n 1.742106\r\n 1.16925\r\n 0.831165\r\n 3.729376\r\n 1.823205\r\n 4.02197\r\n 1.262939\r\n 4.159518\r\n 2.039114\r\n 4.101837\r\n 2.778672\r\n 1.228284\r\n 1.73662\r\n -0.195046\r\n -0.063215\r\n 3.305268\r\n 2.063627\r\n 0.89884\r\n 2.701692\r\n 1.992909\r\n 3.811393\r\n 4.353857\r\n 2.635641\r\n 2.856311\r\n 1.352682\r\n 2.336459\r\n 2.111651\r\n 0.121726\r\n 3.264605\r\n 2.103446\r\n 0.896855\r\n 4.22085\r\n -0.217283\r\n -0.300577\r\n 0.006014\r\n \r\n \r\n 0\r\n 364.56356850440511\r\n \r\n \r\n \r\n"; + readonly string m_regressionDecisionTreeModelString = "\r\n\r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 10\r\n 0.397254\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 5\r\n 0.20301550000000002\r\n \r\n \r\n 1\r\n -1\r\n 3\r\n 2\r\n 4\r\n 0.14998250000000002\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 3\r\n -1\r\n -0.054810500000000005\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 4\r\n -1\r\n 0.07189454545454545\r\n \r\n \r\n 1\r\n -1\r\n 6\r\n 5\r\n 7\r\n 0.3190235\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 6\r\n -1\r\n 1.094141117647059\r\n \r\n \r\n 1\r\n -1\r\n 8\r\n 7\r\n 9\r\n 0.3652945\r\n \r\n \r\n -1\r\n 3\r\n -1\r\n 8\r\n -1\r\n 0.8030192857142858\r\n \r\n \r\n -1\r\n 4\r\n -1\r\n 9\r\n -1\r\n 1.1078694999999998\r\n \r\n \r\n 1\r\n -1\r\n 11\r\n 10\r\n 18\r\n 0.5957425000000001\r\n \r\n \r\n 1\r\n -1\r\n 12\r\n 11\r\n 13\r\n 0.48716800000000005\r\n \r\n \r\n -1\r\n 5\r\n -1\r\n 12\r\n -1\r\n 1.88108975\r\n \r\n \r\n 1\r\n -1\r\n 14\r\n 13\r\n 15\r\n 0.5380695\r\n \r\n \r\n -1\r\n 6\r\n -1\r\n 14\r\n -1\r\n 2.084306555555555\r\n \r\n \r\n 1\r\n -1\r\n 16\r\n 15\r\n 17\r\n 0.5625644999999999\r\n \r\n \r\n -1\r\n 7\r\n -1\r\n 16\r\n -1\r\n 1.81453875\r\n \r\n \r\n -1\r\n 8\r\n -1\r\n 17\r\n -1\r\n 2.072091\r\n \r\n \r\n 1\r\n -1\r\n 19\r\n 18\r\n 24\r\n 0.8071625\r\n \r\n \r\n 1\r\n -1\r\n 20\r\n 19\r\n 21\r\n 0.6214955\r\n \r\n \r\n -1\r\n 9\r\n -1\r\n 20\r\n -1\r\n 3.1442664000000002\r\n \r\n \r\n 1\r\n -1\r\n 22\r\n 21\r\n 23\r\n 0.6617200000000001\r\n \r\n \r\n -1\r\n 10\r\n -1\r\n 22\r\n -1\r\n 2.8252029999999997\r\n \r\n \r\n -1\r\n 11\r\n -1\r\n 23\r\n -1\r\n 2.983283454545455\r\n \r\n \r\n -1\r\n 12\r\n -1\r\n 24\r\n -1\r\n 3.9871632\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 1.88318\r\n 0.063908\r\n 3.042257\r\n 2.305004\r\n -0.067698\r\n 1.662809\r\n 3.275749\r\n 1.118077\r\n 2.095059\r\n 1.181912\r\n 0.221663\r\n 0.938453\r\n 4.149409\r\n 3.105444\r\n 1.896278\r\n -0.121345\r\n 3.161652\r\n 4.135358\r\n 0.859063\r\n 1.170272\r\n 1.68796\r\n 1.979745\r\n 0.06869\r\n 4.052137\r\n 3.156316\r\n 2.95063\r\n 0.068935\r\n 2.85402\r\n 0.999743\r\n 4.048082\r\n 0.230923\r\n 0.816693\r\n 0.130713\r\n -0.537706\r\n -0.339109\r\n 2.124538\r\n 2.708292\r\n 4.01739\r\n 4.004021\r\n 1.022555\r\n 3.657442\r\n 4.073619\r\n 0.011994\r\n 3.640429\r\n 1.808497\r\n 1.431404\r\n 3.935544\r\n 1.162152\r\n -0.22733\r\n -0.068728\r\n 0.825051\r\n 2.008645\r\n 0.664566\r\n 4.180202\r\n 0.864845\r\n 1.851174\r\n 2.761993\r\n 4.075914\r\n 0.110229\r\n 2.181987\r\n 3.152528\r\n 3.046564\r\n 0.128954\r\n 1.062726\r\n 3.651742\r\n 4.40195\r\n 3.022888\r\n 2.874917\r\n 2.946801\r\n 2.893644\r\n 0.072131\r\n 1.748275\r\n 1.912047\r\n 3.710686\r\n 1.719148\r\n 2.17409\r\n 3.656357\r\n 3.522504\r\n 2.234126\r\n 1.859772\r\n 2.097017\r\n 0.001794\r\n 1.231928\r\n 2.953862\r\n -0.116803\r\n 2.638864\r\n 3.943428\r\n -0.328513\r\n -0.099866\r\n -0.030836\r\n 2.359786\r\n 3.212581\r\n 0.188975\r\n 1.904109\r\n 3.007114\r\n 3.845834\r\n 3.079411\r\n 1.939739\r\n 2.880078\r\n 3.063577\r\n 4.116296\r\n -0.240963\r\n 4.066299\r\n 4.011834\r\n 0.07771\r\n 3.103069\r\n 2.811897\r\n -0.10463\r\n 0.025216\r\n 4.330063\r\n 3.087091\r\n 2.269988\r\n 4.010701\r\n 3.119542\r\n 3.723411\r\n 2.792078\r\n 2.192787\r\n 2.081305\r\n 1.714463\r\n 0.885854\r\n 1.028187\r\n 1.951497\r\n 1.709427\r\n 0.144068\r\n 3.88024\r\n 0.921876\r\n 1.979316\r\n 3.085768\r\n 3.476122\r\n 3.993679\r\n 3.07788\r\n -0.105365\r\n -0.164703\r\n 1.096814\r\n 3.092879\r\n 2.987926\r\n 2.061264\r\n 2.746854\r\n 0.71671\r\n 0.103831\r\n 0.023776\r\n -0.033299\r\n 1.942286\r\n -0.006338\r\n 3.808753\r\n 0.652799\r\n 4.053747\r\n 4.56929\r\n -0.032773\r\n 2.066236\r\n 0.222785\r\n 1.089268\r\n 1.487788\r\n 2.852033\r\n 0.024486\r\n 3.73775\r\n 0.045017\r\n 0.001238\r\n 3.892763\r\n 2.819376\r\n 2.830665\r\n 0.234633\r\n 1.810782\r\n 4.237235\r\n 3.034768\r\n 1.742106\r\n 1.16925\r\n 0.831165\r\n 3.729376\r\n 1.823205\r\n 4.02197\r\n 1.262939\r\n 4.159518\r\n 2.039114\r\n 4.101837\r\n 2.778672\r\n 1.228284\r\n 1.73662\r\n -0.195046\r\n -0.063215\r\n 3.305268\r\n 2.063627\r\n 0.89884\r\n 2.701692\r\n 1.992909\r\n 3.811393\r\n 4.353857\r\n 2.635641\r\n 2.856311\r\n 1.352682\r\n 2.336459\r\n 2.111651\r\n 0.121726\r\n 3.264605\r\n 2.103446\r\n 0.896855\r\n 4.22085\r\n -0.217283\r\n -0.300577\r\n 0.006014\r\n \r\n \r\n 0\r\n 364.5635685044051\r\n \r\n \r\n \r\n"; [TestMethod] public void RegressionDecisionTreeModel_Predict_Single() @@ -116,7 +116,8 @@ public void RegressionDecisionTreeModel_Save() var writer = new StringWriter(); sut.Save(() => writer); - Assert.AreEqual(m_regressionDecisionTreeModelString, writer.ToString()); + var actual = writer.ToString(); + Assert.AreEqual(m_regressionDecisionTreeModelString, actual); } [TestMethod] diff --git a/src/SharpLearning.DecisionTrees.Test/SharpLearning.DecisionTrees.Test.csproj b/src/SharpLearning.DecisionTrees.Test/SharpLearning.DecisionTrees.Test.csproj index 6821c263..39f0f469 100644 --- a/src/SharpLearning.DecisionTrees.Test/SharpLearning.DecisionTrees.Test.csproj +++ b/src/SharpLearning.DecisionTrees.Test/SharpLearning.DecisionTrees.Test.csproj @@ -1,11 +1,11 @@ - + true - netcoreapp2.0 + net8 false @@ -19,9 +19,9 @@ - - - + + + diff --git a/src/SharpLearning.DecisionTrees/SharpLearning.DecisionTrees.csproj b/src/SharpLearning.DecisionTrees/SharpLearning.DecisionTrees.csproj index 72fd0965..0e259117 100644 --- a/src/SharpLearning.DecisionTrees/SharpLearning.DecisionTrees.csproj +++ b/src/SharpLearning.DecisionTrees/SharpLearning.DecisionTrees.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 false SharpLearning.DecisionTrees Provides learning algorithms and models for DecisionTree regression and classification. diff --git a/src/SharpLearning.Ensemble.Test/SharpLearning.Ensemble.Test.csproj b/src/SharpLearning.Ensemble.Test/SharpLearning.Ensemble.Test.csproj index 3bd29c42..81e5f05b 100644 --- a/src/SharpLearning.Ensemble.Test/SharpLearning.Ensemble.Test.csproj +++ b/src/SharpLearning.Ensemble.Test/SharpLearning.Ensemble.Test.csproj @@ -1,11 +1,11 @@ - + true - netcoreapp2.0 + net8 false @@ -19,9 +19,9 @@ - - - + + + diff --git a/src/SharpLearning.Ensemble/SharpLearning.Ensemble.csproj b/src/SharpLearning.Ensemble/SharpLearning.Ensemble.csproj index 617ab5d2..7de1ade1 100644 --- a/src/SharpLearning.Ensemble/SharpLearning.Ensemble.csproj +++ b/src/SharpLearning.Ensemble/SharpLearning.Ensemble.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 false SharpLearning.Ensemble Provides ensemble learning for regression and classification. diff --git a/src/SharpLearning.FeatureTransformations.Test/SharpLearning.FeatureTransformations.Test.csproj b/src/SharpLearning.FeatureTransformations.Test/SharpLearning.FeatureTransformations.Test.csproj index 8356faaf..8488113d 100644 --- a/src/SharpLearning.FeatureTransformations.Test/SharpLearning.FeatureTransformations.Test.csproj +++ b/src/SharpLearning.FeatureTransformations.Test/SharpLearning.FeatureTransformations.Test.csproj @@ -1,11 +1,11 @@ - + true - netcoreapp2.0 + net8 false @@ -19,9 +19,9 @@ - - - + + + diff --git a/src/SharpLearning.FeatureTransformations/SharpLearning.FeatureTransformations.csproj b/src/SharpLearning.FeatureTransformations/SharpLearning.FeatureTransformations.csproj index e08724b9..4a1a9292 100644 --- a/src/SharpLearning.FeatureTransformations/SharpLearning.FeatureTransformations.csproj +++ b/src/SharpLearning.FeatureTransformations/SharpLearning.FeatureTransformations.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 false SharpLearning.FeatureTransformations Provides matrix and CsvRow transforms. diff --git a/src/SharpLearning.GradientBoost.Test/SharpLearning.GradientBoost.Test.csproj b/src/SharpLearning.GradientBoost.Test/SharpLearning.GradientBoost.Test.csproj index 5f6fcf91..0e959d97 100644 --- a/src/SharpLearning.GradientBoost.Test/SharpLearning.GradientBoost.Test.csproj +++ b/src/SharpLearning.GradientBoost.Test/SharpLearning.GradientBoost.Test.csproj @@ -1,11 +1,11 @@ - + true - netcoreapp2.0 + net8 false @@ -19,9 +19,9 @@ - - - + + + diff --git a/src/SharpLearning.GradientBoost/SharpLearning.GradientBoost.csproj b/src/SharpLearning.GradientBoost/SharpLearning.GradientBoost.csproj index 92c1d334..43804b5a 100644 --- a/src/SharpLearning.GradientBoost/SharpLearning.GradientBoost.csproj +++ b/src/SharpLearning.GradientBoost/SharpLearning.GradientBoost.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 false SharpLearning.GradientBoost Provides learning algorithms and models for GradientBoost regression and classification. diff --git a/src/SharpLearning.InputOutput.Test/SharpLearning.InputOutput.Test.csproj b/src/SharpLearning.InputOutput.Test/SharpLearning.InputOutput.Test.csproj index ab91ade3..d803c525 100644 --- a/src/SharpLearning.InputOutput.Test/SharpLearning.InputOutput.Test.csproj +++ b/src/SharpLearning.InputOutput.Test/SharpLearning.InputOutput.Test.csproj @@ -1,11 +1,17 @@ - + true + - netcoreapp2.0 + true + + + + net8 false @@ -19,9 +25,9 @@ - - - + + + diff --git a/src/SharpLearning.InputOutput/SharpLearning.InputOutput.csproj b/src/SharpLearning.InputOutput/SharpLearning.InputOutput.csproj index a9879cfc..fe6e1dbb 100644 --- a/src/SharpLearning.InputOutput/SharpLearning.InputOutput.csproj +++ b/src/SharpLearning.InputOutput/SharpLearning.InputOutput.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 false SharpLearning.InputOutput Provides CsvParser and serialization for SharpLearning. diff --git a/src/SharpLearning.Metrics.Test/SharpLearning.Metrics.Test.csproj b/src/SharpLearning.Metrics.Test/SharpLearning.Metrics.Test.csproj index 529c1737..348eee26 100644 --- a/src/SharpLearning.Metrics.Test/SharpLearning.Metrics.Test.csproj +++ b/src/SharpLearning.Metrics.Test/SharpLearning.Metrics.Test.csproj @@ -1,11 +1,11 @@ - + true - netcoreapp2.0 + net8 false @@ -19,9 +19,9 @@ - - - + + + diff --git a/src/SharpLearning.Metrics/SharpLearning.Metrics.csproj b/src/SharpLearning.Metrics/SharpLearning.Metrics.csproj index 951c93f6..eb5e025a 100644 --- a/src/SharpLearning.Metrics/SharpLearning.Metrics.csproj +++ b/src/SharpLearning.Metrics/SharpLearning.Metrics.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 false SharpLearning.Metrics Provides classification, regression, impurity and ranking metrics. diff --git a/src/SharpLearning.Neural.Test/SharpLearning.Neural.Test.csproj b/src/SharpLearning.Neural.Test/SharpLearning.Neural.Test.csproj index 36d83350..467ff291 100644 --- a/src/SharpLearning.Neural.Test/SharpLearning.Neural.Test.csproj +++ b/src/SharpLearning.Neural.Test/SharpLearning.Neural.Test.csproj @@ -1,11 +1,11 @@ - + true - netcoreapp2.0 + net8 false @@ -21,9 +21,9 @@ - - - + + + diff --git a/src/SharpLearning.Neural/SharpLearning.Neural.csproj b/src/SharpLearning.Neural/SharpLearning.Neural.csproj index fea0d1b0..185f068a 100644 --- a/src/SharpLearning.Neural/SharpLearning.Neural.csproj +++ b/src/SharpLearning.Neural/SharpLearning.Neural.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 false SharpLearning.Neural Provides learning algorithms and models for neural net regression and classification. diff --git a/src/SharpLearning.Optimization.Test/SharpLearning.Optimization.Test.csproj b/src/SharpLearning.Optimization.Test/SharpLearning.Optimization.Test.csproj index 7afeaade..7a65cdb4 100644 --- a/src/SharpLearning.Optimization.Test/SharpLearning.Optimization.Test.csproj +++ b/src/SharpLearning.Optimization.Test/SharpLearning.Optimization.Test.csproj @@ -1,11 +1,11 @@ - + true - netcoreapp2.0 + net8 false @@ -19,9 +19,9 @@ - - - + + + diff --git a/src/SharpLearning.Optimization/SharpLearning.Optimization.csproj b/src/SharpLearning.Optimization/SharpLearning.Optimization.csproj index fdaa9b0b..942af76c 100644 --- a/src/SharpLearning.Optimization/SharpLearning.Optimization.csproj +++ b/src/SharpLearning.Optimization/SharpLearning.Optimization.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 false SharpLearning.Optimization Provides optimization algorithms. diff --git a/src/SharpLearning.RandomForest.Test/Models/ClassificationForestModelTest.cs b/src/SharpLearning.RandomForest.Test/Models/ClassificationForestModelTest.cs index cc506208..76764950 100644 --- a/src/SharpLearning.RandomForest.Test/Models/ClassificationForestModelTest.cs +++ b/src/SharpLearning.RandomForest.Test/Models/ClassificationForestModelTest.cs @@ -15,7 +15,7 @@ public class ClassificationForestModelTest { readonly double m_delta = 0.0000001; readonly string m_classificationForestModelString = - "\r\n\r\n <_x003C_Trees_x003E_k__BackingField xmlns:d2p1=\"http://schemas.datacontract.org/2004/07/SharpLearning.DecisionTrees.Models\" z:Id=\"2\" z:Size=\"2\">\r\n \r\n \r\n \r\n \r\n 0\r\n -1\r\n 1\r\n 0\r\n 4\r\n 3.5\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 13.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 0\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 3\r\n -1\r\n 0\r\n \r\n \r\n 1\r\n -1\r\n 5\r\n 4\r\n 6\r\n 17\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 5\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 3\r\n -1\r\n 6\r\n -1\r\n 0\r\n \r\n \r\n \r\n \r\n 0.9\r\n 0.1\r\n \r\n \r\n 0.55555555555555558\r\n 0.44444444444444442\r\n \r\n \r\n 0.42857142857142855\r\n 0.5714285714285714\r\n \r\n \r\n 0.5\r\n 0.5\r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0.058257127487896736\r\n 0.054845154845154849\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 6\r\n 20\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 9.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 0\r\n \r\n \r\n 0\r\n -1\r\n 4\r\n 3\r\n 5\r\n 2\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 4\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 5\r\n -1\r\n 0\r\n \r\n \r\n -1\r\n 3\r\n -1\r\n 6\r\n -1\r\n 1\r\n \r\n \r\n \r\n \r\n 0.81818181818181823\r\n 0.18181818181818182\r\n \r\n \r\n 0.42857142857142855\r\n 0.5714285714285714\r\n \r\n \r\n 0.66666666666666663\r\n 0.33333333333333331\r\n \r\n \r\n 0.14285714285714285\r\n 0.8571428571428571\r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0.022161172161172173\r\n 0.19543063773833011\r\n \r\n \r\n \r\n \r\n \r\n \r\n 0.080418299649068908\r\n 0.250275792583485\r\n \r\n"; + "\r\n\r\n <_x003C_Trees_x003E_k__BackingField xmlns:d2p1=\"http://schemas.datacontract.org/2004/07/SharpLearning.DecisionTrees.Models\" z:Id=\"2\" z:Size=\"2\">\r\n \r\n \r\n \r\n \r\n 0\r\n -1\r\n 1\r\n 0\r\n 4\r\n 3.5\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 13.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 0\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 3\r\n -1\r\n 0\r\n \r\n \r\n 1\r\n -1\r\n 5\r\n 4\r\n 6\r\n 17\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 5\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 3\r\n -1\r\n 6\r\n -1\r\n 0\r\n \r\n \r\n \r\n \r\n 0.9\r\n 0.1\r\n \r\n \r\n 0.5555555555555556\r\n 0.4444444444444444\r\n \r\n \r\n 0.42857142857142855\r\n 0.5714285714285714\r\n \r\n \r\n 0.5\r\n 0.5\r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0.058257127487896736\r\n 0.05484515484515485\r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n \r\n 1\r\n -1\r\n 1\r\n 0\r\n 6\r\n 20\r\n \r\n \r\n 1\r\n -1\r\n 2\r\n 1\r\n 3\r\n 9.5\r\n \r\n \r\n -1\r\n 0\r\n -1\r\n 2\r\n -1\r\n 0\r\n \r\n \r\n 0\r\n -1\r\n 4\r\n 3\r\n 5\r\n 2\r\n \r\n \r\n -1\r\n 1\r\n -1\r\n 4\r\n -1\r\n 1\r\n \r\n \r\n -1\r\n 2\r\n -1\r\n 5\r\n -1\r\n 0\r\n \r\n \r\n -1\r\n 3\r\n -1\r\n 6\r\n -1\r\n 1\r\n \r\n \r\n \r\n \r\n 0.8181818181818182\r\n 0.18181818181818182\r\n \r\n \r\n 0.42857142857142855\r\n 0.5714285714285714\r\n \r\n \r\n 0.6666666666666666\r\n 0.3333333333333333\r\n \r\n \r\n 0.14285714285714285\r\n 0.8571428571428571\r\n \r\n \r\n \r\n 0\r\n 1\r\n \r\n \r\n 0.022161172161172173\r\n 0.1954306377383301\r\n \r\n \r\n \r\n \r\n \r\n \r\n 0.08041829964906891\r\n 0.250275792583485\r\n \r\n"; [TestMethod] public void ClassificationForestModel_Predict_Single() diff --git a/src/SharpLearning.RandomForest.Test/SharpLearning.RandomForest.Test.csproj b/src/SharpLearning.RandomForest.Test/SharpLearning.RandomForest.Test.csproj index 9ee1d743..5b5d6fde 100644 --- a/src/SharpLearning.RandomForest.Test/SharpLearning.RandomForest.Test.csproj +++ b/src/SharpLearning.RandomForest.Test/SharpLearning.RandomForest.Test.csproj @@ -1,11 +1,11 @@ - + true - netcoreapp2.0 + net8 false @@ -19,9 +19,9 @@ - - - + + + diff --git a/src/SharpLearning.RandomForest/SharpLearning.RandomForest.csproj b/src/SharpLearning.RandomForest/SharpLearning.RandomForest.csproj index a7e91f57..589f7a56 100644 --- a/src/SharpLearning.RandomForest/SharpLearning.RandomForest.csproj +++ b/src/SharpLearning.RandomForest/SharpLearning.RandomForest.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 false SharpLearning.RandomForest Provides learning algorithms and models for RandomForest and ExtraTrees regression and classification. diff --git a/src/SharpLearning.XGBoost.Test/SharpLearning.XGBoost.Test.csproj b/src/SharpLearning.XGBoost.Test/SharpLearning.XGBoost.Test.csproj index 80a0e1b2..c724e9d5 100644 --- a/src/SharpLearning.XGBoost.Test/SharpLearning.XGBoost.Test.csproj +++ b/src/SharpLearning.XGBoost.Test/SharpLearning.XGBoost.Test.csproj @@ -1,11 +1,11 @@ - + true - netcoreapp2.0 + net8 false @@ -19,9 +19,9 @@ - - - + + + diff --git a/src/SharpLearning.XGBoost/SharpLearning.XGBoost.csproj b/src/SharpLearning.XGBoost/SharpLearning.XGBoost.csproj index d66ecd47..9b37fbb7 100644 --- a/src/SharpLearning.XGBoost/SharpLearning.XGBoost.csproj +++ b/src/SharpLearning.XGBoost/SharpLearning.XGBoost.csproj @@ -5,7 +5,7 @@ - netstandard2.0;net461 + netstandard2.0 true SharpLearning.XGBoost Provides learning algorithms and models for XGBoost regression and classification.