- Timestamp:
- 09/25/15 14:39:59 (9 years ago)
- Location:
- branches/gteufl
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gteufl
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 25 obj
-
- Property svn:mergeinfo changed
-
Property
svn:global-ignores
set to
*.nuget
packages
- Property svn:ignore
-
branches/gteufl/HeuristicLab.Encodings.RealVectorEncoding
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
/branches/HLScript/HeuristicLab.Encodings.RealVectorEncoding merged eligible /branches/HiveStatistics/sources/HeuristicLab.Encodings.RealVectorEncoding merged eligible /stable/HeuristicLab.Encodings.RealVectorEncoding merged eligible /trunk/sources/HeuristicLab.Encodings.RealVectorEncoding merged eligible /branches/1721-RandomForestPersistence/HeuristicLab.Encodings.RealVectorEncoding 10321-10322 /branches/Algorithms.GradientDescent/HeuristicLab.Encodings.RealVectorEncoding 5516-5520 /branches/Benchmarking/sources/HeuristicLab.Encodings.RealVectorEncoding 6917-7005 /branches/CloningRefactoring/HeuristicLab.Encodings.RealVectorEncoding 4656-4721 /branches/CodeEditor/HeuristicLab.Encodings.RealVectorEncoding 11700-11806 /branches/DataAnalysis Refactoring/HeuristicLab.Encodings.RealVectorEncoding 5471-5808 /branches/DataAnalysis SolutionEnsembles/HeuristicLab.Encodings.RealVectorEncoding 5815-6180 /branches/DataAnalysis/HeuristicLab.Encodings.RealVectorEncoding 4458-4459,4462,4464 /branches/DataPreprocessing/HeuristicLab.Encodings.RealVectorEncoding 10085-11101 /branches/GP.Grammar.Editor/HeuristicLab.Encodings.RealVectorEncoding 6284-6795 /branches/GP.Symbols (TimeLag, Diff, Integral)/HeuristicLab.Encodings.RealVectorEncoding 5060 /branches/HeuristicLab.DatasetRefactor/sources/HeuristicLab.Encodings.RealVectorEncoding 11570-12508 /branches/HeuristicLab.Problems.DataAnalysis.Trading/HeuristicLab.Encodings.RealVectorEncoding 6123-9799 /branches/HeuristicLab.Problems.Orienteering/HeuristicLab.Encodings.RealVectorEncoding 11130-12721 /branches/LogResidualEvaluator/HeuristicLab.Encodings.RealVectorEncoding 10202-10483 /branches/NET40/sources/HeuristicLab.Encodings.RealVectorEncoding 5138-5162 /branches/NSGA-II Changes/HeuristicLab.Encodings.RealVectorEncoding 12033-12122 /branches/ParallelEngine/HeuristicLab.Encodings.RealVectorEncoding 5175-5192 /branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Encodings.RealVectorEncoding 7568-7810 /branches/ProgrammableProblem/HeuristicLab.Encodings.RealVectorEncoding 11777-11959 /branches/QAPAlgorithms/HeuristicLab.Encodings.RealVectorEncoding 6350-6627 /branches/Restructure trunk solution/HeuristicLab.Encodings.RealVectorEncoding 6828 /branches/RuntimeOptimizer/HeuristicLab.Encodings.RealVectorEncoding 8943-9078 /branches/ScatterSearch (trunk integration)/HeuristicLab.Encodings.RealVectorEncoding 7787-8333 /branches/SlaveShutdown/HeuristicLab.Encodings.RealVectorEncoding 8944-8956 /branches/SpectralKernelForGaussianProcesses/HeuristicLab.Encodings.RealVectorEncoding 10204-10479 /branches/SuccessProgressAnalysis/HeuristicLab.Encodings.RealVectorEncoding 5370-5682 /branches/Trunk/HeuristicLab.Encodings.RealVectorEncoding 6829-6865 /branches/UnloadJobs/HeuristicLab.Encodings.RealVectorEncoding 9168-9215 /branches/VNS/HeuristicLab.Encodings.RealVectorEncoding 5594-5752 /branches/histogram/HeuristicLab.Encodings.RealVectorEncoding 5959-6341
-
Property
svn:mergeinfo
set to
(toggle deleted branches)
-
branches/gteufl/HeuristicLab.Encodings.RealVectorEncoding/3.3/Creators/NormalDistributedRealVectorCreator.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 88 88 /// </remarks> 89 89 /// <param name="random">The random number generator.</param> 90 /// <param name="mean ">The mean vector around which the resulting vector is sampled.</param>91 /// <param name="sigma ">The vector of standard deviations, must have at least one row.</param>90 /// <param name="means">The mean vector around which the resulting vector is sampled.</param> 91 /// <param name="sigmas">The vector of standard deviations, must have at least one row.</param> 92 92 /// <param name="bounds">The lower and upper bound (1st and 2nd column) of the positions in the vector. If there are less rows than dimensions, the rows are cycled.</param> 93 93 /// <param name="maximumTries">The maximum number of tries to sample a value inside the bounds for each dimension. If a valid value cannot be obtained, the mean will be used.</param> 94 94 /// <returns>The newly created real vector.</returns> 95 public static RealVector Apply(IRandom random, RealVector mean, DoubleArray sigma, DoubleMatrix bounds, int maximumTries = 1000) { 95 public static RealVector Apply(IntValue lengthValue, IRandom random, RealVector means, DoubleArray sigmas, DoubleMatrix bounds, int maximumTries = 1000) { 96 if (lengthValue == null || lengthValue.Value == 0) throw new ArgumentException("Length is not defined or zero"); 96 97 if (random == null) throw new ArgumentNullException("Random is not defined", "random"); 97 if (mean == null || mean.Length == 0) throw new ArgumentNullException("Mean is not defined", "mean");98 if (sigma == null || sigma.Length == 0) throw new ArgumentNullException("Sigma is not defined.", "sigma");98 if (means == null || means.Length == 0) throw new ArgumentNullException("Mean is not defined", "mean"); 99 if (sigmas == null || sigmas.Length == 0) throw new ArgumentNullException("Sigma is not defined.", "sigma"); 99 100 if (bounds == null || bounds.Rows == 0) bounds = new DoubleMatrix(new[,] { { double.MinValue, double.MaxValue } }); 101 var length = lengthValue.Value; 100 102 var nd = new NormalDistributedRandom(random, 0, 1); 101 var result = (RealVector)mean.Clone();103 var result = new RealVector(length); 102 104 for (int i = 0; i < result.Length; i++) { 103 105 var min = bounds[i % bounds.Rows, 0]; 104 106 var max = bounds[i % bounds.Rows, 1]; 105 if (min.IsAlmost(max) || mean[i] < min) result[i] = min; 106 else if (mean[i] > max) result[i] = max; 107 var mean = means[i % means.Length]; 108 var sigma = sigmas[i % sigmas.Length]; 109 if (min.IsAlmost(max) || mean < min) result[i] = min; 110 else if (mean > max) result[i] = max; 107 111 else { 108 112 int count = 0; 109 113 bool inRange; 110 114 do { 111 result[i] = mean [i] + sigma[i % sigma.Length]* nd.NextDouble();112 inRange = result[i] >= bounds[i % bounds.Rows, 0] && result[i] < bounds[i % bounds.Rows, 1];115 result[i] = mean + sigma * nd.NextDouble(); 116 inRange = result[i] >= min && result[i] < max; 113 117 count++; 114 118 } while (count < maximumTries && !inRange); 115 119 if (count == maximumTries && !inRange) 116 result[i] = mean [i];120 result[i] = mean; 117 121 } 118 122 } … … 128 132 /// <returns>The newly created real vector.</returns> 129 133 protected override RealVector Create(IRandom random, IntValue length, DoubleMatrix bounds) { 130 return Apply( random, MeanParameter.ActualValue, SigmaParameter.ActualValue, bounds, MaximumTriesParameter.Value.Value);134 return Apply(length, random, MeanParameter.ActualValue, SigmaParameter.ActualValue, bounds, MaximumTriesParameter.Value.Value); 131 135 } 132 136 } -
branches/gteufl/HeuristicLab.Encodings.RealVectorEncoding/3.3/Creators/UniformRandomRealVectorCreator.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab.
Note: See TracChangeset
for help on using the changeset viewer.