Changeset 12586
- Timestamp:
- 07/03/15 16:40:34 (9 years ago)
- Location:
- branches/HiveStatistics/sources
- Files:
-
- 11 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HiveStatistics/sources
- Property svn:mergeinfo changed
/trunk/sources merged: 12559,12561,12577-12581,12583
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Clients.Hive/3.3/HiveClient.cs
r12012 r12586 76 76 #endregion 77 77 78 private HiveClient() { 79 //this will never be deregistered 80 TaskScheduler.UnobservedTaskException += new EventHandler<UnobservedTaskExceptionEventArgs>(TaskScheduler_UnobservedTaskException); 81 } 82 83 private void TaskScheduler_UnobservedTaskException(object sender, UnobservedTaskExceptionEventArgs e) { 84 e.SetObserved(); // avoid crash of process because task crashes. first exception found is handled in Results property 85 throw new HiveException("Unobserved Exception in ConcurrentTaskDownloader", e.Exception); 86 } 78 private HiveClient() { } 87 79 88 80 public void ClearHiveClient() { -
branches/HiveStatistics/sources/HeuristicLab.Optimization.Operators/3.3/MultiObjective/FastNonDominatedSort.cs
r12144 r12586 68 68 public override IOperation Apply() { 69 69 bool dominateOnEqualQualities = DominateOnEqualQualitiesParameter.ActualValue.Value; 70 BoolArray maximization = MaximizationParameter.ActualValue;71 ItemArray<DoubleArray> qualities = QualitiesParameter.ActualValue;70 bool[] maximization = MaximizationParameter.ActualValue.ToArray(); 71 double[][] qualities = QualitiesParameter.ActualValue.Select(x => x.ToArray()).ToArray(); 72 72 if (qualities == null) throw new InvalidOperationException(Name + ": No qualities found."); 73 73 … … 82 82 for (int pI = 0; pI < populationSize - 1; pI++) { 83 83 IScope p = scope.SubScopes[pI]; 84 if (!dominatedScopes.ContainsKey(p)) 85 dominatedScopes[p] = new List<int>(); 84 List<int> dominatedScopesByp; 85 if (!dominatedScopes.TryGetValue(p, out dominatedScopesByp)) 86 dominatedScopes[p] = dominatedScopesByp = new List<int>(); 86 87 for (int qI = pI + 1; qI < populationSize; qI++) { 87 88 DominationResult test = Dominates(qualities[pI], qualities[qI], maximization, dominateOnEqualQualities); 88 89 if (test == DominationResult.Dominates) { 89 dominatedScopes [p].Add(qI);90 dominatedScopesByp.Add(qI); 90 91 dominationCounter[qI] += 1; 91 92 } else if (test == DominationResult.IsDominated) { … … 111 112 ScopeList nextFront = new ScopeList(); 112 113 foreach (IScope p in fronts[i]) { 113 if (dominatedScopes.ContainsKey(p)) { 114 for (int k = 0; k < dominatedScopes[p].Count; k++) { 115 int dominatedScope = dominatedScopes[p][k]; 114 List<int> dominatedScopesByp; 115 if (dominatedScopes.TryGetValue(p, out dominatedScopesByp)) { 116 for (int k = 0; k < dominatedScopesByp.Count; k++) { 117 int dominatedScope = dominatedScopesByp[k]; 116 118 dominationCounter[dominatedScope] -= 1; 117 119 if (dominationCounter[dominatedScope] == 0) { … … 140 142 } 141 143 142 private static DominationResult Dominates(DoubleArray left, DoubleArray right, BoolArray maximizations, bool dominateOnEqualQualities) { 143 if (dominateOnEqualQualities && left.SequenceEqual(right)) return DominationResult.Dominates; 144 private static DominationResult Dominates(double[] left, double[] right, bool[] maximizations, bool dominateOnEqualQualities) { 145 //mkommend Caution: do not use LINQ.SequenceEqual for comparing the two quality arrays (left and right) due to performance reasons 146 if (dominateOnEqualQualities) { 147 var equal = true; 148 for (int i = 0; i < left.Length; i++) { 149 if (left[i] != right[i]) { 150 equal = false; 151 break; 152 } 153 } 154 if (equal) return DominationResult.Dominates; 155 } 144 156 145 157 bool leftIsBetter = false, rightIsBetter = false; -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis merged: 12581
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Views
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Views merged: 12577-12578
- Property svn:mergeinfo changed
-
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/MenuItems/ShrinkDataAnalysisRunsMenuItem.cs
r12515 r12586 82 82 var variableValuesMapping = new Dictionary<ValuesType, ValuesType>(); 83 83 foreach (var problemData in view.Content.GetObjectGraphObjects(excludeStaticMembers: true).OfType<IDataAnalysisProblemData>()) { 84 var originalValues = variableValuesGetter(problemData.Dataset); 84 var dataset = problemData.Dataset as Dataset; 85 if (dataset == null) continue; 86 var originalValues = variableValuesGetter(dataset); 85 87 var matchingValues = GetEqualValues(originalValues, variableValuesMapping); 86 variableValuesSetter( problemData.Dataset, matchingValues);88 variableValuesSetter(dataset, matchingValues); 87 89 } 88 90 }; … … 116 118 } 117 119 118 private static readonly Action< IDataset, Dictionary<string, IList>> variableValuesSetter;119 private static readonly Func< IDataset, Dictionary<string, IList>> variableValuesGetter;120 private static readonly Action<Dataset, Dictionary<string, IList>> variableValuesSetter; 121 private static readonly Func<Dataset, Dictionary<string, IList>> variableValuesGetter; 120 122 /// <summary> 121 123 /// The static initializer is used to create expressions for getting and setting the private variableValues field in the dataset. … … 123 125 /// </summary> 124 126 static ShrinkDataAnalysisRunsMenuItem() { 125 var dataset = Expression.Parameter(typeof( IDataset));127 var dataset = Expression.Parameter(typeof(Dataset)); 126 128 var variableValues = Expression.Parameter(typeof(ValuesType)); 127 129 var valuesExpression = Expression.Field(dataset, "variableValues"); 128 130 var assignExpression = Expression.Assign(valuesExpression, variableValues); 129 131 130 var variableValuesSetExpression = Expression.Lambda<Action< IDataset, ValuesType>>(assignExpression, dataset, variableValues);132 var variableValuesSetExpression = Expression.Lambda<Action<Dataset, ValuesType>>(assignExpression, dataset, variableValues); 131 133 variableValuesSetter = variableValuesSetExpression.Compile(); 132 134 133 var variableValuesGetExpression = Expression.Lambda<Func< IDataset, ValuesType>>(valuesExpression, dataset);135 var variableValuesGetExpression = Expression.Lambda<Func<Dataset, ValuesType>>(valuesExpression, dataset); 134 136 variableValuesGetter = variableValuesGetExpression.Compile(); 135 137 } -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/RegressionSolutionErrorCharacteristicsCurveView.cs
r12515 r12586 125 125 126 126 var maxValue = residuals.Max(); 127 double scale = Math.Pow(10, Math.Floor(Math.Log10(maxValue))); 128 var maximum = scale * (1 + (int)(maxValue / scale)); 129 chart.ChartAreas[0].AxisX.Maximum = maximum; 130 chart.ChartAreas[0].CursorX.Interval = residuals.Min() / 100; 127 if (maxValue >= chart.ChartAreas[0].AxisX.Maximum) { 128 double scale = Math.Pow(10, Math.Floor(Math.Log10(maxValue))); 129 var maximum = scale * (1 + (int)(maxValue / scale)); 130 chart.ChartAreas[0].AxisX.Maximum = maximum; 131 chart.ChartAreas[0].CursorX.Interval = residuals.Min() / 100; 132 } 131 133 132 134 UpdateSeries(residuals, solutionSeries); … … 211 213 .Where(x => x > 0) // remove entries where the original value is 0 212 214 .ToList(); 213 } 214 // should never happen 215 return new List<double>(); 215 default: throw new NotSupportedException(); 216 } 216 217 } 217 218 -
branches/HiveStatistics/sources/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionSolutionBase.cs
r12012 r12586 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using HeuristicLab.Common; … … 39 40 protected const string TrainingNormalizedMeanSquaredErrorResultName = "Normalized mean squared error (training)"; 40 41 protected const string TestNormalizedMeanSquaredErrorResultName = "Normalized mean squared error (test)"; 41 protected const string TrainingMeanErrorResultName = "Mean error (training)"; 42 protected const string TestMeanErrorResultName = "Mean error (test)"; 42 protected const string TrainingRootMeanSquaredErrorResultName = "Root mean squared error (training)"; 43 protected const string TestRootMeanSquaredErrorResultName = "Root mean squared error (test)"; 44 45 // BackwardsCompatibility3.3 46 #region Backwards compatible code, remove with 3.5 47 private const string TrainingMeanErrorResultName = "Mean error (training)"; 48 private const string TestMeanErrorResultName = "Mean error (test)"; 49 #endregion 50 43 51 44 52 protected const string TrainingMeanSquaredErrorResultDescription = "Mean of squared errors of the model on the training partition"; … … 52 60 protected const string TrainingNormalizedMeanSquaredErrorResultDescription = "Normalized mean of squared errors of the model on the training partition"; 53 61 protected const string TestNormalizedMeanSquaredErrorResultDescription = "Normalized mean of squared errors of the model on the test partition"; 54 protected const string Training MeanErrorResultDescription = "Mean oferrors of the model on the training partition";55 protected const string Test MeanErrorResultDescription = "Mean oferrors of the model on the test partition";62 protected const string TrainingRootMeanSquaredErrorResultDescription = "Root mean of squared errors of the model on the training partition"; 63 protected const string TestRootMeanSquaredErrorResultDescription = "Root mean of squared errors of the model on the test partition"; 56 64 57 65 public new IRegressionModel Model { … … 111 119 private set { ((DoubleValue)this[TestNormalizedMeanSquaredErrorResultName].Value).Value = value; } 112 120 } 113 public double TrainingMeanError { 114 get { return ((DoubleValue)this[TrainingMeanErrorResultName].Value).Value; } 115 private set { ((DoubleValue)this[TrainingMeanErrorResultName].Value).Value = value; } 116 } 117 public double TestMeanError { 118 get { return ((DoubleValue)this[TestMeanErrorResultName].Value).Value; } 119 private set { ((DoubleValue)this[TestMeanErrorResultName].Value).Value = value; } 120 } 121 public double TrainingRootMeanSquaredError { 122 get { return ((DoubleValue)this[TrainingRootMeanSquaredErrorResultName].Value).Value; } 123 private set { ((DoubleValue)this[TrainingRootMeanSquaredErrorResultName].Value).Value = value; } 124 } 125 public double TestRootMeanSquaredError { 126 get { return ((DoubleValue)this[TestRootMeanSquaredErrorResultName].Value).Value; } 127 private set { ((DoubleValue)this[TestRootMeanSquaredErrorResultName].Value).Value = value; } 128 } 129 130 // BackwardsCompatibility3.3 131 #region Backwards compatible code, remove with 3.5 132 private double TrainingMeanError { 133 get { 134 if (!ContainsKey(TrainingMeanErrorResultName)) return double.NaN; 135 return ((DoubleValue)this[TrainingMeanErrorResultName].Value).Value; 136 } 137 set { 138 if (ContainsKey(TrainingMeanErrorResultName)) 139 ((DoubleValue)this[TrainingMeanErrorResultName].Value).Value = value; 140 } 141 } 142 private double TestMeanError { 143 get { 144 if (!ContainsKey(TestMeanErrorResultName)) return double.NaN; 145 return ((DoubleValue)this[TestMeanErrorResultName].Value).Value; 146 } 147 set { 148 if (ContainsKey(TestMeanErrorResultName)) 149 ((DoubleValue)this[TestMeanErrorResultName].Value).Value = value; 150 } 151 } 152 #endregion 121 153 #endregion 122 154 … … 138 170 Add(new Result(TrainingNormalizedMeanSquaredErrorResultName, TrainingNormalizedMeanSquaredErrorResultDescription, new DoubleValue())); 139 171 Add(new Result(TestNormalizedMeanSquaredErrorResultName, TestNormalizedMeanSquaredErrorResultDescription, new DoubleValue())); 140 Add(new Result(Training MeanErrorResultName, TrainingMeanErrorResultDescription, new DoubleValue()));141 Add(new Result(Test MeanErrorResultName, TestMeanErrorResultDescription, new DoubleValue()));172 Add(new Result(TrainingRootMeanSquaredErrorResultName, TrainingRootMeanSquaredErrorResultDescription, new DoubleValue())); 173 Add(new Result(TestRootMeanSquaredErrorResultName, TestRootMeanSquaredErrorResultDescription, new DoubleValue())); 142 174 } 143 175 … … 145 177 private void AfterDeserialization() { 146 178 // BackwardsCompatibility3.4 147 148 179 #region Backwards compatible code, remove with 3.5 149 150 180 if (!ContainsKey(TrainingMeanAbsoluteErrorResultName)) { 151 181 OnlineCalculatorError errorState; … … 162 192 } 163 193 164 if (!ContainsKey(TrainingMeanErrorResultName)) { 165 OnlineCalculatorError errorState; 166 Add(new Result(TrainingMeanErrorResultName, "Mean of errors of the model on the training partition", new DoubleValue())); 167 double trainingME = OnlineMeanErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices), out errorState); 168 TrainingMeanError = errorState == OnlineCalculatorError.None ? trainingME : double.NaN; 169 } 170 if (!ContainsKey(TestMeanErrorResultName)) { 171 OnlineCalculatorError errorState; 172 Add(new Result(TestMeanErrorResultName, "Mean of errors of the model on the test partition", new DoubleValue())); 173 double testME = OnlineMeanErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndices), out errorState); 174 TestMeanError = errorState == OnlineCalculatorError.None ? testME : double.NaN; 194 if (!ContainsKey(TrainingRootMeanSquaredErrorResultName)) { 195 OnlineCalculatorError errorState; 196 Add(new Result(TrainingRootMeanSquaredErrorResultName, TrainingRootMeanSquaredErrorResultDescription, new DoubleValue())); 197 double trainingMSE = OnlineMeanSquaredErrorCalculator.Calculate(EstimatedTrainingValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TrainingIndices), out errorState); 198 TrainingRootMeanSquaredError = errorState == OnlineCalculatorError.None ? Math.Sqrt(trainingMSE) : double.NaN; 199 } 200 201 if (!ContainsKey(TestRootMeanSquaredErrorResultName)) { 202 OnlineCalculatorError errorState; 203 Add(new Result(TestRootMeanSquaredErrorResultName, TestRootMeanSquaredErrorResultDescription, new DoubleValue())); 204 double testMSE = OnlineMeanSquaredErrorCalculator.Calculate(EstimatedTestValues, ProblemData.Dataset.GetDoubleValues(ProblemData.TargetVariable, ProblemData.TestIndices), out errorState); 205 TestRootMeanSquaredError = errorState == OnlineCalculatorError.None ? Math.Sqrt(testMSE) : double.NaN; 175 206 } 176 207 #endregion … … 213 244 TestNormalizedMeanSquaredError = errorState == OnlineCalculatorError.None ? testNMSE : double.NaN; 214 245 215 double trainingME = OnlineMeanErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState); 216 TrainingMeanError = errorState == OnlineCalculatorError.None ? trainingME : double.NaN; 217 double testME = OnlineMeanErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState); 218 TestMeanError = errorState == OnlineCalculatorError.None ? testME : double.NaN; 246 TrainingRootMeanSquaredError = Math.Sqrt(TrainingMeanSquaredError); 247 TestRootMeanSquaredError = Math.Sqrt(TestMeanSquaredError); 248 249 // BackwardsCompatibility3.3 250 #region Backwards compatible code, remove with 3.5 251 if (ContainsKey(TrainingMeanErrorResultName)) { 252 double trainingME = OnlineMeanErrorCalculator.Calculate(originalTrainingValues, estimatedTrainingValues, out errorState); 253 TrainingMeanError = errorState == OnlineCalculatorError.None ? trainingME : double.NaN; 254 } 255 if (ContainsKey(TestMeanErrorResultName)) { 256 double testME = OnlineMeanErrorCalculator.Calculate(originalTestValues, estimatedTestValues, out errorState); 257 TestMeanError = errorState == OnlineCalculatorError.None ? testME : double.NaN; 258 } 259 #endregion 219 260 } 220 261 } -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp.Status/3.3/WebApp/status/statusCtrl.js
r12558 r12586 125 125 } 126 126 } 127 cpuSeries.push([$scope.status.Timestamp, $scope.cpu.knobData]);128 127 128 cpuSeries.push([$scope.status.Timestamp, Math.round(status.CpuUtilizationStatus.TotalCpuUtilization)]); 129 129 coreSeries[0].push([$scope.status.Timestamp, status.CoreStatus.TotalCores]); 130 130 coreSeries[1].push([$scope.status.Timestamp, status.CoreStatus.UsedCores]); -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp/3.3/WebApp/helper.js
r12584 r12586 62 62 }; 63 63 64 function decryptString(s) {64 var decryptString = function(s) { 65 65 return CryptoJS.AES.decrypt(s, "heuristiclab").toString(CryptoJS.enc.Utf8); 66 } 66 }; -
branches/HiveStatistics/sources/HeuristicLab.Services.WebApp/3.3/WebApp/plugins/about/aboutCtrl.js
r12584 r12586 1 1 (function () { 2 2 var module = appAboutPlugin.getAngularModule(); 3 module.controller('app.about.ctrl', ['$scope', '$log', function($scope, $log) {3 module.controller('app.about.ctrl', ['$scope', function($scope) { 4 4 $scope.mailToSupport = function () { 5 5 location.href = decryptString('U2FsdGVkX1/pCOITUzzsN36hx4sHh11FeVXkVyQ5b2KeZebFQ3KaNN8G9bKL3lU9');
Note: See TracChangeset
for help on using the changeset viewer.