Changeset 17607


Ignore:
Timestamp:
06/18/20 11:35:45 (4 weeks ago)
Author:
chaider
Message:

#3073 Added classes/views to define constraints

Location:
branches/3073_IA_constraint_splitting
Files:
7 added
4 edited

Legend:

Unmodified
Added
Removed
  • branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r17591 r17607  
    315315      <DependentUpon>IntervalCollectionView.cs</DependentUpon>
    316316    </Compile>
     317    <Compile Include="IntervalConstraintView.cs">
     318      <SubType>UserControl</SubType>
     319    </Compile>
     320    <Compile Include="IntervalConstraintView.Designer.cs">
     321      <DependentUpon>IntervalConstraintView.cs</DependentUpon>
     322    </Compile>
    317323    <Compile Include="MenuItems\ChangeDataOfOptimizersMenuItem.cs" />
    318324    <Compile Include="MenuItems\ShrinkDataAnalysisRunsMenuItem.cs" />
     
    324330    </Compile>
    325331    <Compile Include="Plugin.cs" />
     332    <Compile Include="ProblemDataConstraintView.cs">
     333      <SubType>UserControl</SubType>
     334    </Compile>
     335    <Compile Include="ProblemDataConstraintView.Designer.cs">
     336      <DependentUpon>ProblemDataConstraintView.cs</DependentUpon>
     337    </Compile>
    326338    <Compile Include="ProblemDataView.cs">
    327339      <SubType>UserControl</SubType>
  • branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj

    r17591 r17607  
    190190    <Compile Include="Implementation\Interval\Interval.cs" />
    191191    <Compile Include="Implementation\Interval\IntervalCollection.cs" />
     192    <Compile Include="Implementation\Interval\IntervalConstraint.cs" />
     193    <Compile Include="Implementation\Interval\IntervalConstraintsParser.cs" />
    192194    <Compile Include="Implementation\Regression\ConfidenceBoundRegressionSolution.cs" />
    193195    <Compile Include="Implementation\Regression\ConstantRegressionModel.cs" />
     
    303305    <Compile Include="Interfaces\IDataAnalysisModel.cs" />
    304306    <Compile Include="Interfaces\IDataAnalysisProblem.cs" />
     307    <Compile Include="ProblemDataConstraint.cs" />
    305308    <Compile Include="Properties\AssemblyInfo.cs" />
    306309  </ItemGroup>
  • branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs

    r17579 r17607  
    9494      problemData.Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>()));
    9595      problemData.Parameters.Add(new FixedValueParameter<IntervalCollection>(VariableRangesParameterName, "", new IntervalCollection()));
     96      problemData.Parameters.Add(new FixedValueParameter<ProblemDataConstraint>(IntervalConstraintsParameterName, "", new ProblemDataConstraint(problemData)));
    9697      emptyProblemData = problemData;
    9798    }
     
    107108      get => VariableRangesParameter.Value;
    108109    }
     110
     111    public IFixedValueParameter<ProblemDataConstraint> IntervalConstraintsParameter =>
     112      (IFixedValueParameter<ProblemDataConstraint>) Parameters[IntervalConstraintsParameterName];
     113
     114    public ProblemDataConstraint IntervalConstraints => IntervalConstraintsParameter.Value;
    109115
    110116
     
    140146        Parameters.Add(new FixedValueParameter<IntervalCollection>(VariableRangesParameterName, intervalCollection));
    141147      }
     148
     149      if (!Parameters.ContainsKey(IntervalConstraintsParameterName)) {
     150        Parameters.Add(new FixedValueParameter<ProblemDataConstraint>(IntervalConstraintsParameterName, new ProblemDataConstraint(this)));
     151      }
    142152      RegisterParameterEvents();
    143153    }
     
    169179      var intervalCollection = CalculateDatasetIntervals(this.Dataset);
    170180      Parameters.Add(new FixedValueParameter<IntervalCollection>(VariableRangesParameterName, intervalCollection));
     181      Parameters.Add(new FixedValueParameter<ProblemDataConstraint>(IntervalConstraintsParameterName, new ProblemDataConstraint(this)));
    171182      RegisterParameterEvents();
    172183    }
  • branches/3073_IA_constraint_splitting/HeuristicLab.Problems.DataAnalysis/3.4/Interfaces/Regression/IRegressionProblemData.cs

    r17579 r17607  
    11#region License Information
     2
    23/* HeuristicLab
    34 * Copyright (C) Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     
    1819 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
    1920 */
     21
    2022#endregion
    2123
     
    2830    string TargetVariable { get; set; }
    2931
    30     IntervalCollection VariableRanges { get;}
     32    IntervalCollection    VariableRanges      { get; }
     33    ProblemDataConstraint IntervalConstraints { get; }
    3134
    32     IEnumerable<double> TargetVariableValues { get; }
     35    IEnumerable<double> TargetVariableValues         { get; }
    3336    IEnumerable<double> TargetVariableTrainingValues { get; }
    34     IEnumerable<double> TargetVariableTestValues { get; }
     37    IEnumerable<double> TargetVariableTestValues     { get; }
    3538  }
    3639}
Note: See TracChangeset for help on using the changeset viewer.