Changeset 15158 for trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4
- Timestamp:
- 07/06/17 13:35:49 (7 years ago)
- Location:
- trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/KernelRidgeRegression/KernelFunctions
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/KernelRidgeRegression/KernelFunctions/CicularKernel.cs
r15156 r15158 41 41 42 42 protected override double Get(double norm) { 43 if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance while Beta is null"); 43 44 var beta = Beta.Value; 44 45 if (Math.Abs(beta) < double.Epsilon) return double.NaN; … … 50 51 // 4*pi*n^3 / (beta^4 * sqrt(1-n^2/beta^2) 51 52 protected override double GetGradient(double norm) { 53 if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance gradient while Beta is null"); 52 54 var beta = Beta.Value; 53 55 if (Math.Abs(beta) < double.Epsilon) return double.NaN; -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/KernelRidgeRegression/KernelFunctions/GaussianKernel.cs
r15156 r15158 44 44 45 45 protected override double Get(double norm) { 46 if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance while Beta is null"); 46 47 var beta = Beta.Value; 47 48 if (Math.Abs(beta) < double.Epsilon) return double.NaN; … … 52 53 //2 * n²/b²* 1/b * exp(-n²/b²) 53 54 protected override double GetGradient(double norm) { 55 if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance gradient while Beta is null"); 54 56 var beta = Beta.Value; 55 57 if (Math.Abs(beta) < double.Epsilon) return double.NaN; -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/KernelRidgeRegression/KernelFunctions/InverseMultiquadraticKernel.cs
r15156 r15158 43 43 44 44 protected override double Get(double norm) { 45 if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance while Beta is null"); 45 46 var beta = Beta.Value; 46 47 if (Math.Abs(beta) < double.Epsilon) return double.NaN; … … 51 52 //n²/(b³(n²/b² + C)^1.5) 52 53 protected override double GetGradient(double norm) { 54 if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance gradient while Beta is null"); 53 55 var beta = Beta.Value; 54 56 if (Math.Abs(beta) < double.Epsilon) return double.NaN; -
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; -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/KernelRidgeRegression/KernelFunctions/PolysplineKernel.cs
r15157 r15158 57 57 58 58 protected override double Get(double norm) { 59 if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance while Beta is null"); 59 60 var beta = Beta.Value; 60 61 if (Math.Abs(beta) < double.Epsilon) return double.NaN; … … 65 66 //-degree/beta * (norm/beta)^degree 66 67 protected override double GetGradient(double norm) { 68 if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance gradient while Beta is null"); 67 69 var beta = Beta.Value; 68 70 if (Math.Abs(beta) < double.Epsilon) return double.NaN; -
trunk/sources/HeuristicLab.Algorithms.DataAnalysis/3.4/KernelRidgeRegression/KernelFunctions/ThinPlatePolysplineKernel.cs
r15157 r15158 56 56 57 57 protected override double Get(double norm) { 58 if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance while Beta is null"); 58 59 var beta = Beta.Value; 59 60 if (Math.Abs(beta) < double.Epsilon) return double.NaN; … … 65 66 // (Degree/beta) * (norm/beta)^Degree * log(norm/beta) 66 67 protected override double GetGradient(double norm) { 68 if (Beta == null) throw new InvalidOperationException("Can not calculate kernel distance while Beta is null"); 67 69 var beta = Beta.Value; 68 70 if (Math.Abs(beta) < double.Epsilon) return double.NaN;
Note: See TracChangeset
for help on using the changeset viewer.