Changeset 14883 for branches/RBFRegression/HeuristicLab.Algorithms.DataAnalysis/3.4/RadialBasisFunctions/KernelFunctions/CicularKernel.cs
- Timestamp:
- 04/24/17 13:17:43 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RBFRegression/HeuristicLab.Algorithms.DataAnalysis/3.4/RadialBasisFunctions/KernelFunctions/CicularKernel.cs
r14872 r14883 47 47 48 48 protected override double Get(double norm) { 49 if (norm >= Beta || Math.Abs(Beta) < double.Epsilon) return 0; 49 if (Math.Abs(Beta) < double.Epsilon) return double.NaN; 50 if (norm >= Beta) return 0; 50 51 var d = norm / Beta; 51 52 return Math.Acos(-d) - d * Math.Sqrt(1 - d * d) - Math.PI / 2; … … 53 54 54 55 protected override double GetGradient(double norm) { 55 if ( Beta <= 0) return double.NaN;56 if (Math.Abs(Beta) < double.Epsilon) return double.NaN; 56 57 if (Beta < norm) return 0; 57 return 2 * norm * Math.Sqrt(Beta * Beta - norm * norm) / (Beta * Beta * Beta);58 return -2*Math.Pow(norm,3)/(Math.Pow(Beta,4)*Math.Sqrt(1-norm*norm/(Beta*Beta))); 58 59 } 59 60 }
Note: See TracChangeset
for help on using the changeset viewer.