Changeset 16092 for branches/2839_HiveProjectManagement/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour
- Timestamp:
- 08/29/18 09:44:07 (6 years ago)
- Location:
- branches/2839_HiveProjectManagement
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2839_HiveProjectManagement
- Property svn:mergeinfo changed
/trunk merged: 16059,16063,16071,16084-16086
- Property svn:mergeinfo changed
-
branches/2839_HiveProjectManagement/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Algorithms.DataAnalysis merged: 16071,16086
- Property svn:mergeinfo changed
-
branches/2839_HiveProjectManagement/HeuristicLab.Algorithms.DataAnalysis/3.4
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Algorithms.DataAnalysis/3.4 merged: 16071,16086
- Property svn:mergeinfo changed
-
branches/2839_HiveProjectManagement/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs
r16057 r16092 130 130 // automatic determination of weights (all features should have variance = 1) 131 131 this.weights = this.allowedInputVariables 132 .Select(name => 1.0 / dataset.GetDoubleValues(name, rows).StandardDeviationPop()) 132 .Select(name => { 133 var pop = dataset.GetDoubleValues(name, rows).StandardDeviationPop(); 134 return pop.IsAlmost(0) ? 1.0 : 1.0/pop; 135 }) 133 136 .Concat(new double[] { 1.0 }) // no scaling for target variable 134 137 .ToArray();
Note: See TracChangeset
for help on using the changeset viewer.