- Timestamp:
- 08/11/15 10:11:47 (9 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:ignore
-
old new 23 23 bin 24 24 protoc.exe 25 obj
-
- Property svn:mergeinfo changed
- Property svn:ignore
-
branches/HiveStatistics/sources/HeuristicLab.Algorithms.GradientDescent/3.3/Lbfgs.cs
r12515 r12843 200 200 RegisterEvents(); 201 201 solutionCreator.OperatorParameter.ActualName = Problem.SolutionCreatorParameter.Name; 202 solutionCreator.OperatorParameter.Hidden = true; 202 203 evaluator.OperatorParameter.ActualName = Problem.EvaluatorParameter.Name; 204 evaluator.OperatorParameter.Hidden = true; 203 205 UpdateAnalyzers(); 204 206 ParameterizeOperators(); … … 220 222 protected override void Problem_OperatorsChanged(object sender, EventArgs e) { 221 223 base.Problem_OperatorsChanged(sender, e); 224 RegisterEvents(); 225 solutionCreator.OperatorParameter.ActualName = Problem.SolutionCreatorParameter.Name; 226 solutionCreator.OperatorParameter.Hidden = true; 227 evaluator.OperatorParameter.ActualName = Problem.EvaluatorParameter.Name; 228 evaluator.OperatorParameter.Hidden = true; 222 229 UpdateAnalyzers(); 230 ParameterizeOperators(); 223 231 } 224 232 … … 266 274 var realVectorParameterName = realVectorCreator.RealVectorParameter.ActualName; 267 275 initializer.PointParameter.ActualName = realVectorParameterName; 276 initializer.PointParameter.Hidden = true; 268 277 makeStep.PointParameter.ActualName = realVectorParameterName; 278 makeStep.PointParameter.Hidden = true; 269 279 analyzer.PointParameter.ActualName = realVectorParameterName; 280 analyzer.PointParameter.Hidden = true; 270 281 } 271 282 272 283 var qualityParameterName = Problem.Evaluator.QualityParameter.ActualName; 273 284 updateResults.QualityParameter.ActualName = qualityParameterName; 285 updateResults.QualityParameter.Hidden = true; 274 286 analyzer.QualityParameter.ActualName = qualityParameterName; 287 analyzer.QualityParameter.Hidden = true; 275 288 } 276 289 } -
branches/HiveStatistics/sources/HeuristicLab.Algorithms.GradientDescent/3.3/LbfgsUpdateResults.cs
r12012 r12843 37 37 private const string StateParameterName = "State"; 38 38 private const string ApproximateGradientsParameterName = "ApproximateGradients"; 39 private const string MaximizationParameterName = "Maximization"; 39 40 40 41 #region Parameter Properties … … 51 52 get { return (ILookupParameter<LbfgsState>)Parameters[StateParameterName]; } 52 53 } 54 public ILookupParameter<BoolValue> MaximizationParameter { 55 get { return (ILookupParameter<BoolValue>)Parameters[MaximizationParameterName]; } 56 } 53 57 #endregion 54 58 … … 58 62 private DoubleValue Quality { get { return QualityParameter.ActualValue; } } 59 63 private LbfgsState State { get { return StateParameter.ActualValue; } } 64 65 private BoolValue Maximization { 66 get { 67 // BackwardsCompatibility3.3 68 #region Backwards compatible code, remove with 3.4 69 // the parameter is new, previously we assumed minimization problems 70 if (MaximizationParameter.ActualValue == null) return new BoolValue(false); 71 #endregion 72 return MaximizationParameter.ActualValue; 73 } 74 } 75 60 76 #endregion 61 77 … … 70 86 Parameters.Add(new LookupParameter<BoolValue>(ApproximateGradientsParameterName, 71 87 "Flag that indicates if gradients should be approximated.")); 88 Parameters.Add(new LookupParameter<BoolValue>(MaximizationParameterName, "Flag that indicates if we solve a maximization problem.")); 72 89 // in & out 73 90 Parameters.Add(new LookupParameter<LbfgsState>(StateParameterName, "The state of the LM-BFGS algorithm.")); 91 } 92 93 [StorableHook(HookType.AfterDeserialization)] 94 private void AfterDeserialization() { 95 // BackwardsCompatibility3.3 96 97 #region Backwards compatible code, remove with 3.4 98 if (!Parameters.ContainsKey(MaximizationParameterName)) { 99 // previous behaviour defaulted to minimization 100 Parameters.Add(new LookupParameter<BoolValue>(MaximizationParameterName, "Flag that indicates if we solve a maximization problem.")); 101 } 102 #endregion 74 103 } 75 104 … … 80 109 public override IOperation Apply() { 81 110 var state = State; 82 var f = Quality.Value; 111 var sign = Maximization.Value ? -1.0 : 1.0; 112 var f = sign * Quality.Value; 83 113 state.State.f = f; 84 114 if (!ApproximateGradients.Value) { 85 var g = QualityGradients. ToArray();115 var g = QualityGradients.Select(gi => sign * gi).ToArray(); 86 116 state.State.g = g; 87 117 } -
branches/HiveStatistics/sources/HeuristicLab.Algorithms.GradientDescent/3.3/Plugin.cs.frame
r12012 r12843 23 23 24 24 namespace HeuristicLab.Algorithms.GradientDescent { 25 [Plugin("HeuristicLab.Algorithms.GradientDescent", "3.3.1 1.$WCREV$")]25 [Plugin("HeuristicLab.Algorithms.GradientDescent", "3.3.12.$WCREV$")] 26 26 [PluginFile("HeuristicLab.Algorithms.GradientDescent-3.3.dll", PluginFileType.Assembly)] 27 27 [PluginDependency("HeuristicLab.ALGLIB", "3.7.0")] -
branches/HiveStatistics/sources/HeuristicLab.Algorithms.GradientDescent/3.3/Properties/AssemblyInfo.cs.frame
r12012 r12843 55 55 // [assembly: AssemblyVersion("1.0.*")] 56 56 [assembly: AssemblyVersion("3.3.0.0")] 57 [assembly: AssemblyFileVersion("3.3.1 1.$WCREV$")]57 [assembly: AssemblyFileVersion("3.3.12.$WCREV$")]
Note: See TracChangeset
for help on using the changeset viewer.