Free cookie consent management tool by TermsFeed Policy Generator

Changeset 3853


Ignore:
Timestamp:
05/20/10 10:21:16 (14 years ago)
Author:
gkronber
Message:

Added views for support vector machine models and support vector regression solutions. #1009

Location:
trunk/sources
Files:
4 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Regression/3.3/HeuristicLab.Problems.DataAnalysis.Regression-3.3.csproj

    r3848 r3853  
    141141      <Name>HeuristicLab.Data-3.3</Name>
    142142    </ProjectReference>
     143    <ProjectReference Include="..\..\HeuristicLab.Encodings.RealVectorEncoding\3.3\HeuristicLab.Encodings.RealVectorEncoding-3.3.csproj">
     144      <Project>{BB6D334A-4BB6-4674-9883-31A6EBB32CAB}</Project>
     145      <Name>HeuristicLab.Encodings.RealVectorEncoding-3.3</Name>
     146    </ProjectReference>
    143147    <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.3\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.3.csproj">
    144148      <Project>{125D3006-67F5-48CB-913E-73C0548F17FA}</Project>
     
    188192      <Project>{70DFD984-B1D9-46FE-8EB7-4DE92D71A9FC}</Project>
    189193      <Name>HeuristicLab.Problems.DataAnalysis-3.3</Name>
     194    </ProjectReference>
     195    <ProjectReference Include="..\..\HeuristicLab.Problems.TestFunctions\3.3\HeuristicLab.Problems.TestFunctions-3.3.csproj">
     196      <Project>{88B9B0E3-344E-4196-82A3-0F9732506FE8}</Project>
     197      <Name>HeuristicLab.Problems.TestFunctions-3.3</Name>
    190198    </ProjectReference>
    191199    <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">
  • trunk/sources/HeuristicLab.Problems.DataAnalysis.Views/3.3/HeuristicLab.Problems.DataAnalysis.Views-3.3.csproj

    r3832 r3853  
    8686    <None Include="HeuristicLabProblemsDataAnalysisViewsPlugin.cs.frame" />
    8787    <None Include="Properties\AssemblyInfo.frame" />
     88    <Compile Include="SupportVectorRegressionSolutionView.cs">
     89      <SubType>UserControl</SubType>
     90    </Compile>
     91    <Compile Include="SupportVectorRegressionSolutionView.Designer.cs">
     92      <DependentUpon>SupportVectorRegressionSolutionView.cs</DependentUpon>
     93    </Compile>
     94    <Compile Include="SupportVectorMachineModelView.cs">
     95      <SubType>UserControl</SubType>
     96    </Compile>
     97    <Compile Include="SupportVectorMachineModelView.Designer.cs">
     98      <DependentUpon>SupportVectorMachineModelView.cs</DependentUpon>
     99    </Compile>
    88100    <Compile Include="EstimatedValuesView.cs">
    89101      <SubType>UserControl</SubType>
  • trunk/sources/HeuristicLab.Problems.DataAnalysis/3.3/SupportVectorMachine/SupportVectorMachineModel.cs

    r3842 r3853  
    4343    public SVM.Model Model {
    4444      get { return model; }
    45       set { model = value; }
     45      set {
     46        if (value != model) {
     47          if (value == null) throw new ArgumentNullException();
     48          model = value;
     49          OnChanged(EventArgs.Empty);
     50        }
     51      }
    4652    }
    4753
     
    5258    public SVM.RangeTransform RangeTransform {
    5359      get { return rangeTransform; }
    54       set { rangeTransform = value; }
     60      set {
     61        if (value != rangeTransform) {
     62          if (value == null) throw new ArgumentNullException();
     63          rangeTransform = value;
     64          OnChanged(EventArgs.Empty);
     65        }
     66      }
    5567    }
     68
     69    public SupportVectorMachineModel()
     70      : base() {
     71    }
     72
     73    #region events
     74    public event EventHandler Changed;
     75    private void OnChanged(EventArgs e) {
     76      var handlers = Changed;
     77      if (handlers != null)
     78        handlers(this, e);
     79    }
     80    #endregion
    5681
    5782    #region persistence
     
    99124
    100125    /// <summary>
    101     ///  Exports the <paramref name="model"/> in string representation to output stream <paramref name="s"/>
     126    ///  Exports the <paramref name="model"/> in string representation to stream <paramref name="s"/>
    102127    /// </summary>
    103128    /// <param name="model">The support vector regression model to export</param>
    104     /// <param name="s">The output stream to export the model to</param>
     129    /// <param name="s">The stream to export the model to</param>
    105130    public static void Export(SupportVectorMachineModel model, Stream s) {
    106131      StreamWriter writer = new StreamWriter(s);
    107132      writer.WriteLine("RangeTransform:");
    108       writer.Flush();
     133      writer.Flush(); 
    109134      using (MemoryStream memStream = new MemoryStream()) {
    110135        SVM.RangeTransform.Write(memStream, model.RangeTransform);
Note: See TracChangeset for help on using the changeset viewer.