Changeset 14826 for trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariableTreeNode.cs
- Timestamp:
- 04/04/17 17:52:44 (7 years ago)
- Location:
- trunk/sources
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
-
trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Symbols/BinaryFactorVariableTreeNode.cs
r14825 r14826 57 57 public override void ShakeLocalParameters(IRandom random, double shakingFactor) { 58 58 // 50% additive & 50% multiplicative (override of functionality of base class because of a BUG) 59 if (random.NextDouble() < 0.5) {59 if (random.NextDouble() < 0.5) { 60 60 double x = NormalDistributedRandom.NextDouble(random, Symbol.WeightManipulatorMu, Symbol.WeightManipulatorSigma); 61 61 Weight = Weight + x * shakingFactor; … … 64 64 Weight = Weight * x; 65 65 } 66 if (random.NextDouble() < Symbol.VariableChangeProbability) {66 if (random.NextDouble() < Symbol.VariableChangeProbability) { 67 67 var oldName = VariableName; 68 68 VariableName = Symbol.VariableNames.SampleRandom(random); 69 69 // reinitialize weights if variable has changed (similar to FactorVariableTreeNode) 70 if (oldName != VariableName)70 if (oldName != VariableName) 71 71 Weight = NormalDistributedRandom.NextDouble(random, Symbol.WeightMu, Symbol.WeightSigma); 72 72 }
Note: See TracChangeset
for help on using the changeset viewer.