- Timestamp:
- 11/28/18 22:21:11 (6 years ago)
- Location:
- branches/2915-AbsoluteSymbol
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2915-AbsoluteSymbol
-
branches/2915-AbsoluteSymbol/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Algorithms.DataAnalysis merged: 16243
- Property svn:mergeinfo changed
-
branches/2915-AbsoluteSymbol/HeuristicLab.Algorithms.DataAnalysis/3.4
- Property svn:mergeinfo changed
/trunk/HeuristicLab.Algorithms.DataAnalysis/3.4 merged: 16243
- Property svn:mergeinfo changed
-
branches/2915-AbsoluteSymbol/HeuristicLab.Algorithms.DataAnalysis/3.4/NearestNeighbour/NearestNeighbourModel.cs
r16240 r16332 262 262 263 263 264 public bool IsProblemDataCompatible(IRegressionProblemData problemData, out string errorMessage) { 265 return RegressionModel.IsProblemDataCompatible(this, problemData, out errorMessage); 266 } 267 268 public override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) { 269 if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null."); 270 271 var regressionProblemData = problemData as IRegressionProblemData; 272 if (regressionProblemData != null) 273 return IsProblemDataCompatible(regressionProblemData, out errorMessage); 274 275 var classificationProblemData = problemData as IClassificationProblemData; 276 if (classificationProblemData != null) 277 return IsProblemDataCompatible(classificationProblemData, out errorMessage); 278 279 throw new ArgumentException("The problem data is not a regression nor a classification problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData"); 280 } 281 264 282 IRegressionSolution IRegressionModel.CreateRegressionSolution(IRegressionProblemData problemData) { 265 283 return new NearestNeighbourRegressionSolution(this, new RegressionProblemData(problemData)); -
branches/2915-AbsoluteSymbol/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkEnsembleModel.cs
r16240 r16332 130 130 } 131 131 132 133 public bool IsProblemDataCompatible(IRegressionProblemData problemData, out string errorMessage) { 134 return RegressionModel.IsProblemDataCompatible(this, problemData, out errorMessage); 135 } 136 137 public override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) { 138 if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null."); 139 140 var regressionProblemData = problemData as IRegressionProblemData; 141 if (regressionProblemData != null) 142 return IsProblemDataCompatible(regressionProblemData, out errorMessage); 143 144 var classificationProblemData = problemData as IClassificationProblemData; 145 if (classificationProblemData != null) 146 return IsProblemDataCompatible(classificationProblemData, out errorMessage); 147 148 throw new ArgumentException("The problem data is not a regression nor a classification problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData"); 149 } 150 132 151 public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 133 152 return new NeuralNetworkEnsembleRegressionSolution(this, new RegressionEnsembleProblemData(problemData)); -
branches/2915-AbsoluteSymbol/HeuristicLab.Algorithms.DataAnalysis/3.4/NeuralNetwork/NeuralNetworkModel.cs
r16240 r16332 134 134 } 135 135 136 public bool IsProblemDataCompatible(IRegressionProblemData problemData, out string errorMessage) { 137 return RegressionModel.IsProblemDataCompatible(this, problemData, out errorMessage); 138 } 139 140 public override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) { 141 if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null."); 142 143 var regressionProblemData = problemData as IRegressionProblemData; 144 if (regressionProblemData != null) 145 return IsProblemDataCompatible(regressionProblemData, out errorMessage); 146 147 var classificationProblemData = problemData as IClassificationProblemData; 148 if (classificationProblemData != null) 149 return IsProblemDataCompatible(classificationProblemData, out errorMessage); 150 151 throw new ArgumentException("The problem data is not a regression nor a classification problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData"); 152 } 153 136 154 public IRegressionSolution CreateRegressionSolution(IRegressionProblemData problemData) { 137 155 return new NeuralNetworkRegressionSolution(this, new RegressionProblemData(problemData)); -
branches/2915-AbsoluteSymbol/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs
r15786 r16332 286 286 } 287 287 288 public bool IsProblemDataCompatible(IRegressionProblemData problemData, out string errorMessage) { 289 return RegressionModel.IsProblemDataCompatible(this, problemData, out errorMessage); 290 } 291 292 public override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) { 293 if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null."); 294 295 var regressionProblemData = problemData as IRegressionProblemData; 296 if (regressionProblemData != null) 297 return IsProblemDataCompatible(regressionProblemData, out errorMessage); 298 299 var classificationProblemData = problemData as IClassificationProblemData; 300 if (classificationProblemData != null) 301 return IsProblemDataCompatible(classificationProblemData, out errorMessage); 302 303 throw new ArgumentException("The problem data is not a regression nor a classification problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData"); 304 } 305 288 306 public static RandomForestModel CreateRegressionModel(IRegressionProblemData problemData, int nTrees, double r, double m, int seed, 289 307 out double rmsError, out double outOfBagRmsError, out double avgRelError, out double outOfBagAvgRelError) { -
branches/2915-AbsoluteSymbol/HeuristicLab.Algorithms.DataAnalysis/3.4/SupportVectorMachine/SupportVectorMachineModel.cs
r15854 r16332 126 126 return new SupportVectorRegressionSolution(this, new RegressionProblemData(problemData)); 127 127 } 128 #endregion 128 129 public bool IsProblemDataCompatible(IRegressionProblemData problemData, out string errorMessage) { 130 return RegressionModel.IsProblemDataCompatible(this, problemData, out errorMessage); 131 } 132 #endregion 133 134 public override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) { 135 if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null."); 136 137 var regressionProblemData = problemData as IRegressionProblemData; 138 if (regressionProblemData != null) 139 return IsProblemDataCompatible(regressionProblemData, out errorMessage); 140 141 var classificationProblemData = problemData as IClassificationProblemData; 142 if (classificationProblemData != null) 143 return IsProblemDataCompatible(classificationProblemData, out errorMessage); 144 145 throw new ArgumentException("The problem data is not a regression nor a classification problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData"); 146 } 129 147 130 148 #region IClassificationModel Members … … 153 171 } 154 172 #endregion 173 155 174 private IEnumerable<double> GetEstimatedValuesHelper(IDataset dataset, IEnumerable<int> rows) { 156 175 // calculate predictions for the currently requested rows -
branches/2915-AbsoluteSymbol/HeuristicLab.Algorithms.DataAnalysis/3.4/kMeans/KMeansClusteringModel.cs
r15583 r16332 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.Drawing; … … 34 35 [StorableClass] 35 36 [Item("KMeansClusteringModel", "Represents a k-Means clustering model.")] 36 public sealed class KMeansClusteringModel : NamedItem, IClusteringModel {37 public sealed class KMeansClusteringModel : DataAnalysisModel, IClusteringModel { 37 38 public static new Image StaticItemImage { 38 39 get { return HeuristicLab.Common.Resources.VSImageLibrary.Function; } 39 40 } 40 41 41 public IEnumerable<string> VariablesUsedForPrediction {42 public override IEnumerable<string> VariablesUsedForPrediction { 42 43 get { return allowedInputVariables; } 43 44 } … … 84 85 } 85 86 87 public override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) { 88 if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null."); 89 return IsDatasetCompatible(problemData.Dataset, out errorMessage); 90 } 91 86 92 87 93 public IEnumerable<int> GetClusterValues(IDataset dataset, IEnumerable<int> rows) {
Note: See TracChangeset
for help on using the changeset viewer.