Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
01/28/19 13:41:42 (5 years ago)
Author:
gkronber
Message:

#2520: merged changes from PersistenceOverhaul branch (r16451:16564) into trunk

Location:
trunk
Files:
16 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/HeuristicLab.Algorithms.DataAnalysis

  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4

  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/CosineDistance.cs

    r15583 r16565  
    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) { }
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/DistanceBase.cs

    r15583 r16565  
    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    }
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/EuclideanDistance.cs

    r15583 r16565  
    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) {
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/IDistance.cs

    r15583 r16565  
    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);
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/IndexedItemDistance.cs

    r15583 r16565  
    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);
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/ManhattanDistance.cs

    r15583 r16565  
    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() { }
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/WeightedEuclideanDistance.cs

    r15583 r16565  
    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() {
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/PriorityQueue.cs

    r15583 r16565  
    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.
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/SpacePartitioningTree.cs

    r15583 r16565  
    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.
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/TSNEAlgorithm.cs

    r16071 r16565  
    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.
     
    3131using HeuristicLab.Optimization;
    3232using HeuristicLab.Parameters;
    33 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     33using HEAL.Attic;
    3434using HeuristicLab.PluginInfrastructure;
    3535using HeuristicLab.Problems.DataAnalysis;
     
    4444                                                              "dimensional space to allow visual cluster identification. Implemented similar to: https://lvdmaaten.github.io/tsne/#implementations (Barnes-Hut t-SNE). Described in : https://lvdmaaten.github.io/publications/papers/JMLR_2014.pdf")]
    4545  [Creatable(CreatableAttribute.Categories.DataAnalysis, Priority = 100)]
    46   [StorableClass]
     46  [StorableType("1CE58B5E-C319-4DEB-B66B-994171370B06")]
    4747  public sealed class TSNEAlgorithm : BasicAlgorithm {
    4848    public override bool SupportsPause {
     
    210210    #region Constructors & Cloning
    211211    [StorableConstructor]
    212     private TSNEAlgorithm(bool deserializing) : base(deserializing) { }
     212    private TSNEAlgorithm(StorableConstructorFlag _) : base(_) { }
    213213
    214214    [StorableHook(HookType.AfterDeserialization)]
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/TSNEStatic.cs

    r15583 r16565  
    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.
     
    5959using HeuristicLab.Common;
    6060using HeuristicLab.Core;
    61 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable;
     61using HEAL.Attic;
    6262using HeuristicLab.Random;
    6363
    6464namespace HeuristicLab.Algorithms.DataAnalysis {
    65   [StorableClass]
     65  [StorableType("23E56F69-7AA1-4853-BFEC-7B4DBC346B47")]
    6666  public class TSNEStatic<T> {
    67     [StorableClass]
     67    [StorableConstructor]
     68    protected TSNEStatic(StorableConstructorFlag _) {
     69    }
     70
     71    [StorableType("1878DFC2-5DDF-4BBD-85BA-4A6E19AB59C2")]
    6872    public sealed class TSNEState : DeepCloneable {
    6973      #region Storables
     
    168172
    169173      [StorableConstructor]
    170       public TSNEState(bool deserializing) { }
     174      private TSNEState(StorableConstructorFlag _) { }
    171175
    172176      public TSNEState(IReadOnlyList<T> data, IDistance<T> distance, IRandom random, int newDimensions, double perplexity,
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/TSNEUtils.cs

    r15583 r16565  
    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.
  • trunk/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/VantagePointTree.cs

    r15583 r16565  
    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.
Note: See TracChangeset for help on using the changeset viewer.