- Timestamp:
- 05/18/11 11:08:26 (14 years ago)
- Location:
- branches/PersistenceSpeedUp
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceSpeedUp
- Property svn:mergeinfo changed
/trunk/sources (added) merged: 6207-6209,6223
- Property svn:mergeinfo changed
-
branches/PersistenceSpeedUp/HeuristicLab.Problems.DataAnalysis
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis (added) merged: 6223
- Property svn:mergeinfo changed
-
branches/PersistenceSpeedUp/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Classification/ClassificationProblemData.cs
r6186 r6232 37 37 private const string ClassNamesParameterName = "ClassNames"; 38 38 private const string ClassificationPenaltiesParameterName = "ClassificationPenalties"; 39 private const int MaximumNumberOfClass = 100;39 private const int MaximumNumberOfClasses = 20; 40 40 private const int InspectedRowsToDetermineTargets = 500; 41 41 … … 266 266 267 267 private static IEnumerable<string> CheckVariablesForPossibleTargetVariables(Dataset dataset) { 268 int maxSamples = Math.Min(InspectedRowsToDetermineTargets, dataset.Rows); 268 269 var validTargetVariables = from v in dataset.VariableNames 269 let DistinctValues = dataset.Rows > InspectedRowsToDetermineTargets ? dataset.GetVariableValues(v, 0, InspectedRowsToDetermineTargets).Distinct().Count() 270 : dataset.GetVariableValues(v).Distinct().Count() 271 where DistinctValues < MaximumNumberOfClass 270 let DistinctValues = dataset.GetVariableValues(v) 271 .Take(maxSamples) 272 .Distinct() 273 .Count() 274 where DistinctValues < MaximumNumberOfClasses 272 275 select v; 273 276 274 277 if (!validTargetVariables.Any()) 275 throw new ArgumentException("Import of classification problem data was not successful l, because no target variable was found." +276 " A target variable must have at most " + MaximumNumberOfClass + " distinct values to be applicable to classification.");278 throw new ArgumentException("Import of classification problem data was not successful, because no target variable was found." + 279 " A target variable must have at most " + MaximumNumberOfClasses + " distinct values to be applicable to classification."); 277 280 return validTargetVariables; 278 281 }
Note: See TracChangeset
for help on using the changeset viewer.