Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/24/17 13:17:43 (8 years ago)
Author:
bwerth
Message:

#2699 checked and reformulated gradient functions for kernels

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/RBFRegression/HeuristicLab.Algorithms.DataAnalysis/3.4/RadialBasisFunctions/KernelFunctions/InverseMultiquadraticKernel.cs

    r14872 r14883  
    4646
    4747    protected override double Get(double norm) {
    48       if (Math.Abs(Beta) < double.Epsilon) return 0;
     48      if (Math.Abs(Beta) < double.Epsilon) return double.NaN;
    4949      return 1 / Math.Sqrt(1 + norm * norm / Beta);
    5050    }
     
    5252    protected override double GetGradient(double norm) {
    5353      if (Math.Abs(Beta) < double.Epsilon) return double.NaN;
    54       norm *= norm;
    55       return norm / (2 * Beta * Beta * Math.Pow((norm + Beta) / Beta, 1.5));
     54      return norm * norm / (2 * Beta * Beta * Math.Pow((norm * norm + Beta) / Beta, 1.5));
    5655    }
    5756  }
Note: See TracChangeset for help on using the changeset viewer.