Changeset 16388 for branches/2892_LR-prediction-intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationModel.cs
- Timestamp:
- 12/15/18 12:36:08 (6 years ago)
- Location:
- branches/2892_LR-prediction-intervals
- Files:
-
- 3 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.Problems.DataAnalysis
- Property svn:mergeinfo changed
-
branches/2892_LR-prediction-intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationModel.cs
r15583 r16388 66 66 public abstract IClassificationSolution CreateClassificationSolution(IClassificationProblemData problemData); 67 67 68 public virtual bool IsProblemDataCompatible(IClassificationProblemData problemData, out string errorMessage) { 69 return IsProblemDataCompatible(this, problemData, out errorMessage); 70 } 71 72 public override bool IsProblemDataCompatible(IDataAnalysisProblemData problemData, out string errorMessage) { 73 if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null."); 74 var classificationProblemData = problemData as IClassificationProblemData; 75 if (classificationProblemData == null) 76 throw new ArgumentException("The problem data is not a regression problem data. Instead a " + problemData.GetType().GetPrettyName() + " was provided.", "problemData"); 77 return IsProblemDataCompatible(classificationProblemData, out errorMessage); 78 } 79 80 public static bool IsProblemDataCompatible(IClassificationModel model, IClassificationProblemData problemData, out string errorMessage) { 81 if (model == null) throw new ArgumentNullException("model", "The provided model is null."); 82 if (problemData == null) throw new ArgumentNullException("problemData", "The provided problemData is null."); 83 errorMessage = string.Empty; 84 85 if (model.TargetVariable != problemData.TargetVariable) 86 errorMessage = string.Format("The target variable of the model {0} does not match the target variable of the problemData {1}.", model.TargetVariable, problemData.TargetVariable); 87 88 var evaluationErrorMessage = string.Empty; 89 var datasetCompatible = model.IsDatasetCompatible(problemData.Dataset, out evaluationErrorMessage); 90 if (!datasetCompatible) 91 errorMessage += evaluationErrorMessage; 92 93 return string.IsNullOrEmpty(errorMessage); 94 } 95 68 96 #region events 69 97 public event EventHandler TargetVariableChanged;
Note: See TracChangeset
for help on using the changeset viewer.