RicardoSantos

MathStatisticsKernelFunctions

Library "MathStatisticsKernelFunctions"
TODO: add library description here

uniform(distance, bandwidth) Uniform kernel.
Parameters:
  • distance: float, distance to kernel origin.
  • bandwidth: float, default=1.0, bandwidth limiter to weight the kernel.
Returns: float.

triangular(distance, bandwidth) Triangular kernel.
Parameters:
  • distance: float, distance to kernel origin.
  • bandwidth: float, default=1.0, bandwidth limiter to weight the kernel.
Returns: float.

epanechnikov(distance, bandwidth) Epanechnikov kernel.
Parameters:
  • distance: float, distance to kernel origin.
  • bandwidth: float, default=1.0, bandwidth limiter to weight the kernel.
Returns: float.

quartic(distance, bandwidth) Quartic kernel.
Parameters:
  • distance: float, distance to kernel origin.
  • bandwidth: float, default=1.0, bandwidth limiter to weight the kernel.
Returns: float.

triweight(distance, bandwidth) Triweight kernel.
Parameters:
  • distance: float, distance to kernel origin.
  • bandwidth: float, default=1.0, bandwidth limiter to weight the kernel.
Returns: float.

tricubic(distance, bandwidth) Tricubic kernel.
Parameters:
  • distance: float, distance to kernel origin.
  • bandwidth: float, default=1.0, bandwidth limiter to weight the kernel.
Returns: float.

gaussian(distance, bandwidth) Gaussian kernel.
Parameters:
  • distance: float, distance to kernel origin.
  • bandwidth: float, default=1.0, bandwidth limiter to weight the kernel.
Returns: float.

cosine(distance, bandwidth) Cosine kernel.
Parameters:
  • distance: float, distance to kernel origin.
  • bandwidth: float, default=1.0, bandwidth limiter to weight the kernel.
Returns: float.

logistic(distance, bandwidth) logistic kernel.
Parameters:
  • distance: float, distance to kernel origin.
  • bandwidth: float, default=1.0, bandwidth limiter to weight the kernel.
Returns: float.

sigmoid(distance, bandwidth) Sigmoid kernel.
Parameters:
  • distance: float, distance to kernel origin.
  • bandwidth: float, default=1.0, bandwidth limiter to weight the kernel.
Returns: float.

select(kernel, distance, bandwidth) Kernel selection method.
Parameters:
  • kernel: string, kernel to select. (options="uniform", "triangle", "epanechnikov", "quartic", "triweight", "tricubic", "gaussian", "cosine", "logistic", "sigmoid")
  • distance: float, distance to kernel origin.
  • bandwidth: float, default=1.0, bandwidth limiter to weight the kernel.
Returns: float.
Pine library

In true TradingView spirit, the author has published this Pine code as an open-source library so that other Pine programmers from our community can reuse it. Cheers to the author! You may use this library privately or in other open-source publications, but reuse of this code in a publication is governed by House Rules.

Disclaimer

The information and publications are not meant to be, and do not constitute, financial, investment, trading, or other types of advice or recommendations supplied or endorsed by TradingView. Read more in the Terms of Use.

Want to use this library?

Copy the following line and paste it in your script.