Changeset 16139 for branches/2931_OR-Tools_LP_MIP/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs
- Timestamp:
- 09/13/18 13:18:45 (6 years ago)
- Location:
- branches/2931_OR-Tools_LP_MIP
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2931_OR-Tools_LP_MIP
- Property svn:mergeinfo changed
-
branches/2931_OR-Tools_LP_MIP/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
/branches/2839_HiveProjectManagement/HeuristicLab.Algorithms.DataAnalysis (added) merged: 16057,16092 /trunk/HeuristicLab.Algorithms.DataAnalysis (added) merged: 16071,16086,16117
- Property svn:mergeinfo changed
-
branches/2931_OR-Tools_LP_MIP/HeuristicLab.Algorithms.DataAnalysis/3.4
- Property svn:mergeinfo changed
-
branches/2931_OR-Tools_LP_MIP/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs
r15786 r16139 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.