Skip to content
This repository was archived by the owner on Jan 12, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
61 commits
Select commit Hold shift + click to select a range
7f62673
Merged PR 2339: Initial development on QML library.
Nov 15, 2019
cfb2ba4
Merge branch 'master' into feature/qml
Nov 15, 2019
6d23ce3
Unit tests for new operations and functions in M.Q.Standard used to s…
Nov 20, 2019
20529cf
Merge branch 'master' into feature/qml
Nov 20, 2019
3e0517d
Merge branch 'master' into feature/qml
Nov 22, 2019
3201cde
Merge branch 'master' into feature/qml
cgranade Nov 22, 2019
929478b
Add repeated operation (#153) (#180)
Nov 22, 2019
7e4440a
Merge branch 'feature/qml' of github.com:Microsoft/QuantumLibraries i…
cgranade Nov 22, 2019
22a3dd5
Fix merge conflict.
cgranade Nov 22, 2019
1423aca
Simplify classification API. (#179)
Nov 26, 2019
cae0050
Bounded univariate minimization (#183)
Dec 4, 2019
0e3b5f9
Add placeholder for QML unit tests. (#185)
Dec 7, 2019
c10eea4
Consolidate exact and approximate multiplexing logic. (#184)
Dec 9, 2019
f7be904
Update QML feature branch with latest master. (#191)
Dec 17, 2019
38120f2
Use new UDTs to consolidate and simplify training / validation API. (…
Jan 2, 2020
67cd369
Update QML feature to master. (#198)
Jan 8, 2020
3e1e461
Simplify gradient estimation and classifier structure generation (#200)
Jan 13, 2020
a35aa5f
Final prep for QML review (#205)
Jan 16, 2020
0ba2327
Merge branch 'master' into cgranade/master→qml
cgranade Jan 18, 2020
680c52e
Merge pull request #208 from microsoft/cgranade/master→qml
Jan 18, 2020
d8c4371
Fix path to pubkey for QML signing.
cgranade Jan 23, 2020
99ddbae
Merge pull request #213 from microsoft/cgranade/fix-qml-key
Jan 24, 2020
27cae56
Update QML signing for new pipeline. (#217)
Jan 28, 2020
f1e9ade
Merge branch 'master' into final-qml-api
cgranade Jan 31, 2020
a8a2a95
Update project files to newest QDK release.
cgranade Jan 31, 2020
bf09e3e
One more project file update.
cgranade Jan 31, 2020
caee3d6
Added model structure to SequentialModel.
cgranade Jan 31, 2020
b0da363
Combined GateSpan and ControlledRotation.
cgranade Jan 31, 2020
5590c97
Types.qs ☑
cgranade Jan 31, 2020
c3889e3
Classification.qs ☑
cgranade Jan 31, 2020
a158b39
GradientEstimation.qs ☑
cgranade Jan 31, 2020
a1771fb
InputEncoding.qs ☑
cgranade Jan 31, 2020
8a3188a
Structure.qs ☑
cgranade Jan 31, 2020
d9fccf2
Training.qs ☑
cgranade Jan 31, 2020
4bebaec
Validation.qs ☑
cgranade Jan 31, 2020
fa31ab5
Merge branch 'feature/qml' into final-qml-api
Feb 1, 2020
c66bd7d
Fix build properties to use latest QDK version.
cgranade Feb 3, 2020
e61441a
Update MachineLearning/src/Types.qs
cgranade Feb 3, 2020
89511e0
Addressing feedback from @bettinaheim.
cgranade Feb 3, 2020
063948a
Merge branch 'final-qml-api' of https://github.com/cgranade/QuantumLi…
cgranade Feb 3, 2020
482e25f
Merge pull request #220 from cgranade/final-qml-api
Feb 3, 2020
7997c9a
Began adding more tests.
cgranade Feb 5, 2020
2076e8c
New test for applysequentialclassifier.
cgranade Feb 5, 2020
cfb10d3
Reduce warning count.
cgranade Feb 5, 2020
1c85c75
More tests of structure functions.
cgranade Feb 5, 2020
fd0b40a
Fixed test and eliminated some warnings.
cgranade Feb 5, 2020
748d129
Further warning elimination.
cgranade Feb 5, 2020
a387017
Tests for InferredLabel and InferredLabels.
cgranade Feb 5, 2020
1039a0d
Undo printf-style debugging.
cgranade Feb 5, 2020
d9ff816
Update MachineLearning/tests/ClassificationTests.qs
cgranade Feb 11, 2020
daec81b
Improve QML test coverage. (#224)
Feb 11, 2020
d2de0e0
Merge branch 'master' into master→qml
cgranade Feb 11, 2020
73a3686
Merge pull request #227 from cgranade/master→qml
Feb 12, 2020
3982206
Merge branch 'master' into feature/qml
bettinaheim Feb 20, 2020
86712bd
Addressing feedback from @bettinaheim. (#233)
Feb 21, 2020
22e61d7
Added new verbosemessage training option.
cgranade Feb 22, 2020
61d5e4f
Cache state preparation using BoundCA.
cgranade Feb 22, 2020
1feae2d
Merge branch 'feature/qml' into cgranade/use-udt-perf
Feb 22, 2020
01dc4e1
Addressing @bettinaheim's feedback.
cgranade Feb 23, 2020
bdc04ba
Fix type of Ignore.
cgranade Feb 23, 2020
df27b30
Add verbose option to TrainingOptions UDT, cache state preparation (#…
Feb 23, 2020
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
5 changes: 4 additions & 1 deletion Build/build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ Build-One 'publish' '../Chemistry.sln'
Write-Host "##[info]Build Numerics library"
Build-One 'publish' '../Numerics.sln'

Write-Host "##[info]Build Standard library"
Write-Host "##[info]Build QML library"
Build-One 'publish' '../MachineLearning.sln'

Write-Host "##[info]Build Jupyter magic library"
Build-One 'publish' '../Magic.sln'

if (-not $all_ok) {
Expand Down
2 changes: 1 addition & 1 deletion Build/check_indents.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def check_file(filename : str) -> bool:
found_spaces = False
found_tabs = False

with open(filename, 'r') as f:
with open(filename, 'r', encoding='utf-8') as f:
contents = list(f.readlines())

for line in contents:
Expand Down
5 changes: 4 additions & 1 deletion Build/pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ function Pack-One() {
-c $Env:BUILD_CONFIGURATION `
-v $Env:BUILD_VERBOSITY `
-o $Env:NUGET_OUTDIR `
/property:PackageVersion=$Env:NUGET_VERSION
/property:PackageVersion=$Env:NUGET_VERSION

if ($LastExitCode -ne 0) {
Write-Host "##vso[task.logissue type=error;]Failed to pack $project."
Expand All @@ -28,6 +28,9 @@ Pack-One '../Standard/src/Standard.csproj'
Write-Host "##[info]Pack Chemistry library"
Pack-One '../Chemistry/src/DataModel/DataModel.csproj'

Write-Host "##[info]Pack QML library"
Pack-One '../MachineLearning/src/MachineLearning.csproj'

Write-Host "##[info]Pack Numerics library"
Pack-One '../Numerics/src/Numerics.csproj'

Expand Down
4 changes: 2 additions & 2 deletions Chemistry/src/DataModel/DataModel.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
Expand All @@ -14,7 +14,7 @@
<Copyright>© Microsoft Corporation. All rights reserved.</Copyright>
<PackageId>Microsoft.Quantum.Chemistry</PackageId>
<PackageReleaseNotes>See: https://docs.microsoft.com/en-us/quantum/relnotes/</PackageReleaseNotes>
<PackageLicenseUrl>https://github.com/Microsoft/QuantumLibraries/raw/master/LICENSE.txt</PackageLicenseUrl>
<PackageLicenseExpression>MIT</PackageLicenseExpression>
<PackageProjectUrl>https://github.com/Microsoft/QuantumLibraries/tree/master/Chemistry</PackageProjectUrl>
<PackageIconUrl>https://secure.gravatar.com/avatar/bd1f02955b2853ba0a3b1cdc2434e8ec.png</PackageIconUrl>
<PackageTags>Quantum Q# Qsharp</PackageTags>
Expand Down
2 changes: 1 addition & 1 deletion Chemistry/src/Jupyter/Jupyter.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<PlatformTarget>x64</PlatformTarget>
Expand Down
4 changes: 2 additions & 2 deletions Chemistry/src/Runtime/Runtime.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.Quantum.Sdk/0.10.2001.2831">
<Project Sdk="Microsoft.Quantum.Sdk/0.10.2002.2103-beta">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
Expand All @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Quantum.Simulators" Version="0.10.2001.2831" />
<PackageReference Include="Microsoft.Quantum.Simulators" Version="0.10.2002.2103-beta" />
</ItemGroup>

</Project>
Expand Down
2 changes: 1 addition & 1 deletion Chemistry/tests/ChemistryTests/QSharpTests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.Quantum.Sdk/0.10.2001.2831">
<Project Sdk="Microsoft.Quantum.Sdk/0.10.2002.2103-beta">

<Import Project="..\..\..\Build\props\tests.props" />

Expand Down
6 changes: 3 additions & 3 deletions Chemistry/tests/DataModelTests/CSharpTests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
Expand All @@ -20,7 +20,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -41,7 +41,7 @@
<ItemGroup>
<Compile Include="..\..\Common\DelaySign.cs" Link="Properties\DelaySign.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Runtime\Runtime.csproj" />
<ProjectReference Include="..\..\src\DataModel\DataModel.csproj" />
Expand Down
6 changes: 3 additions & 3 deletions Chemistry/tests/SamplesTests/SamplesTests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.0</TargetFramework>
Expand All @@ -14,7 +14,7 @@

<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.4.0" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="xunit" Version="2.4.1" />
<PackageReference Include="xunit.runner.visualstudio" Version="2.4.1">
<PrivateAssets>all</PrivateAssets>
Expand All @@ -35,7 +35,7 @@
<ItemGroup>
<Compile Include="..\..\Common\DelaySign.cs" Link="Properties\DelaySign.cs" />
</ItemGroup>

<ItemGroup>
<None Include="..\BroombridgeExamples\LiH_0.2.yaml" Link="Molecules\LiH_0.2.yaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand Down
6 changes: 3 additions & 3 deletions Chemistry/tests/SystemTests/SystemTests.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.Quantum.Sdk/0.10.2001.2831">
<Project Sdk="Microsoft.Quantum.Sdk/0.10.2002.2103-beta">

<Import Project="..\..\..\Build\props\tests.props" />

Expand All @@ -12,7 +12,7 @@
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</Content>
</ItemGroup>

<ItemGroup>
<None Include="..\BroombridgeExamples\hydrogen_0.1.yaml" Link="Molecules\MolecularHydrogen\hydrogen_0.1.yaml">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
Expand All @@ -31,7 +31,7 @@
<ItemGroup>
<Compile Include="..\..\Common\DelaySign.cs" Link="Properties\DelaySign.cs" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\..\Standard\src\Standard.csproj" />
<ProjectReference Include="..\..\src\Runtime\Runtime.csproj" />
Expand Down
54 changes: 54 additions & 0 deletions MachineLearning.sln
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 15
VisualStudioVersion = 15.0.26124.0
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should just be overwritten if it's opened with VS19 I believe. It might still be worth it quickly doing that, since we no longer support VS17.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sounds good. I generated this with dotnet new sln, didn't realize that it used an older version of the sln format.

MinimumVisualStudioVersion = 15.0.26124.0
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "MachineLearning", "MachineLearning", "{D067C787-94C3-4DB8-9012-1F22AE784BEF}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MachineLearningTests", "MachineLearning\tests\MachineLearningTests.csproj", "{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MachineLearning", "MachineLearning\src\MachineLearning.csproj", "{B045BF35-6BE6-4982-9618-8725C70D3F91}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Release|Any CPU = Release|Any CPU
Release|x64 = Release|x64
Release|x86 = Release|x86
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Debug|Any CPU.Build.0 = Debug|Any CPU
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Debug|x64.ActiveCfg = Debug|Any CPU
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Debug|x64.Build.0 = Debug|Any CPU
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Debug|x86.ActiveCfg = Debug|Any CPU
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Debug|x86.Build.0 = Debug|Any CPU
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Release|Any CPU.ActiveCfg = Release|Any CPU
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Release|Any CPU.Build.0 = Release|Any CPU
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Release|x64.ActiveCfg = Release|Any CPU
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Release|x64.Build.0 = Release|Any CPU
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Release|x86.ActiveCfg = Release|Any CPU
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C}.Release|x86.Build.0 = Release|Any CPU
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Debug|Any CPU.Build.0 = Debug|Any CPU
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Debug|x64.ActiveCfg = Debug|Any CPU
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Debug|x64.Build.0 = Debug|Any CPU
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Debug|x86.ActiveCfg = Debug|Any CPU
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Debug|x86.Build.0 = Debug|Any CPU
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Release|Any CPU.ActiveCfg = Release|Any CPU
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Release|Any CPU.Build.0 = Release|Any CPU
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Release|x64.ActiveCfg = Release|Any CPU
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Release|x64.Build.0 = Release|Any CPU
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Release|x86.ActiveCfg = Release|Any CPU
{B045BF35-6BE6-4982-9618-8725C70D3F91}.Release|x86.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{94EBDF5F-0A9D-4CE5-9D16-3FF323B8792C} = {D067C787-94C3-4DB8-9012-1F22AE784BEF}
{B045BF35-6BE6-4982-9618-8725C70D3F91} = {D067C787-94C3-4DB8-9012-1F22AE784BEF}
EndGlobalSection
EndGlobal
24 changes: 24 additions & 0 deletions MachineLearning/Common/DelaySign.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
using System.Reflection;

// Attributes for delay-signing
#if SIGNED
[assembly:AssemblyKeyFile("..\\..\\Build\\267DevDivSNKey2048.snk")]
[assembly:AssemblyDelaySign(true)]
#endif

internal static class SigningConstants
{
#if SIGNED
public const string PUBLIC_KEY = ", PublicKey=" +
"002400000c800000140100000602000000240000525341310008000001000100613399aff18ef1" +
"a2c2514a273a42d9042b72321f1757102df9ebada69923e2738406c21e5b801552ab8d200a65a2" +
"35e001ac9adc25f2d811eb09496a4c6a59d4619589c69f5baf0c4179a47311d92555cd006acc8b" +
"5959f2bd6e10e360c34537a1d266da8085856583c85d81da7f3ec01ed9564c58d93d713cd0172c" +
"8e23a10f0239b80c96b07736f5d8b022542a4e74251a5f432824318b3539a5a087f8e53d2f135f" +
"9ca47f3bb2e10aff0af0849504fb7cea3ff192dc8de0edad64c68efde34c56d302ad55fd6e80f3" +
"02d5efcdeae953658d3452561b5f36c542efdbdd9f888538d374cef106acf7d93a4445c3c73cd9" +
"11f0571aaf3d54da12b11ddec375b3";
#else
public const string PUBLIC_KEY = "";
#endif
}
128 changes: 128 additions & 0 deletions MachineLearning/src/Classification.qs
Original file line number Diff line number Diff line change
@@ -0,0 +1,128 @@
namespace Microsoft.Quantum.MachineLearning {
open Microsoft.Quantum.Math;
open Microsoft.Quantum.Characterization;
open Microsoft.Quantum.Arithmetic;
open Microsoft.Quantum.Arrays;
open Microsoft.Quantum.Intrinsic;
open Microsoft.Quantum.Canon;
open Microsoft.Quantum.Convert;


operation _PrepareClassification(
encoder : (LittleEndian => Unit is Adj + Ctl),
model : SequentialModel,
target : Qubit[]
)
: Unit is Adj {
encoder(LittleEndian(target));
ApplySequentialClassifier(model, target);
}

/// # Summary
/// Given a sample and a sequential classifier, estimates the
/// classification probability for that sample by repeatedly measuring
/// the output of the classifier on the given sample.
///
/// # Input
/// ## tolerance
/// The tolerance to allow in encoding the sample into a state preparation
/// operation.
/// ## model
/// The sequential model to be used to estimate the classification
/// probability for the given sample.
/// ## sample
/// The feature vector for the sample to be classified.
/// ## nMeasurements
/// The number of measusrements to use in estimating the classification
/// probability.
/// # Output
/// An estimate of the classification probability for the given sample.
operation EstimateClassificationProbability(
tolerance : Double,
model : SequentialModel,
sample : Double[],
nMeasurements: Int
)
: Double {
let encodedSample = ApproximateInputEncoder(tolerance / IntAsDouble(Length(model::Structure)), sample);
return 1.0 - EstimateFrequencyA(
_PrepareClassification(encodedSample::Prepare, model, _),
_TailMeasurement(encodedSample::NQubits),
encodedSample::NQubits,
nMeasurements
);
}

/// # Summary
/// Given a set of samples and a sequential classifier, estimates the
/// classification probability for those samples by repeatedly measuring
/// the output of the classifier on each sample.
///
/// # Input
/// ## tolerance
/// The tolerance to allow in encoding the sample into a state preparation
/// operation.
/// ## model
/// The sequential model to be used to estimate the classification
/// probabilities for the given samples.
/// ## samples
/// An array of feature vectors for each sample to be classified.
/// ## nMeasurements
/// The number of measusrements to use in estimating the classification
/// probability.
/// # Output
/// An array of estimates of the classification probability for each given
/// sample.
operation EstimateClassificationProbabilities(
tolerance : Double,
model : SequentialModel,
samples : Double[][],
nMeasurements : Int
)
: Double[] {
let effectiveTolerance = tolerance / IntAsDouble(Length(model::Structure));
return ForEach(
EstimateClassificationProbability(
effectiveTolerance, model, _, nMeasurements
),
samples
);
}

/// # Summary
/// Given a of classification probability and a bias, returns the
/// label inferred from that probability.
///
/// # Input
/// ## bias
/// The bias between two classes, typically the result of training a
/// classifier.
/// ## probability
/// A classification probabilities for a particular sample, typicaly
/// resulting from estimating its classification frequency.
///
/// # Output
/// The label inferred from the given classification probability.
function InferredLabel(bias : Double, probability : Double) : Int {
return probability + bias > 0.5 ? 1 | 0;
}

/// # Summary
/// Given an array of classification probabilities and a bias, returns the
/// label inferred from each probability.
///
/// # Input
/// ## bias
/// The bias between two classes, typically the result of training a
/// classifier.
/// ## probabilities
/// An array of classification probabilities for a set of samples, typicaly
/// resulting from estimating classification frequencies.
///
/// # Output
/// The label inferred from each classification probability.
function InferredLabels(bias : Double, probabilities : Double[]): Int[] {
return Mapped(InferredLabel(bias, _), probabilities);
}

}
Loading