Estimators Interface
This module contains the estimator definitions and dispatch infrastructure. Each estimator must implement the required interface to integrate with the current framework.
If you are implementing you own estimator, use this API as your reference point for compliance.
The supertype for all estimators is AbstractEstimator, as described below.
ParallelKDE.DensityEstimators.AbstractEstimator — Type
AbstractEstimatorSupertype for all density estimation estimators.
This is the base for all object that are intended to provide a method for estimating the density. They store all the necessary parameters and data for the estimation process.
See also ParallelKDE.AbstractDensityEstimation for the base type where the estimated density is stored.
Estimators need to be registered so that users can access them using a symbol as a name. This is done with:
ParallelKDE.DensityEstimators.add_estimator! — Function
add_estimator!(key::Symbol, value::Type{<:AbstractEstimator})Include a new estimator type into the lookup table.
The function that will be called by the User API to create an estimator is:
ParallelKDE.DensityEstimators.estimate! — Method
estimate!(estimator_name::Symbol, kde::AbstractKDE; kwargs...)Estimate the density of an AbstractKDE object using the specified estimator type.
The estimator_name should be a symbol that corresponds to the key in the estimator_lookup dictionary. Therefore, this is the method that the ParallelKDE.jl API uses to estimate the density.
See add_estimator! for how to add a new estimator type to the lookup table.
which requires the following methods to be implemented for the estimator:
ParallelKDE.DensityEstimators.initialize_estimator — Function
initialize_estimator(::Type{<:AbstractEstimator}, kde::AbstractKDE; kwargs...)Initialize an instance of the given estimator type with the provided KDE object and keyword arguments.
Each estimator type should implement this method to set up its internal state based on the KDE data.
ParallelKDE.DensityEstimators.estimate! — Method
estimate!(estimator_type::AbstractEstimator, kde::AbstractKDE; kwargs...)Defined this way is how each estimator type should implement the estimation process.