Changeset 15158 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/KernelRidgeRegression/KernelFunctions/MultiquadraticKernel.cs
- Timestamp:
- 07/06/17 13:35:49 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/KernelRidgeRegression/KernelFunctions/MultiquadraticKernel.cs
r15156 r15158 36 36 protected MultiquadraticKernel(bool deserializing) : base(deserializing) { } 37 37 38 protected MultiquadraticKernel(MultiquadraticKernel original, Cloner cloner) 39 : base(original, cloner) { } 38 protected MultiquadraticKernel(MultiquadraticKernel original, Cloner cloner) : base(original, cloner) { } 40 39 41 40 public MultiquadraticKernel() { } … … 46 45 47 46 protected override double Get(double norm) { 47 if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance while Beta is null"); 48 48 var beta = Beta.Value; 49 49 if (Math.Abs(beta) < double.Epsilon) return double.NaN; … … 54 54 //-n²/(d³*sqrt(C+n²/d²)) 55 55 protected override double GetGradient(double norm) { 56 if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance gradient while Beta is null"); 56 57 var beta = Beta.Value; 57 58 if (Math.Abs(beta) < double.Epsilon) return double.NaN;
Note: See TracChangeset
for help on using the changeset viewer.