Skip to content

Commit 0025bb4

Browse files
authored
Add samples for linear SVM in XML documentation. (dotnet#3575)
* Add samples for linear SVM in XML documentation. * typo.
1 parent ffbd08c commit 0025bb4

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

src/Microsoft.ML.StandardTrainers/StandardTrainersCatalog.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -805,14 +805,20 @@ public static PairwiseCouplingTrainer PairwiseCoupling<TModel>(this MulticlassCl
805805
}
806806

807807
/// <summary>
808-
/// Create a <see cref="LinearSvmTrainer"/>, which predicts a target using a linear binary classification model trained
808+
/// Create <see cref="LinearSvmTrainer"/>, which predicts a target using a linear binary classification model trained
809809
/// over boolean label data.
810810
/// </summary>
811811
/// <param name="catalog">The binary classification catalog trainer object.</param>
812812
/// <param name="labelColumnName">The name of the label column. The column data must be <see cref="System.Boolean"/>.</param>
813813
/// <param name="featureColumnName">The name of the feature column. The column data must be a known-sized vector of <see cref="System.Single"/>.</param>
814814
/// <param name="exampleWeightColumnName">The name of the example weight column (optional).</param>
815-
/// <param name="numberOfIterations">The number of training iteraitons.</param>
815+
/// <param name="numberOfIterations">The number of training iteration.</param>
816+
/// <example>
817+
/// <format type="text/markdown">
818+
/// <![CDATA[
819+
/// [!code-csharp[LinearSvm](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/LinearSvm.cs)]
820+
/// ]]></format>
821+
/// </example>
816822
public static LinearSvmTrainer LinearSvm(this BinaryClassificationCatalog.BinaryClassificationTrainers catalog,
817823
string labelColumnName = DefaultColumnNames.Label,
818824
string featureColumnName = DefaultColumnNames.Features,
@@ -824,11 +830,17 @@ public static LinearSvmTrainer LinearSvm(this BinaryClassificationCatalog.Binary
824830
}
825831

826832
/// <summary>
827-
/// Create a <see cref="LinearSvmTrainer"/> with advanced options, which predicts a target using a linear binary classification model
833+
/// Create <see cref="LinearSvmTrainer"/> with advanced options, which predicts a target using a linear binary classification model
828834
/// trained over boolean label data.
829835
/// </summary>
830836
/// <param name="catalog">The binary classification catalog trainer object.</param>
831837
/// <param name="options">Trainer options.</param>
838+
/// <example>
839+
/// <format type="text/markdown">
840+
/// <![CDATA[
841+
/// [!code-csharp[LinearSvm](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/LinearSvmWithOptions.cs)]
842+
/// ]]></format>
843+
/// </example>
832844
public static LinearSvmTrainer LinearSvm(this BinaryClassificationCatalog.BinaryClassificationTrainers catalog,
833845
LinearSvmTrainer.Options options)
834846
{

0 commit comments

Comments
 (0)