Changeset 8397
- Timestamp:
- 08/02/12 17:39:37 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/GaussianProcess/Lbfgs.cs
r8396 r8397 59 59 private const string MaxIterationsParameterName = "MaxIterations"; 60 60 private const string ApproximateGradientsParameterName = "ApproximateGradients"; 61 private const string SeedParameterName = "Seed"; 62 private const string SetSeedRandomlyParameterName = "SetSeedRandomly"; 61 63 62 64 #region parameter properties 63 65 public IValueParameter<IntValue> MaxIterationsParameter { 64 66 get { return (IValueParameter<IntValue>)Parameters[MaxIterationsParameterName]; } 67 } 68 public IValueParameter<IntValue> SeedParameter { 69 get { return (IValueParameter<IntValue>)Parameters[SeedParameterName]; } 70 } 71 public IValueParameter<BoolValue> SetSeedRandomlyParameter { 72 get { return (IValueParameter<BoolValue>)Parameters[SetSeedRandomlyParameterName]; } 65 73 } 66 74 #endregion … … 70 78 get { return MaxIterationsParameter.Value.Value; } 71 79 } 80 public int Seed { get { return SeedParameter.Value.Value; } set { SeedParameter.Value.Value = value; } } 81 public bool SetSeedRandomly { get { return SetSeedRandomlyParameter.Value.Value; } set { SetSeedRandomlyParameter.Value.Value = value; } } 72 82 #endregion 83 73 84 [StorableConstructor] 74 85 private LbfgsAlgorithm(bool deserializing) : base(deserializing) { } … … 84 95 85 96 Parameters.Add(new ValueParameter<IntValue>(MaxIterationsParameterName, "The maximal number of iterations for.", new IntValue(20))); 97 Parameters.Add(new ValueParameter<IntValue>(SeedParameterName, "The random seed used to initialize the new pseudo random number generator.", new IntValue(0))); 98 Parameters.Add(new ValueParameter<BoolValue>(SetSeedRandomlyParameterName, "True if the random seed should be set to a random value, otherwise false.", new BoolValue(true))); 86 99 Parameters.Add(new ValueParameter<BoolValue>(ApproximateGradientsParameterName, "Indicates that gradients should be approximated.", new BoolValue(true))); 87 100 Parameters[ApproximateGradientsParameterName].Hidden = true; // should not be changed … … 99 112 OperatorGraph.InitialOperator = randomCreator; 100 113 114 randomCreator.SeedParameter.ActualName = SeedParameterName; 115 randomCreator.SeedParameter.Value = null; 116 randomCreator.SetSeedRandomlyParameter.ActualName = SetSeedRandomlyParameterName; 117 randomCreator.SetSeedRandomlyParameter.Value = null; 101 118 randomCreator.Successor = solutionCreator; 102 119
Note: See TracChangeset
for help on using the changeset viewer.