Free cookie consent management tool by TermsFeed Policy Generator

Changeset 1837


Ignore:
Timestamp:
05/15/09 16:31:46 (15 years ago)
Author:
gkronber
Message:

Implemented #627 (Datatypes of SVM should be wrapped into dedicated classes that implement IItem).

Location:
trunk/sources/HeuristicLab.SupportVectorMachines/3.2
Files:
2 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.SupportVectorMachines/3.2/HeuristicLab.SupportVectorMachines-3.2.csproj

    r1819 r1837  
    6565  </ItemGroup>
    6666  <ItemGroup>
     67    <Compile Include="SVMRangeTransform.cs" />
     68    <Compile Include="SVMModel.cs" />
    6769    <Compile Include="HeuristicLabSupportVectorMachinesPlugin.cs" />
    6870    <Compile Include="Properties\AssemblyInfo.cs" />
     
    9092      <Name>HeuristicLab.Data-3.2</Name>
    9193    </ProjectReference>
     94    <ProjectReference Include="..\..\HeuristicLab.GP.StructureIdentification\3.3\HeuristicLab.GP.StructureIdentification-3.3.csproj">
     95      <Project>{74223A32-C726-4978-BE78-37113A18373C}</Project>
     96      <Name>HeuristicLab.GP.StructureIdentification-3.3</Name>
     97    </ProjectReference>
     98    <ProjectReference Include="..\..\HeuristicLab.Operators\3.2\HeuristicLab.Operators-3.2.csproj">
     99      <Project>{A9983BA2-B3B2-475E-8E2C-62050B71D1C5}</Project>
     100      <Name>HeuristicLab.Operators-3.2</Name>
     101    </ProjectReference>
    92102    <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\HeuristicLab.PluginInfrastructure.csproj">
    93103      <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>
    94104      <Name>HeuristicLab.PluginInfrastructure</Name>
     105    </ProjectReference>
     106    <ProjectReference Include="..\..\HeuristicLab.SequentialEngine\3.2\HeuristicLab.SequentialEngine-3.2.csproj">
     107      <Project>{B4BE8E53-BA06-4237-9A01-24255F880201}</Project>
     108      <Name>HeuristicLab.SequentialEngine-3.2</Name>
    95109    </ProjectReference>
    96110    <ProjectReference Include="..\..\LibSVM\LibSVM.csproj">
     
    98112      <Name>LibSVM</Name>
    99113    </ProjectReference>
    100   </ItemGroup>
    101   <ItemGroup>
    102     <Folder Include="SVM\" />
    103114  </ItemGroup>
    104115  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorCreator.cs

    r1827 r1837  
    4848      AddVariableInfo(new VariableInfo("SVMNu", "Nu parameter of nu-SVC, one-class SVM and nu-SVR", typeof(DoubleData), VariableKind.In));
    4949      AddVariableInfo(new VariableInfo("SVMGamma", "Gamma parameter in kernel function", typeof(DoubleData), VariableKind.In));
    50       AddVariableInfo(new VariableInfo("SVMModel", "Represent the model learned by the SVM", typeof(ObjectData), VariableKind.New | VariableKind.Out));
    51       AddVariableInfo(new VariableInfo("SVMRangeTransform", "The applied transformation during the learning the model", typeof(ObjectData), VariableKind.New | VariableKind.Out));
     50      AddVariableInfo(new VariableInfo("SVMModel", "Represent the model learned by the SVM", typeof(SVMModel), VariableKind.New | VariableKind.Out));
     51      AddVariableInfo(new VariableInfo("SVMRangeTransform", "The applied transformation during the learning the model", typeof(SVMRangeTransform), VariableKind.New | VariableKind.Out));
    5252
    5353    }
     
    7777
    7878      //persist variables in scope
    79       ObjectData objectData = new ObjectData();
    80       objectData.Data = model;
    81       scope.AddVariable(new Variable(scope.TranslateName("SVMModel"),objectData));
    82       objectData = new ObjectData();
    83       objectData.Data = rangeTransform;
    84       scope.AddVariable(new Variable(scope.TranslateName("SVMRangeTransform"),objectData));
     79      SVMModel modelData = new SVMModel();
     80      modelData.Data = model;
     81      scope.AddVariable(new Variable(scope.TranslateName("SVMModel"),modelData));
     82      SVMRangeTransform rangeTransformData = new SVMRangeTransform();
     83      rangeTransformData.Data = rangeTransform;
     84      scope.AddVariable(new Variable(scope.TranslateName("SVMRangeTransform"),rangeTransformData));
    8585
    8686      return null;
  • trunk/sources/HeuristicLab.SupportVectorMachines/3.2/SupportVectorEvaluator.cs

    r1810 r1837  
    4040      AddVariableInfo(new VariableInfo("SamplesEnd", "End index of samples in dataset to evaluate", typeof(IntData), VariableKind.In));
    4141
    42       AddVariableInfo(new VariableInfo("SVMModel", "Represent the model learned by the SVM", typeof(ObjectData), VariableKind.In));
    43       AddVariableInfo(new VariableInfo("SVMRangeTransform", "The applied transformation during the learning the model", typeof(ObjectData), VariableKind.In));
     42      AddVariableInfo(new VariableInfo("SVMModel", "Represent the model learned by the SVM", typeof(SVMModel), VariableKind.In));
     43      AddVariableInfo(new VariableInfo("SVMRangeTransform", "The applied transformation during the learning the model", typeof(SVMRangeTransform), VariableKind.In));
    4444
    4545      AddVariableInfo(new VariableInfo("Values", "Target vs predicted values", typeof(ItemList), VariableKind.New | VariableKind.Out));
     
    5454      int end = GetVariableValue<IntData>("SamplesEnd", scope, true).Data;
    5555
    56       SVM.Model model = (SVM.Model)GetVariableValue<ObjectData>("SVMModel", scope, true).Data;
    57       SVM.RangeTransform rangeTransform = (SVM.RangeTransform)GetVariableValue<ObjectData>("SVMRangeTransform", scope, true).Data;
     56      SVM.Model model = GetVariableValue<SVMModel>("SVMModel", scope, true).Data;
     57      SVM.RangeTransform rangeTransform = GetVariableValue<SVMRangeTransform>("SVMRangeTransform", scope, true).Data;
    5858
    5959      SVM.Problem problem = SVMHelper.CreateSVMProblem(dataset, allowedFeatures, targetVariable, start, end);
Note: See TracChangeset for help on using the changeset viewer.