Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/12/09 15:45:21 (15 years ago)
Author:
abeham
Message:

Updated ES to automatically calculate LearningRate parameters based on the problem dimension (ticket #84)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.ES/ESEditor.cs

    r1091 r1112  
    6161      : this() {
    6262      ES = es;
     63      int dimension = es.ShakingFactors.Length;
     64      problemDimensionTextBox.Text = dimension.ToString();
    6365    }
    6466
     
    268270      if (ES.ShakingFactors.Length != dim) {
    269271        problemDimensionTextBox.Text = ES.ShakingFactors.Length.ToString();
     272        UpdateLearningRates();
    270273      }
    271274      Refresh();
     
    287290        }
    288291        ES.ShakingFactors = shakingFactors;
     292        UpdateLearningRates();
    289293        Refresh();
     294      }
     295    }
     296
     297    private void UpdateLearningRates() {
     298      if (ES != null) {
     299        int dimension = int.Parse(problemDimensionTextBox.Text);
     300        ES.GeneralLearningRate = 1 / Math.Sqrt(2 * dimension);
     301        ES.LearningRate = 1 / Math.Sqrt(2 * Math.Sqrt(dimension));
    290302      }
    291303    }
Note: See TracChangeset for help on using the changeset viewer.