Changeset 14883 for branches/RBFRegression/HeuristicLab.Algorithms.DataAnalysis/3.4/RadialBasisFunctions/KernelFunctions/InverseMultiquadraticKernel.cs
- Timestamp:
- 04/24/17 13:17:43 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RBFRegression/HeuristicLab.Algorithms.DataAnalysis/3.4/RadialBasisFunctions/KernelFunctions/InverseMultiquadraticKernel.cs
r14872 r14883 46 46 47 47 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; 49 49 return 1 / Math.Sqrt(1 + norm * norm / Beta); 50 50 } … … 52 52 protected override double GetGradient(double norm) { 53 53 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)); 56 55 } 57 56 }
Note: See TracChangeset
for help on using the changeset viewer.