You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
public Microsoft.ML.Transforms.ApproximateBootstrapSampler.Output Add(Microsoft.ML.Transforms.ApproximateBootstrapSampler input)
830
842
{
831
843
var output = new Microsoft.ML.Transforms.ApproximateBootstrapSampler.Output();
@@ -9590,6 +9602,128 @@ public StochasticGradientDescentBinaryClassifierPipelineStep(Output output)
9590
9602
}
9591
9603
}
9592
9604
9605
+
namespace Trainers
9606
+
{
9607
+
9608
+
/// <summary>
9609
+
/// Train a symbolic SGD.
9610
+
/// </summary>
9611
+
public sealed partial class SymSgdBinaryClassifier : Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInputWithLabel, Microsoft.ML.Runtime.EntryPoints.CommonInputs.ITrainerInput, Microsoft.ML.ILearningPipelineItem
9612
+
{
9613
+
9614
+
9615
+
/// <summary>
9616
+
/// Degree of lock-free parallelism. Defaults to automatic depending on data sparseness. Determinism not guaranteed.
9617
+
/// </summary>
9618
+
public int? NumberOfThreads { get; set; }
9619
+
9620
+
/// <summary>
9621
+
/// Number of passes over the data.
9622
+
/// </summary>
9623
+
[TlcModule.SweepableDiscreteParamAttribute("NumberOfIterations", new object[]{1, 5, 10, 20, 30, 40, 50})]
9624
+
public int NumberOfIterations { get; set; } = 50;
9625
+
9626
+
/// <summary>
9627
+
/// Tolerance for difference in average loss in consecutive passes.
9628
+
/// </summary>
9629
+
public float Tol { get; set; } = 0.0001f;
9630
+
9631
+
/// <summary>
9632
+
/// Learning rate
9633
+
/// </summary>
9634
+
[TlcModule.SweepableDiscreteParamAttribute("LearningRate", new object[]{"<Auto>", 10f, 1f, 0.1f, 0.01f, 0.001f})]
9635
+
public float? LearningRate { get; set; }
9636
+
9637
+
/// <summary>
9638
+
/// L2 regularization
9639
+
/// </summary>
9640
+
[TlcModule.SweepableDiscreteParamAttribute("L2Regularization", new object[]{0f, 1E-05f, 1E-05f, 1E-06f, 1E-07f})]
9641
+
public float L2Regularization { get; set; }
9642
+
9643
+
/// <summary>
9644
+
/// The number of iterations each thread learns a local model until combining it with the global model. Low value means more updated global model and high value means less cache traffic.
9645
+
/// </summary>
9646
+
[TlcModule.SweepableDiscreteParamAttribute("UpdateFrequency", new object[]{"<Auto>", 5, 20})]
9647
+
public int? UpdateFrequency { get; set; }
9648
+
9649
+
/// <summary>
9650
+
/// The acceleration memory budget in MB
9651
+
/// </summary>
9652
+
public long MemorySize { get; set; } = 1024;
9653
+
9654
+
/// <summary>
9655
+
/// Shuffle data?
9656
+
/// </summary>
9657
+
public bool Shuffle { get; set; } = true;
9658
+
9659
+
/// <summary>
9660
+
/// Apply weight to the positive class, for imbalanced data
9661
+
/// </summary>
9662
+
public float PositiveInstanceWeight { get; set; } = 1f;
9663
+
9664
+
/// <summary>
9665
+
/// Column to use for labels
9666
+
/// </summary>
9667
+
public string LabelColumn { get; set; } = "Label";
9668
+
9669
+
/// <summary>
9670
+
/// The data to be used for training
9671
+
/// </summary>
9672
+
public Var<Microsoft.ML.Runtime.Data.IDataView> TrainingData { get; set; } = new Var<Microsoft.ML.Runtime.Data.IDataView>();
9673
+
9674
+
/// <summary>
9675
+
/// Column to use for features
9676
+
/// </summary>
9677
+
public string FeatureColumn { get; set; } = "Features";
9678
+
9679
+
/// <summary>
9680
+
/// Normalize option for the feature column
9681
+
/// </summary>
9682
+
public Microsoft.ML.Models.NormalizeOption NormalizeFeatures { get; set; } = Microsoft.ML.Models.NormalizeOption.Auto;
9683
+
9684
+
/// <summary>
9685
+
/// Whether learner should cache input training data
9686
+
/// </summary>
9687
+
public Microsoft.ML.Models.CachingOptions Caching { get; set; } = Microsoft.ML.Models.CachingOptions.Auto;
9688
+
9689
+
9690
+
public sealed class Output : Microsoft.ML.Runtime.EntryPoints.CommonOutputs.IBinaryClassificationOutput, Microsoft.ML.Runtime.EntryPoints.CommonOutputs.ITrainerOutput
9691
+
{
9692
+
/// <summary>
9693
+
/// The trained model
9694
+
/// </summary>
9695
+
public Var<Microsoft.ML.Runtime.EntryPoints.IPredictorModel> PredictorModel { get; set; } = new Var<Microsoft.ML.Runtime.EntryPoints.IPredictorModel>();
9696
+
9697
+
}
9698
+
public Var<IDataView> GetInputData() => TrainingData;
9699
+
9700
+
public ILearningPipelineStep ApplyStep(ILearningPipelineStep previousStep, Experiment experiment)
9701
+
{
9702
+
if (previousStep != null)
9703
+
{
9704
+
if (!(previousStep is ILearningPipelineDataStep dataStep))
9705
+
{
9706
+
throw new InvalidOperationException($"{ nameof(SymSgdBinaryClassifier)} only supports an { nameof(ILearningPipelineDataStep)} as an input.");
9707
+
}
9708
+
9709
+
TrainingData = dataStep.Data;
9710
+
}
9711
+
Output output = experiment.Add(this);
9712
+
return new SymSgdBinaryClassifierPipelineStep(output);
9713
+
}
9714
+
9715
+
private class SymSgdBinaryClassifierPipelineStep : ILearningPipelinePredictorStep
9716
+
{
9717
+
public SymSgdBinaryClassifierPipelineStep(Output output)
Copy file name to clipboardExpand all lines: test/BaselineOutput/Common/EntryPoints/core_ep-list.tsv
+1Lines changed: 1 addition & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -65,6 +65,7 @@ Trainers.StochasticDualCoordinateAscentBinaryClassifier Train an SDCA binary mod
65
65
Trainers.StochasticDualCoordinateAscentClassifierThe SDCA linear multi-class classification trainer.Microsoft.ML.Runtime.Learners.SdcaTrainMultiClassMicrosoft.ML.Runtime.Learners.SdcaMultiClassTrainer+ArgumentsMicrosoft.ML.Runtime.EntryPoints.CommonOutputs+MulticlassClassificationOutput
66
66
Trainers.StochasticDualCoordinateAscentRegressorThe SDCA linear regression trainer.Microsoft.ML.Runtime.Learners.SdcaTrainRegressionMicrosoft.ML.Runtime.Learners.SdcaRegressionTrainer+ArgumentsMicrosoft.ML.Runtime.EntryPoints.CommonOutputs+RegressionOutput
67
67
Trainers.StochasticGradientDescentBinaryClassifierTrain an Hogwild SGD binary model.Microsoft.ML.Runtime.Learners.StochasticGradientDescentClassificationTrainerTrainBinaryMicrosoft.ML.Runtime.Learners.StochasticGradientDescentClassificationTrainer+ArgumentsMicrosoft.ML.Runtime.EntryPoints.CommonOutputs+BinaryClassificationOutput
68
+
Trainers.SymSgdBinaryClassifierTrain a symbolic SGD.Microsoft.ML.Runtime.SymSgd.SymSgdClassificationTrainerTrainSymSgdMicrosoft.ML.Runtime.SymSgd.SymSgdClassificationTrainer+ArgumentsMicrosoft.ML.Runtime.EntryPoints.CommonOutputs+BinaryClassificationOutput
Transforms.BinaryPredictionScoreColumnsRenamerFor binary prediction, it renames the PredictedLabel and Score columns to include the name of the positive class.Microsoft.ML.Runtime.EntryPoints.ScoreModelRenameBinaryPredictionScoreColumnsMicrosoft.ML.Runtime.EntryPoints.ScoreModel+RenameBinaryPredictionScoreColumnsInputMicrosoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput
70
71
Transforms.BinNormalizerThe values are assigned into equidensity bins and a value is mapped to its bin_number/number_of_bins.Microsoft.ML.Runtime.Data.NormalizeBinMicrosoft.ML.Runtime.Data.NormalizeTransform+BinArgumentsMicrosoft.ML.Runtime.EntryPoints.CommonOutputs+TransformOutput
0 commit comments