Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
07/06/17 13:35:49 (7 years ago)
Author:
bwerth
Message:

#2699 added checks for Beta == null and according exceptions

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/KernelRidgeRegression/KernelFunctions/ThinPlatePolysplineKernel.cs

    r15157 r15158  
    5656
    5757    protected override double Get(double norm) {
     58      if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance while Beta is null");
    5859      var beta = Beta.Value;
    5960      if (Math.Abs(beta) < double.Epsilon) return double.NaN;
     
    6566    // (Degree/beta) * (norm/beta)^Degree * log(norm/beta)
    6667    protected override double GetGradient(double norm) {
     68      if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance while Beta is null");
    6769      var beta = Beta.Value;
    6870      if (Math.Abs(beta) < double.Epsilon) return double.NaN;
Note: See TracChangeset for help on using the changeset viewer.