Changeset 16388 for branches/2892_LR-prediction-intervals/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs
- Timestamp:
- 12/15/18 12:36:08 (5 years ago)
- Location:
- branches/2892_LR-prediction-intervals
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2892_LR-prediction-intervals
- Property svn:ignore
-
old new 1 *.docstates 2 *.psess 3 *.resharper 4 *.suo 5 *.user 6 *.vsp 7 Doxygen 8 FxCopResults.txt 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 11 HeuristicLab 3.3.5.1.ReSharper.user 12 HeuristicLab 3.3.6.0.ReSharper.user 13 HeuristicLab.4.5.resharper.user 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 16 HeuristicLab.resharper.user 17 ProtoGen.exe 1 18 TestResults 19 _ReSharper.HeuristicLab 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 22 _ReSharper.HeuristicLab.ExtLibs 23 bin 24 protoc.exe 25 obj 26 .vs
-
- Property svn:mergeinfo changed
-
Property
svn:global-ignores
set to
*.nuget
packages
- Property svn:ignore
-
branches/2892_LR-prediction-intervals/HeuristicLab.Algorithms.DataAnalysis
- Property svn:mergeinfo changed
-
branches/2892_LR-prediction-intervals/HeuristicLab.Algorithms.DataAnalysis/3.4
- Property svn:mergeinfo changed
-
branches/2892_LR-prediction-intervals/HeuristicLab.Algorithms.DataAnalysis/3.4/RandomForest/RandomForestModel.cs
r15583 r16388 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) { … … 310 328 public static RandomForestModel CreateClassificationModel(IClassificationProblemData problemData, int nTrees, double r, double m, int seed, 311 329 out double rmsError, out double outOfBagRmsError, out double relClassificationError, out double outOfBagRelClassificationError) { 312 return CreateClassificationModel(problemData, problemData.TrainingIndices, nTrees, r, m, seed, 330 return CreateClassificationModel(problemData, problemData.TrainingIndices, nTrees, r, m, seed, 313 331 out rmsError, out outOfBagRmsError, out relClassificationError, out outOfBagRelClassificationError); 314 332 } … … 370 388 371 389 private static void AssertInputMatrix(double[,] inputMatrix) { 372 if (inputMatrix.C ast<double>().Any(x => Double.IsNaN(x) || Double.IsInfinity(x)))390 if (inputMatrix.ContainsNanOrInfinity()) 373 391 throw new NotSupportedException("Random forest modeling does not support NaN or infinity values in the input dataset."); 374 392 }
Note: See TracChangeset
for help on using the changeset viewer.