Skip to content

Commit 1527369

Browse files
author
Ivan Matantsev
committed
small updates
1 parent cc5cf79 commit 1527369

File tree

4 files changed

+7
-30
lines changed

4 files changed

+7
-30
lines changed

docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescentWithOptions.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public static void Example()
2424
// Get DefaultBinaryPipine for adult dataset and append SymSGD to it.
2525
var pipeline = SamplesUtils.DatasetUtils.DefaultBinaryPipeline(mlContext)
2626
.Append(mlContext.BinaryClassification.Trainers.SymbolicStochasticGradientDescent(
27-
new Trainers.SymSgd.SymSgdClassificationTrainer.Options()
27+
new Trainers.HalLearners.SymSgdClassificationTrainer.Options()
2828
{
2929
LabelColumn = "IsOver50K",
3030
LearningRate = 0.2f,

src/Microsoft.ML.HalLearners/HalLearnersCatalog.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,11 @@ public static class HalLearnersCatalog
2020
/// <param name="catalog">The <see cref="RegressionCatalog"/>.</param>
2121
/// <param name="labelColumn">The name of label column.</param>
2222
/// <param name="featureColumn">The name of feature column.</param>
23-
/// <param name="weightColumn">The name of weight column.</param>
23+
/// <param name="weightColumn">The name of optional weight column.</param>
2424
/// <example>
2525
/// <format type="text/markdown">
2626
/// <![CDATA[
27-
/// [!code-csharp[ScoreTensorFlowModel](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs)]
27+
/// [!code-csharp[OrdinaryLeastSquares](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquares.cs)]
2828
/// ]]>
2929
/// </format>
3030
/// </example>
@@ -53,7 +53,7 @@ public static OlsLinearRegressionTrainer OrdinaryLeastSquares(this RegressionCat
5353
/// <example>
5454
/// <format type="text/markdown">
5555
/// <![CDATA[
56-
/// [!code-csharp[ScoreTensorFlowModel](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs)]
56+
/// [!code-csharp[OrdinaryLeastSquares](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/Regression/OrdinaryLeastSquaresWithOptions.cs)]
5757
/// ]]>
5858
/// </format>
5959
/// </example>
@@ -78,7 +78,7 @@ public static OlsLinearRegressionTrainer OrdinaryLeastSquares(
7878
/// <example>
7979
/// <format type="text/markdown">
8080
/// <![CDATA[
81-
/// [!code-csharp[ScoreTensorFlowModel](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescent.cs)]
81+
/// [!code-csharp[SymbolicStochasticGradientDescent](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescent.cs)]
8282
/// ]]>
8383
/// </format>
8484
/// </example>
@@ -107,7 +107,7 @@ public static SymSgdClassificationTrainer SymbolicStochasticGradientDescent(this
107107
/// <example>
108108
/// <format type="text/markdown">
109109
/// <![CDATA[
110-
/// [!code-csharp[ScoreTensorFlowModel](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescentWithOptions.cs)]
110+
/// [!code-csharp[SymbolicStochasticGradientDescent](~/../docs/samples/docs/samples/Microsoft.ML.Samples/Dynamic/Trainers/BinaryClassification/SymbolicStochasticGradientDescentWithOptions.cs)]
111111
/// ]]>
112112
/// </format>
113113
/// </example>

src/Microsoft.ML.HalLearners/OlsLinearRegression.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -751,29 +751,6 @@ private protected override void SaveSummary(TextWriter writer, RoleMappedSchema
751751
}
752752
}
753753
}
754-
/// <summary>
755-
/// Returns model coefficents.
756-
/// </summary>
757-
/// <param name="coefficents"></param>
758-
public void GetCoefficents(ref VBuffer<float> coefficents)
759-
{
760-
if (PValues == null)
761-
{
762-
base.GetFeatureWeights(ref coefficents);
763-
return;
764-
}
765-
766-
var size = PValues.Count - 1;
767-
var editor = VBufferEditor.Create(ref coefficents, size);
768-
for (int i = 0; i < size; i++)
769-
{
770-
var score = -(float)Math.Log(PValues[i + 1]);
771-
if (score > float.MaxValue)
772-
score = float.MaxValue;
773-
editor.Values[i] = score;
774-
}
775-
coefficents = editor.Commit();
776-
}
777754
}
778755
}
779756

src/Microsoft.ML.Recommender/MatrixFactorizationTrainer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ public sealed class Options
226226
/// <summary>
227227
/// Number of threads will be used during training. If unspecified all aviable threads will be use.
228228
/// </summary>
229-
[Argument(ArgumentType.AtMostOnce, HelpText = "Number of threads can be used in the training procedure.", ShortName = "t")]
229+
[Argument(ArgumentType.AtMostOnce, HelpText = "Number of threads can be used in the training procedure.", ShortName = "t,numthreads")]
230230
public int? NumberOfThreads;
231231

232232
/// <summary>

0 commit comments

Comments
 (0)