Changeset 9208 for trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/UCI/UCIInstanceProvider.cs
- Timestamp:
- 02/06/13 12:30:13 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Problems.Instances.DataAnalysis/3.3/Classification/UCI/UCIInstanceProvider.cs
r8903 r9208 46 46 47 47 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 48 List< IUCIDataDescriptor> descriptorList = new List<IUCIDataDescriptor>();48 List<UCIDataDescriptor> descriptorList = new List<UCIDataDescriptor>(); 49 49 descriptorList.Add(new Iris()); 50 50 descriptorList.Add(new Mammography()); … … 53 53 descriptorList.Add(new Vertebral_3C()); 54 54 descriptorList.Add(new Wine()); 55 descriptorList.Add(new WisconsinDiagnosticBreastCancer()); 55 56 var solutionsArchiveName = GetResourceName(FileName + @"\.zip"); 56 57 if (!String.IsNullOrEmpty(solutionsArchiveName)) { … … 62 63 } 63 64 foreach (var entry in entries.OrderBy(x => x)) { 64 string prettyName = Path.GetFileNameWithoutExtension(entry);65 IUCIDataDescriptor desc = descriptorList.Where(x => x.Name.Equals(prettyName)).FirstOrDefault();65 string filename = Path.GetFileNameWithoutExtension(entry); 66 UCIDataDescriptor desc = descriptorList.Where(x => x.Filename.Equals(filename)).FirstOrDefault(); 66 67 if (desc != null) { 67 prettyName = String.Format("{0}, {1}, {2}", prettyName, desc.Donor, desc.Year);68 yield return new ResourceClassificationDataDescriptor(prettyName, desc.Description, entry);68 desc.ResourceName = entry; 69 yield return desc; 69 70 } else 70 yield return new ResourceClassificationDataDescriptor(prettyName, Description, entry);71 throw new ArgumentNullException("No Descriptor could be found for this entry."); 71 72 } 72 73 }
Note: See TracChangeset
for help on using the changeset viewer.