Changeset 15865 for branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs
- Timestamp:
- 03/27/18 15:46:12 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2906_Transformations/HeuristicLab.DataPreprocessing/3.4/Data/PreprocessingData.cs
r15846 r15865 47 47 Name = "Preprocessing Data"; 48 48 49 Transformations = new List< IDataAnalysisTransformation>();49 Transformations = new List<PreprocessingTransformation>(); 50 50 selection = new Dictionary<int, IList<int>>(); 51 51 … … 61 61 TrainingPartition = (IntRange)original.TrainingPartition.Clone(cloner); 62 62 TestPartition = (IntRange)original.TestPartition.Clone(cloner); 63 Transformations = new List< IDataAnalysisTransformation>(original.Transformations.Select(cloner.Clone));63 Transformations = new List<PreprocessingTransformation>(original.Transformations.Select(cloner.Clone)); 64 64 65 65 InputVariables = new List<string>(original.InputVariables); … … 350 350 #region Transformations 351 351 [Storable] 352 public IList< IDataAnalysisTransformation> Transformations { get; protected set; }352 public IList<PreprocessingTransformation> Transformations { get; protected set; } 353 353 #endregion 354 354 … … 414 414 } 415 415 416 // TODO: set fixed constrained (allowed) values 417 foreach (var trans in problemData.Transformations) { 418 var newTrans = new PreprocessingTransformation(variableNames.Select(x => new StringValue(x))) { 419 OriginalVariable = trans.OriginalVariable, 420 TransformedVariable = trans.TransformedVariable, 421 IsApplied = true 422 }; 423 var cloned = (ITransformation)trans.Transformation.Clone(); 424 newTrans.TransformationParameter.ValidValues.Add(cloned); 425 newTrans.Transformation = cloned; 426 Transformations.Add(newTrans); 427 } 428 416 429 TrainingPartition = new IntRange(problemData.TrainingPartition.Start, problemData.TrainingPartition.End); 417 430 TestPartition = new IntRange(problemData.TestPartition.Start, problemData.TestPartition.End); … … 459 472 public IntRange TrainingPartition { get; set; } 460 473 public IntRange TestPartition { get; set; } 461 public IList< IDataAnalysisTransformation> Transformations { get; set; }474 public IList<PreprocessingTransformation> Transformations { get; set; } 462 475 public DataPreprocessingChangedEventType ChangedType { get; set; } 463 476 … … 487 500 TrainingPartition = new IntRange(TrainingPartition.Start, TrainingPartition.End), 488 501 TestPartition = new IntRange(TestPartition.Start, TestPartition.End), 489 Transformations = new List< IDataAnalysisTransformation>(Transformations),502 Transformations = new List<PreprocessingTransformation>(Transformations), 490 503 ChangedType = changedType, 491 504 ChangedColumn = column, … … 682 695 l = 0; 683 696 ir = n - 1; 684 for (; ;) {697 for (; ; ) { 685 698 if (ir <= l + 1) { 686 699 // Active partition contains 1 or 2 elements. … … 707 720 j = ir; 708 721 a = arr[l + 1]; // Partitioning element. 709 for (; ;) { // Beginning of innermost loop.722 for (; ; ) { // Beginning of innermost loop. 710 723 do i++; while (arr[i].CompareTo(a) < 0); // Scan up to find element > a. 711 724 do j--; while (arr[j].CompareTo(a) > 0); // Scan down to find element < a.
Note: See TracChangeset
for help on using the changeset viewer.