Changeset 10709


Ignore:
Timestamp:
04/02/14 14:28:19 (6 years ago)
Author:
rstoll
Message:
  • Added ManipulationView with Content

presentation logic implemented
manipulation actions for delete xY missing

  • License added to LineChartView
  • ShuffleWithRanges without parameter added to ManipulationLogic (will use training and test partition)
Location:
branches/DataPreprocessing
Files:
3 added
7 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/DataPreprocessingView.cs

    r10672 r10709  
    5959          new FilterContent(filterLogic),
    6060          new TransformationContent(transformationLogic),
     61          new ManipulationContent(manipulationLogic),
    6162          new LineChartContent(lineChartLogic),
    6263          new HistogramContent(histogramLogic)
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/HeuristicLab.DataPreprocessing.Views-3.3.csproj

    r10701 r10709  
    103103      <DependentUpon>LineChartView.cs</DependentUpon>
    104104    </Compile>
     105    <Compile Include="ManipulationView.cs">
     106      <SubType>UserControl</SubType>
     107    </Compile>
     108    <Compile Include="ManipulationView.Designer.cs">
     109      <DependentUpon>ManipulationView.cs</DependentUpon>
     110    </Compile>
    105111    <Compile Include="Plugin.cs" />
    106112    <Compile Include="PreprocessingChartView.cs">
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing.Views/3.3/LineChartView.cs

    r10658 r10709  
    1 using System;
    2 using System.Collections.Generic;
    3 using System.ComponentModel;
    4 using System.Drawing;
    5 using System.Data;
    6 using System.Linq;
    7 using System.Text;
     1#region License Information
     2/* HeuristicLab
     3 * Copyright (C) 2002-2013 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     4 *
     5 * This file is part of HeuristicLab.
     6 *
     7 * HeuristicLab is free software: you can redistribute it and/or modify
     8 * it under the terms of the GNU General Public License as published by
     9 * the Free Software Foundation, either version 3 of the License, or
     10 * (at your option) any later version.
     11 *
     12 * HeuristicLab is distributed in the hope that it will be useful,
     13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
     14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
     15 * GNU General Public License for more details.
     16 *
     17 * You should have received a copy of the GNU General Public License
     18 * along with HeuristicLab. If not, see <http://www.gnu.org/licenses/>.
     19 */
     20#endregion
     21
    822using System.Windows.Forms;
    923using HeuristicLab.Analysis;
    10 using HeuristicLab.Collections;
    11 using HeuristicLab.Core;
    12 using HeuristicLab.Core.Views;
    13 using HeuristicLab.Data;
    1424using HeuristicLab.MainForm;
    1525
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/HeuristicLab.DataPreprocessing-3.3.csproj

    r10698 r10709  
    7272  </ItemGroup>
    7373  <ItemGroup>
     74    <Compile Include="Implementations\ManipulationContent.cs" />
    7475    <Compile Include="Implementations\PreprocessingChartContent.cs" />
    7576    <Compile Include="Implementations\PreprocessingData.cs" />
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/LineChartContent.cs

    r10658 r10709  
    2525
    2626namespace HeuristicLab.DataPreprocessing {
     27
    2728  [Item("LineChart", "Represents the line chart grid.")]
    2829  public class LineChartContent : PreprocessingChartContent {
    2930
    30     public LineChartContent(IChartLogic chartlogic) :base(chartlogic) {
     31    public LineChartContent(IChartLogic chartlogic)
     32      : base(chartlogic) {
    3133    }
    3234
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Implementations/ManipulationLogic.cs

    r10672 r10709  
    181181    }
    182182
     183    public void ShuffleWithRanges() {
     184      ShuffleWithRanges(new[] {
     185        preprocessingData.TestPartition,
     186        preprocessingData.TrainingPartition
     187      });
     188    }
     189
    183190    public void ShuffleWithRanges(IEnumerable<IntRange> ranges) {
    184191      // init random outside loop
     
    186193
    187194      preprocessingData.InTransaction(() => {
    188         // process all given ranges - e.g. TrainingPartition, Trainingpartition
     195        // process all given ranges - e.g. TrainingPartition, TestPartition
    189196        foreach (IntRange range in ranges) {
    190197          List<Tuple<int, int>> shuffledIndices = new List<Tuple<int, int>>();
    191198
    192199          // generate random indices used for shuffeling each column
    193           for (int i = range.End; i > range.Start; --i) {
     200          for (int i = range.End - 1; i >= range.Start; --i) {
    194201            int rand = random.Next(range.Start, i);
    195202            shuffledIndices.Add(new Tuple<int, int>(i, rand));
  • branches/DataPreprocessing/HeuristicLab.DataPreprocessing/3.3/Interfaces/IManipulationLogic.cs

    r10672 r10709  
    3434    void ReplaceIndicesByValue(IDictionary<int, IList<int>> cells, string value);
    3535    void ReplaceIndicesByValue<T>(int columnIndex, IEnumerable<int> rowIndices, T value);
     36    void ShuffleWithRanges();
    3637    void ShuffleWithRanges(IEnumerable<HeuristicLab.Data.IntRange> ranges);
    3738  }
Note: See TracChangeset for help on using the changeset viewer.