Skip to content
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

Remove duplicate NormalizeFeatures from FFM trainer #2964

Merged
merged 6 commits into from Mar 18, 2019
Merged
Diff settings

Always

Just for now

@@ -77,12 +77,6 @@ public sealed class Options : TrainerInputBaseWithWeight
[TlcModule.SweepableFloatParam(1e-8f, 1f, isLogScale: true)]
public float LambdaLatent = 0.0001f;

/// <summary>
/// Whether to normalize the input vectors so that the concatenation of all fields' feature vectors is unit-length.
/// </summary>
[Argument(ArgumentType.AtMostOnce, HelpText = "Whether to normalize the input vectors so that the concatenation of all fields' feature vectors is unit-length", ShortName = "norm", SortOrder = 6)]
public bool Normalize = true;

This comment has been minimized.

Copy link
@Ivanidzo4ka

Ivanidzo4ka Mar 14, 2019

Member

Normalize [](start = 24, length = 9)

I would double check with @wschin #Resolved

This comment has been minimized.

Copy link
@ganik

ganik Mar 14, 2019

Author Member

yep, did


In reply to: 265801014 [](ancestors = 265801014)


/// <summary>
/// Extra feature column names. The column named <see cref="TrainerInputBase.FeatureColumnName"/> stores features from the first field.
/// The i-th string in <see cref="ExtraFeatureColumns"/> stores the name of the (i+1)-th field's feature column.
@@ -137,14 +131,15 @@ public sealed class Options : TrainerInputBaseWithWeight
/// The <see cref="TrainerInfo"/> containing at least the training data for this trainer.
/// </summary>
TrainerInfo ITrainer.Info => _info;
private static readonly TrainerInfo _info = new TrainerInfo(supportValid: true, supportIncrementalTrain: true);
private static readonly TrainerInfo _info = new TrainerInfo(normalization: false, supportValid: true, supportIncrementalTrain: true);

private int _latentDim;
private int _latentDimAligned;
private float _lambdaLinear;
private float _lambdaLatent;
private float _learningRate;
private int _numIterations;
// whether to normalize input vectors so that the concatenation of all fields' feature vectors is unit-length
private bool _norm;
private bool _shuffle;
private bool _verbose;
@@ -225,7 +220,7 @@ private void Initialize(IHostEnvironment env, Options options)
_lambdaLatent = options.LambdaLatent;
_learningRate = options.LearningRate;
_numIterations = options.NumberOfIterations;
_norm = options.Normalize;
_norm = (options.NormalizeFeatures == NormalizeOption.Yes);

This comment has been minimized.

Copy link
@Ivanidzo4ka

Ivanidzo4ka Mar 15, 2019

Member

NormalizeFeatures [](start = 29, length = 17)

Just curious, why you decide not have NormalizeOption.Auto here? #Resolved

This comment has been minimized.

Copy link
@ganik

ganik Mar 15, 2019

Author Member

By default normalization should be off as per Wei-Sheng


In reply to: 266086395 [](ancestors = 266086395)

This comment has been minimized.

Copy link
@Ivanidzo4ka

Ivanidzo4ka Mar 15, 2019

Member

public bool Normalize = true;
so this was mistake which we fixing.
Ok, if @wschin says so.


In reply to: 266129940 [](ancestors = 266129940,266086395)

_shuffle = options.Shuffle;
_verbose = options.Verbose;
_radius = options.Radius;
@@ -10173,18 +10173,6 @@
"IsNullable": false,
"Default": "Auto"
},
{
"Name": "Normalize",
"Type": "Bool",
"Desc": "Whether to normalize the input vectors so that the concatenation of all fields' feature vectors is unit-length",
"Aliases": [
"norm"
],
"Required": false,
"SortOrder": 6.0,
"IsNullable": false,
"Default": true
},
{
"Name": "Caching",
"Type": {
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.