Skip to content

Towards #2522 - LinearSvmTrainer documentation #3401

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

Merged
merged 2 commits into from
Apr 20, 2019

Conversation

yaeldekel
Copy link

Adding documentation for LinearSVM, as specified in #2252.

/// | Required NuGet in addition to Microsoft.ML | None |
///
/// ### Training Algorithm Details
/// Linear SVM is an algorithm that trains a model which is a separating hyperplane (a linear binary classification model).
Copy link
Member

@wschin wschin Apr 18, 2019

Choose a reason for hiding this comment

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

Suggested change
/// Linear SVM is an algorithm that trains a model which is a separating hyperplane (a linear binary classification model).
/// Linear [SVM](https://en.wikipedia.org/wiki/Support-vector_machine#Linear_SVM) trainer implements an algorithm that trains a hyperplane in the feature space for binary classification by solving [SVM problem](https://en.wikipedia.org/wiki/Support-vector_machine#Computing_the_SVM_classifier).
``` #Resolved

@@ -26,8 +26,37 @@
namespace Microsoft.ML.Trainers
{
/// <summary>
/// The <see cref="IEstimator{TTransformer}"/> to predict a target using a linear binary classification model
/// trained with Linear SVM.
/// Linear SVM that implements PEGASOS for training. See: http://ttic.uchicago.edu/~shai/papers/ShalevSiSr07.pdf
Copy link
Author

@yaeldekel yaeldekel Apr 18, 2019

Choose a reason for hiding this comment

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

Linear SVM that implements PEGASOS for training. See: http://ttic.uchicago.edu/~shai/papers/ShalevSiSr07.pdf [](start = 8, length = 108)

Oops. I should remove this line from here. #Resolved

@yaeldekel yaeldekel changed the title Towards #2252 - LinearSvmTrainer documentation Towards #2522 - LinearSvmTrainer documentation Apr 18, 2019
@@ -829,21 +819,11 @@ private static ICalibratorTrainer GetCalibratorTrainerOrThrow(IExceptionContext
}

/// <summary>
/// Predict a target using a linear binary classification model trained with the <see cref="LinearSvmTrainer"/> trainer.
/// Create a <see cref="LinearSvmTrainer"/>, which predicts a target using a linear binary classification model
Copy link

@shmoradims shmoradims Apr 18, 2019

Choose a reason for hiding this comment

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

Create a [](start = 12, length = 39)

the second overload should say:
Create a with advanced options, #Resolved

@codecov
Copy link

codecov bot commented Apr 18, 2019

Codecov Report

Merging #3401 into master will increase coverage by <.01%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3401      +/-   ##
==========================================
+ Coverage   72.69%   72.69%   +<.01%     
==========================================
  Files         807      807              
  Lines      145171   145171              
  Branches    16225    16225              
==========================================
+ Hits       105536   105537       +1     
  Misses      35220    35220              
+ Partials     4415     4414       -1
Flag Coverage Δ
#Debug 72.69% <ø> (ø) ⬆️
#production 68.23% <ø> (ø) ⬆️
#test 88.97% <ø> (ø) ⬆️
Impacted Files Coverage Δ
...dardTrainers/Standard/Online/AveragedPerceptron.cs 89.7% <ø> (ø) ⬆️
...t.ML.StandardTrainers/Standard/Online/LinearSvm.cs 81.1% <ø> (ø) ⬆️
...oft.ML.StandardTrainers/StandardTrainersCatalog.cs 92.34% <ø> (ø) ⬆️
...ML.Transforms/Text/StopWordsRemovingTransformer.cs 86.26% <0%> (+0.15%) ⬆️

@codecov
Copy link

codecov bot commented Apr 18, 2019

Codecov Report

Merging #3401 into master will increase coverage by 0.03%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##           master    #3401      +/-   ##
==========================================
+ Coverage   72.69%   72.72%   +0.03%     
==========================================
  Files         807      805       -2     
  Lines      145171   145168       -3     
  Branches    16225    16230       +5     
==========================================
+ Hits       105536   105579      +43     
+ Misses      35220    35173      -47     
- Partials     4415     4416       +1
Flag Coverage Δ
#Debug 72.72% <ø> (+0.03%) ⬆️
#production 68.26% <ø> (+0.03%) ⬆️
#test 88.98% <ø> (ø) ⬆️
Impacted Files Coverage Δ
...t.ML.StandardTrainers/Standard/Online/LinearSvm.cs 81.1% <ø> (ø) ⬆️
...oft.ML.StandardTrainers/StandardTrainersCatalog.cs 92.34% <ø> (ø) ⬆️
src/Microsoft.ML.Data/Transforms/KeyToValue.cs 79.16% <0%> (-0.65%) ⬇️
...ML.Transforms/MutualInformationFeatureSelection.cs 78.58% <0%> (-0.33%) ⬇️
...soft.ML.Tests/Transformers/CategoricalHashTests.cs 100% <0%> (ø) ⬆️
src/Microsoft.ML.Transforms/KernelCatalog.cs 33.33% <0%> (ø) ⬆️
...icrosoft.ML.Transforms/RandomFourierFeaturizing.cs 83.41% <0%> (ø) ⬆️
src/Microsoft.ML.Transforms/NormalizerCatalog.cs 84.78% <0%> (ø) ⬆️
...OnnxTransformer.StaticPipe/OnnxStaticExtensions.cs
...r.StaticPipe/DnnImageFeaturizerStaticExtensions.cs
... and 11 more

@@ -74,7 +74,7 @@ public sealed class AveragedPerceptronTrainer : AveragedLinearTrainer<BinaryPred

/// <summary>
/// Options for the <see cref="AveragedPerceptronTrainer"/> as used in
/// [AveragedPerceptron(Options)](xref:Microsoft.ML.StandardTrainersCatalog.AveragedPerceptron(Microsoft.ML.BinaryClassificationCatalog.BinaryClassificationTrainers,Microsoft.ML.Trainers.AveragedPerceptronTrainer.Options).
Copy link

@shmoradims shmoradims Apr 18, 2019

Choose a reason for hiding this comment

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

[AveragedPerceptro [](start = 11, length = 19)

please revert this change:

please Use xref instead of cref for method overloads: In addition to working in markdown, the second usage of xref is to create links with short anchortext. For methods with overloads (e.g. trainer extension methods with and without options), the cref text is verbose and human-unreadable. We use xref for those links everywhere, except in <seealso ..> where xref doesn't work. #Resolved

Copy link

@shmoradims shmoradims left a comment

Choose a reason for hiding this comment

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

:shipit:

@yaeldekel yaeldekel added the documentation Related to documentation of ML.NET label Apr 18, 2019
@yaeldekel yaeldekel merged commit 9efe749 into dotnet:master Apr 20, 2019
@yaeldekel yaeldekel deleted the linearsvmdoc branch April 20, 2019 00:20
@ghost ghost locked as resolved and limited conversation to collaborators Sep 20, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
documentation Related to documentation of ML.NET
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants