- Timestamp:
- 04/02/12 16:36:29 (12 years ago)
- Location:
- branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Classification/3.4
- Files:
-
- 2 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Classification/3.4/ArtificialClassificationDataDescriptor.cs
r7682 r7685 22 22 23 23 using System.Collections.Generic; 24 namespace HeuristicLab.Problems.Instances. Regression {24 namespace HeuristicLab.Problems.Instances.Classification { 25 25 public abstract class ArtificialClassificationDataDescriptor : IDataDescriptor { 26 26 public abstract string Name { get; } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Classification/3.4/ArtificialClassificationInstanceProvider.cs
r7682 r7685 21 21 22 22 23 namespace HeuristicLab.Problems.Instances. Regression {23 namespace HeuristicLab.Problems.Instances.Classification { 24 24 public abstract class ArtificialClassificationInstanceProvider : ClassificationInstanceProvider { 25 25 public override ClassificationData LoadData(IDataDescriptor descriptor) { -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Classification/3.4/ClassificationInstanceProvider.cs
r7682 r7685 27 27 using System.Text; 28 28 29 namespace HeuristicLab.Problems.Instances. Regression {29 namespace HeuristicLab.Problems.Instances.Classification { 30 30 public abstract class ClassificationInstanceProvider : IProblemInstanceProvider<ClassificationData> { 31 31 public ClassificationData LoadData(string path) { -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Classification/3.4/HeuristicLab.Problems.Instances.Classification-3.4.csproj
r7683 r7685 57 57 <Compile Include="Properties\AssemblyInfo.cs" /> 58 58 <Compile Include="ClassificationInstanceProvider.cs" /> 59 <Compile Include="RealWorld\Iris.cs"> 60 <SubType>Code</SubType> 61 </Compile> 62 <Compile Include="RealWorld\Mammography.cs"> 63 <SubType>Code</SubType> 64 </Compile> 59 65 <Compile Include="RealWorld\RealWorldInstanceProvider.cs" /> 60 66 <Compile Include="ResourceClassificationDataDescriptor.cs" /> -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Classification/3.4/RealWorld/RealWorldInstanceProvider.cs
r7682 r7685 21 21 22 22 using System; 23 using System.Collections.Generic; 24 using System.IO; 25 using System.Linq; 26 using ICSharpCode.SharpZipLib.Zip; 23 27 24 namespace HeuristicLab.Problems.Instances. Regression {28 namespace HeuristicLab.Problems.Instances.Classification { 25 29 public class RealWorldInstanceProvider : ResourceClassificationInstanceProvider { 26 30 public override string Name { … … 40 44 41 45 protected override string FileExtension { get { return "RealWorld"; } } 46 47 public override IEnumerable<IDataDescriptor> GetDataDescriptors() { 48 List<IDataDescriptor> descriptorList = new List<IDataDescriptor>(); 49 descriptorList.Add(new Iris()); 50 descriptorList.Add(new Mammography()); 51 var solutionsArchiveName = GetResourceName(FileExtension + @"\.zip"); 52 if (!String.IsNullOrEmpty(solutionsArchiveName)) { 53 using (var solutionsZipFile = new ZipInputStream(GetType().Assembly.GetManifestResourceStream(solutionsArchiveName))) { 54 foreach (var entry in GetZipContents(solutionsZipFile).OrderBy(x => x)) { 55 string prettyName = Path.GetFileNameWithoutExtension(entry); 56 IDataDescriptor desc = descriptorList.Where(x => x.Name.Equals(prettyName)).FirstOrDefault(); 57 if (desc != null) { 58 yield return new ResourceClassificationDataDescriptor(prettyName, desc.Description, entry); 59 } else 60 yield return new ResourceClassificationDataDescriptor(prettyName, Description, entry); 61 } 62 } 63 } 64 } 42 65 } 43 66 } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Classification/3.4/ResourceClassificationDataDescriptor.cs
r7682 r7685 21 21 22 22 23 namespace HeuristicLab.Problems.Instances. Regression {23 namespace HeuristicLab.Problems.Instances.Classification { 24 24 internal class ResourceClassificationDataDescriptor : IDataDescriptor { 25 25 public string Name { get; internal set; } -
branches/ProblemInstancesRegressionAndClassification/HeuristicLab.Problems.Instances.Classification/3.4/ResourceClassificationInstanceProvider.cs
r7682 r7685 28 28 using ICSharpCode.SharpZipLib.Zip; 29 29 30 namespace HeuristicLab.Problems.Instances. Regression {30 namespace HeuristicLab.Problems.Instances.Classification { 31 31 public abstract class ResourceClassificationInstanceProvider : ClassificationInstanceProvider { 32 32
Note: See TracChangeset
for help on using the changeset viewer.