Free cookie consent management tool by TermsFeed Policy Generator

Changeset 14911 for trunk


Ignore:
Timestamp:
05/03/17 09:20:21 (8 years ago)
Author:
gkronber
Message:

#2699: copied kernel ridge regression from branch to trunk

Location:
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4
Files:
3 edited
2 copied

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/HeuristicLab.Algorithms.DataAnalysis-3.4.csproj

    r14862 r14911  
    240240    <Compile Include="Interfaces\ISupportVectorMachineSolution.cs" />
    241241    <Compile Include="Interfaces\IDataAnalysisAlgorithm.cs" />
     242    <Compile Include="KernelRidgeRegression\KernelFunctions\CicularKernel.cs" />
     243    <Compile Include="KernelRidgeRegression\KernelFunctions\GaussianKernel.cs" />
     244    <Compile Include="KernelRidgeRegression\KernelFunctions\IKernel.cs" />
     245    <Compile Include="KernelRidgeRegression\KernelFunctions\InverseMultiquadraticKernel.cs" />
     246    <Compile Include="KernelRidgeRegression\KernelFunctions\KernelBase.cs" />
     247    <Compile Include="KernelRidgeRegression\KernelFunctions\MultiquadraticKernel.cs" />
     248    <Compile Include="KernelRidgeRegression\KernelFunctions\PolysplineKernel.cs" />
     249    <Compile Include="KernelRidgeRegression\KernelFunctions\ThinPlatePolysplineKernel.cs" />
     250    <Compile Include="KernelRidgeRegression\KernelRidgeRegression.cs" />
     251    <Compile Include="KernelRidgeRegression\KernelRidgeRegressionModel.cs" />
    242252    <Compile Include="kMeans\KMeansClustering.cs" />
    243253    <Compile Include="kMeans\KMeansClusteringModel.cs" />
     
    325335    <Compile Include="TSNE\Distances\IndexedItemDistance.cs" />
    326336    <Compile Include="TSNE\Distances\InnerProductDistance.cs" />
     337    <Compile Include="TSNE\Distances\ManhattanDistance.cs" />
    327338    <Compile Include="TSNE\Interfaces\IDistance.cs" />
    328339    <Compile Include="TSNE\Interfaces\ISpacePartitioningTree.cs" />
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Distances/DistanceBase.cs

    r14767 r14911  
    2020#endregion
    2121
     22using System.Collections;
    2223using System.Collections.Generic;
    2324using HeuristicLab.Common;
     
    4243    }
    4344
    44     private class DistanceComparer : IComparer<T> {
     45
     46    public double Get(object x, object y) {
     47      return Get((T)x, (T)y);
     48    }
     49
     50    public IComparer GetDistanceComparer(object item) {
     51      return new DistanceComparer((T)item, this);
     52    }
     53
     54    private class DistanceComparer : IComparer<T>, IComparer {
    4555      private readonly T item;
    4656      private readonly IDistance<T> dist;
     
    5464        return dist.Get(x, item).CompareTo(dist.Get(y, item));
    5565      }
     66
     67      public int Compare(object x, object y) {
     68        return Compare((T)x, (T)y);
     69      }
    5670    }
    5771  }
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/TSNE/Interfaces/IDistance.cs

    r14767 r14911  
    2020#endregion
    2121
     22using System.Collections;
    2223using System.Collections.Generic;
    2324using HeuristicLab.Core;
    2425
    2526namespace HeuristicLab.Algorithms.DataAnalysis {
    26   public interface IDistance<in T> : IItem {
     27  public interface IDistance<in T> : IItem, IDistance {
    2728    /// <summary>
    2829    /// Calculates a distance measure between two objects.
     
    4142    IComparer<T> GetDistanceComparer(T item);
    4243  }
     44
     45
     46  public interface IDistance : IItem {
     47    double Get(object x, object y);
     48    IComparer GetDistanceComparer(object item);
     49  }
    4350}
Note: See TracChangeset for help on using the changeset viewer.