spacenet.pcf.helpers.integrated_poly_finite_kernel#
- spacenet.pcf.helpers.integrated_poly_finite_kernel(r, w, d_1, d_2, delta_r=1, n=2)#
Computes the integrated polynomial kernel function for given distances and bandwidth parameters. The integrated kernel is defined as:
\[L_{i} \left( r \right) = \sum_{e_{nm} \in E} \int_{0}^{w_{nm}} \kappa_{\Delta r, n } \left( | d_{in} + \frac{d_{im} - d_{in}}{w_{nm}}x - r | \right) dx\]The kernel function is integrated over the length of the edge, weighted by the edge weight.
- Parameters:
- rfloat
The distance at which to evaluate the integrated kernel function.
- wnumpy.ndarray
An array of edge weights corresponding to the lengths of the edges in the network.
- d_1numpy.ndarray
An array of distances from the reference node to one endpoint of each edge.
- d_2numpy.ndarray
An array of distances from the reference node to the other endpoint of each edge.
- delta_rfloat, optional
The bandwidth parameter for the polynomial kernel function. Default is 1.
- nint, optional
The exponent parameter for the polynomial kernel function. Default is 2.
- Returns:
- integrated_kernel_valuesnumpy.ndarray
An array of integrated kernel values from node i at all r values.
Notes
See reference paper for details on the derivation of the integrated kernel function and its implementation.