Free cookie consent management tool by TermsFeed Policy Generator

Changeset 11403 for trunk


Ignore:
Timestamp:
09/29/14 15:02:20 (10 years ago)
Author:
bburlacu
Message:

#2245: The Shuffle method needs a bool parameter to be passed from the view (checkbox whether to shuffle with ranges or not). I combined the three methods into just one method void Shuffle(bool shuffleRangesSeparately).

Location:
trunk/sources
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.DataPreprocessing.Views/3.4/ManipulationView.cs

    r11381 r11403  
    5959        ()=>Content.ManipulationLogic.DeleteRowsWithMissingValuesGreater(getRowsColumnsInfo()),
    6060        ()=>replaceMissingValues(),
    61         ()=>Content.ManipulationLogic.ShuffleWithRanges(shuffleSeparatelyCheckbox.Checked)
     61        ()=>Content.ManipulationLogic.Shuffle(shuffleSeparatelyCheckbox.Checked)
    6262      };
    6363    }
  • trunk/sources/HeuristicLab.DataPreprocessing/3.4/Implementations/ManipulationLogic.cs

    r11380 r11403  
    225225    }
    226226
    227     public void ShuffleWithRanges(bool shuffleRangesSeparately) {
     227    public void Shuffle(bool shuffleRangesSeparately) {
     228      Random random = new Random();
    228229      var ranges = new[] { preprocessingData.TestPartition, preprocessingData.TrainingPartition };
    229       ShuffleWithRanges(ranges, shuffleRangesSeparately);
    230     }
    231 
    232     public void ShuffleWithRanges(IEnumerable<IntRange> ranges, bool shuffleRangesSeparately) {
    233       // init random outside loop
    234       Random random = new Random();
    235 
    236230      if (shuffleRangesSeparately) {
    237231        preprocessingData.InTransaction(() => {
  • trunk/sources/HeuristicLab.DataPreprocessing/3.4/Interfaces/IManipulationLogic.cs

    r11380 r11403  
    3838    void ReplaceIndicesByValue(IDictionary<int, IList<int>> cells, string value);
    3939    void ReplaceIndicesByValue<T>(int columnIndex, IEnumerable<int> rowIndices, T value);
    40     void ShuffleWithRanges(bool shuffleRangesSeparately);
    41     void ShuffleWithRanges(IEnumerable<HeuristicLab.Data.IntRange> ranges, bool shuffleRangesSeparately);
     40    void Shuffle(bool shuffleRangesSeparately);
    4241    List<int> RowsWithMissingValuesGreater(double percent);
    4342    List<int> ColumnsWithMissingValuesGreater(double percent);
Note: See TracChangeset for help on using the changeset viewer.