Changeset 16586


Ignore:
Timestamp:
02/05/19 10:12:59 (2 weeks ago)
Author:
chaider
Message:

#2971
Added IntervalConstraint Parameter and some fixes

Location:
branches/2971_named_intervals
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Symbolic.Views/3.4/InteractiveSymbolicDataAnalysisSolutionSimplifierView.cs

    r16581 r16586  
    196196      cancellationTokenSource = new CancellationTokenSource();
    197197      var interpreter = new IntervalInterpreter();
     198      //!TODO:
     199      //delete this
     200      //IntervalConstraintsParser parser = new IntervalConstraintsParser();
     201      //var parsed = parser.Parse((Content.ProblemData as RegressionProblemData).IntervalConstraintsParameter.Value.Value);
     202     
    198203
    199204      var impactAndReplacementValues = await Task.Run(() => CalculateImpactAndReplacementValues(tree));
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/HeuristicLab.Problems.DataAnalysis.Views-3.4.csproj

    r16544 r16586  
    518518    <Compile Include="Solution Views\TimeSeriesPrognosisSolutionView.Designer.cs">
    519519      <DependentUpon>TimeSeriesPrognosisSolutionView.cs</DependentUpon>
     520    </Compile>
     521    <Compile Include="TextValueView.cs">
     522      <SubType>UserControl</SubType>
     523    </Compile>
     524    <Compile Include="TextValueView.designer.cs">
     525      <DependentUpon>TextValueView.cs</DependentUpon>
    520526    </Compile>
    521527    <Compile Include="TimeSeriesPrognosis\TimeSeriesPrognosisResidualsLineChartView.cs">
     
    584590      <DependentUpon>NamedIntervalsView.cs</DependentUpon>
    585591    </EmbeddedResource>
     592    <EmbeddedResource Include="TextValueView.resx">
     593      <DependentUpon>TextValueView.cs</DependentUpon>
     594    </EmbeddedResource>
    586595  </ItemGroup>
    587596  <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis.Views/3.4/Regression/NamedIntervalsView.cs

    r16545 r16586  
    6565      base.SetEnabledStateOfControls();
    6666      dataGridView.Enabled = Content != null;
    67       //dataGridView.ReadOnly = ReadOnly;
     67      dataGridView.ReadOnly = ReadOnly;
    6868    }
    6969
     
    119119
    120120    private void dataGridView_CellValidating(object sender, DataGridViewCellValidatingEventArgs e) {
    121       double value;
    122 
    123121      if (dataGridView.Rows[e.RowIndex].IsNewRow) {
    124122        return;
    125123      }
    126124
    127       if (!double.TryParse(e.FormattedValue.ToString(), out value)) {
     125      if (!double.TryParse(e.FormattedValue.ToString(), out var value)) {
    128126        e.Cancel = true;
    129127        dataGridView.Rows[e.RowIndex].ErrorText = "Value must be a double value.";
     
    135133        }
    136134      }
    137      
    138135    }
    139136
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/HeuristicLab.Problems.DataAnalysis-3.4.csproj

    r16426 r16586  
    175175    <Compile Include="Implementation\Interval.cs" />
    176176    <Compile Include="Implementation\NamedIntervals.cs" />
     177    <Compile Include="Implementation\Parser\IntervalConstraint.cs" />
     178    <Compile Include="Implementation\Parser\IntervalConstraintsParser.cs" />
    177179    <Compile Include="Implementation\Regression\ConfidenceBoundRegressionSolution.cs" />
    178180    <Compile Include="Implementation\Regression\ConstantRegressionModel.cs" />
     
    211213    <Compile Include="Interfaces\IDataset.cs" />
    212214    <Compile Include="Interfaces\IDependencyCalculator.cs" />
     215    <Compile Include="Interfaces\ITextValue.cs" />
    213216    <Compile Include="Interfaces\ITransformation.cs" />
    214217    <Compile Include="Interfaces\ITransformationMapper.cs" />
     
    282285    <Compile Include="Implementation\Classification\ThresholdCalculators\NormalDistributionCutPointsThresholdCalculator.cs" />
    283286    <Compile Include="Implementation\Classification\ThresholdCalculators\ThresholdCalculator.cs" />
     287    <Compile Include="TextValue.cs" />
    284288    <None Include="HeuristicLab.snk" />
    285289    <None Include="Plugin.cs.frame" />
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/NamedIntervals.cs

    r16548 r16586  
    1515  public class NamedIntervals : Item {   
    1616    ObservableDictionary<string, Interval> variableIntervals = new ObservableDictionary<string, Interval>();
    17     public ObservableDictionary<string, Interval> VariableIntervals {
    18       get { return variableIntervals; }
    19     }
     17    public ObservableDictionary<string, Interval> VariableIntervals => variableIntervals;
    2018
    2119    [Storable(Name = "StorableIntervalInformation")]
  • branches/2971_named_intervals/HeuristicLab.Problems.DataAnalysis/3.4/Implementation/Regression/RegressionProblemData.cs

    r16549 r16586  
    2323using System.Collections.Generic;
    2424using System.Linq;
     25using System.Net.Mime;
    2526using HeuristicLab.Common;
    2627using HeuristicLab.Core;
     
    3637    protected const string TargetVariableParameterName = "TargetVariable";
    3738    protected const string VariableRangesParameterName = "VariableRanges";
     39    protected const string IntervalConstraintsParameterName = "IntervalConstraints";
    3840    public string Filename { get; set; }
    3941
     
    9496      problemData.Parameters.Add(new ConstrainedValueParameter<StringValue>(TargetVariableParameterName, new ItemSet<StringValue>()));
    9597      problemData.Parameters.Add(new FixedValueParameter<NamedIntervals>(VariableRangesParameterName,"", new NamedIntervals()));
     98      problemData.Parameters.Add(new FixedValueParameter<TextValue>(IntervalConstraintsParameterName, "", new TextValue()));
    9699      emptyProblemData = problemData;
    97100    }
     
    105108      get { return (IFixedValueParameter<NamedIntervals>)Parameters[VariableRangesParameterName]; }
    106109    }
     110
     111    public IFixedValueParameter<TextValue> IntervalConstraintsParameter => (IFixedValueParameter<TextValue>) Parameters[IntervalConstraintsParameterName];
    107112
    108113    public string TargetVariable {
     
    168173
    169174      Parameters.Add(new FixedValueParameter<NamedIntervals>(VariableRangesParameterName, namedIntervals));
     175      Parameters.Add(new FixedValueParameter<TextValue>(IntervalConstraintsParameterName, new TextValue()));
    170176      RegisterParameterEvents();
    171177    }
Note: See TracChangeset for help on using the changeset viewer.