Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/19/19 11:05:52 (6 years ago)
Author:
gkronber
Message:

#2847: merged r16565:16796 from trunk/HeuristicLab.Algorithms.DataAnalysis to branch

Location:
branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis

  • branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4

  • branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/CosineDistance.cs

    r16538 r16842  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2424using HeuristicLab.Common;
    2525using HeuristicLab.Core;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HEAL.Attic;
    2727
    2828namespace HeuristicLab.Algorithms.DataAnalysis {
     
    3030  /// The angular distance as defined as a normalized distance measure dependent on the angle between two vectors.
    3131  /// </summary>
    32   [StorableClass]
     32  [StorableType("C87DE522-CB6D-485B-B2F7-6FE79B4E4DC6")]
    3333  [Item("CosineDistance", "The angular distance as defined as a normalized distance measure dependent on the angle between two vectors.")]
    3434  public class CosineDistance : DistanceBase<IEnumerable<double>> {
    3535    #region HLConstructors & Cloning
    3636    [StorableConstructor]
    37     protected CosineDistance(bool deserializing) : base(deserializing) { }
     37    protected CosineDistance(StorableConstructorFlag _) : base(_) { }
    3838    protected CosineDistance(CosineDistance original, Cloner cloner)
    3939      : base(original, cloner) { }
  • branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/DistanceBase.cs

    r16538 r16842  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2424using HeuristicLab.Common;
    2525using HeuristicLab.Core;
    26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HEAL.Attic;
    2727
    2828namespace HeuristicLab.Algorithms.DataAnalysis {
    29   [StorableClass]
     29  [StorableType("58D49402-2AB1-49CF-9AEF-1C599C4B71F7")]
    3030  public abstract class DistanceBase<T> : Item, IDistance<T> {
    3131    #region HLConstructors & Cloning
    3232    [StorableConstructor]
    33     protected DistanceBase(bool deserializing) : base(deserializing) { }
     33    protected DistanceBase(StorableConstructorFlag _) : base(_) { }
    3434    protected DistanceBase(DistanceBase<T> original, Cloner cloner) : base(original, cloner) { }
    3535    protected DistanceBase() { }
     
    4343
    4444    public double Get(object x, object y) {
    45       return Get((T) x, (T) y);
     45      return Get((T)x, (T)y);
    4646    }
    4747
    4848    public IComparer GetDistanceComparer(object item) {
    49       return new DistanceComparer((T) item, this);
     49      return new DistanceComparer((T)item, this);
    5050    }
    5151
     52    [StorableType("35fcecb5-9209-469b-9e4e-82efd8abfddf")]
    5253    internal class DistanceComparer : IComparer<T>, IComparer {
     54      [Storable]
    5355      private readonly T item;
     56      [Storable]
    5457      private readonly IDistance<T> dist;
     58
     59      [StorableConstructor]
     60      protected DistanceComparer(StorableConstructorFlag _) {
     61      }
    5562
    5663      public DistanceComparer(T item, IDistance<T> dist) {
     
    6471
    6572      public int Compare(object x, object y) {
    66         return Compare((T) x, (T) y);
     73        return Compare((T)x, (T)y);
    6774      }
    6875    }
  • branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/EuclideanDistance.cs

    r16538 r16842  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Linq;
    2524using HeuristicLab.Common;
    2625using HeuristicLab.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HEAL.Attic;
    2827
    2928namespace HeuristicLab.Algorithms.DataAnalysis {
    30   [StorableClass]
     29  [StorableType("1D3FE1D5-E524-4DEC-B845-34C940F5BA61")]
    3130  [Item("EuclideanDistance", "A norm function that uses Euclidean distance")]
    3231  public class EuclideanDistance : DistanceBase<IEnumerable<double>> {
    3332    #region HLConstructors & Cloning
    3433    [StorableConstructor]
    35     protected EuclideanDistance(bool deserializing) : base(deserializing) { }
     34    protected EuclideanDistance(StorableConstructorFlag _) : base(_) { }
    3635    protected EuclideanDistance(EuclideanDistance original, Cloner cloner) : base(original, cloner) { }
    3736    public override IDeepCloneable Clone(Cloner cloner) {
  • branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/IDistance.cs

    r16538 r16842  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2222using System.Collections;
    2323using System.Collections.Generic;
     24using HEAL.Attic;
    2425using HeuristicLab.Core;
    2526
    2627namespace HeuristicLab.Algorithms.DataAnalysis {
     28  [StorableType("168066b5-a14b-4d87-b3fb-6bac363e9c98")]
    2729  public interface IDistance<in T> : IDistance {
    2830    /// <summary>
     
    4345  }
    4446
    45 
     47  [StorableType("3e44c812-79ad-404d-95e9-8d9c3467110c")]
    4648  public interface IDistance : IItem {
    4749    double Get(object x, object y);
  • branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/IndexedItemDistance.cs

    r16538 r16842  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2323using HeuristicLab.Common;
    2424using HeuristicLab.Core;
    25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     25using HEAL.Attic;
    2626
    2727namespace HeuristicLab.Algorithms.DataAnalysis {
    28   [StorableClass]
     28  [StorableType("D6D34B11-7618-4F8E-AFC3-3E42DAA1E38C")]
    2929  [Item("IndexedItemDistance", "A distance wrapper for indexed items")]
    3030  internal class IndexedItemDistance<T> : DistanceBase<IndexedItem<T>> {
     
    3333
    3434    #region HLConstructors & Cloning
     35
    3536    [StorableConstructor]
    36     protected IndexedItemDistance(bool deserializing) : base(deserializing) { }
     37    protected IndexedItemDistance(StorableConstructorFlag _) : base(_) {
     38    }
     39
    3740    protected IndexedItemDistance(IndexedItemDistance<T> original, Cloner cloner) : base(original, cloner) {
    3841      dist = cloner.Clone(original.dist);
  • branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/ManhattanDistance.cs

    r16538 r16842  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2222using System;
    2323using System.Collections.Generic;
    24 using System.Linq;
    2524using HeuristicLab.Common;
    2625using HeuristicLab.Core;
    27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     26using HEAL.Attic;
    2827
    2928namespace HeuristicLab.Algorithms.DataAnalysis {
    30   [StorableClass]
     29  [StorableType("65C04216-1441-41EE-91B7-A80B2AD5E332")]
    3130  [Item("ManhattanDistance", "A distance function that uses block distance")]
    3231  public class ManhattanDistance : DistanceBase<IEnumerable<double>> {
    3332    #region HLConstructors & Cloning
    3433    [StorableConstructor]
    35     protected ManhattanDistance(bool deserializing) : base(deserializing) { }
     34    protected ManhattanDistance(StorableConstructorFlag _) : base(_) { }
    3635    [StorableHook(HookType.AfterDeserialization)]
    3736    private void AfterDeserialization() { }
  • branches/2847_M5Regression/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/WeightedEuclideanDistance.cs

    r16538 r16842  
    11#region License Information
    22/* HeuristicLab
    3  * Copyright (C) 2002-2018 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
     3 * Copyright (C) 2002-2019 Heuristic and Evolutionary Algorithms Laboratory (HEAL)
    44 *
    55 * This file is part of HeuristicLab.
     
    2828using HeuristicLab.Data;
    2929using HeuristicLab.Parameters;
    30 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     30using HEAL.Attic;
    3131using HeuristicLab.Problems.DataAnalysis;
    3232
    3333namespace HeuristicLab.Algorithms.DataAnalysis {
    34   [StorableClass]
     34  [StorableType("A660B39D-1B11-459D-98C2-65942E6D375C")]
    3535  [Item("WeightedEuclideanDistance", "A weighted norm function that uses Euclidean distance √(Σ(w[i]²*(p1[i]-p2[i])²))")]
    3636  public class WeightedEuclideanDistance : ParameterizedNamedItem, IDistance<IEnumerable<double>> {
     
    4949    #region HLConstructors & Cloning
    5050    [StorableConstructor]
    51     protected WeightedEuclideanDistance(bool deserializing) : base(deserializing) { }
     51    protected WeightedEuclideanDistance(StorableConstructorFlag _) : base(_) { }
    5252    [StorableHook(HookType.AfterDeserialization)]
    5353    private void AfterDeserialization() {
Note: See TracChangeset for help on using the changeset viewer.