Package io.github.ai4ci.abm.riskmodel
Interface Kernel
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
ImmutableKernel
A convolution kernel or filter
-
Method Summary
Modifier and TypeMethodDescriptionstatic Kernel
empty()
static Kernel
from
(int offset, double... values) double[]
Kernel values, offset as required, compared to a convolution this is in reverse order.default double
getDensity
(int offset) get the kernel density value relevant to a point offset from now positive values of the offset are in the past, negative values relate to future data the full range of data is from [ -prospectiveSize(),retrospectiveSize() )int
index of zero point in values. positive values mean that the kernel is 2 sided. zero means only left sided. negatives don't make particular sense but should work consistentlydefault Kernel
normaliseTo
(double sum) default int
how far does this kernel extend in the future (inclusive)?default int
how far in the past does this kernel extend (exclusive)?default Kernel
scale
(double factor) default int
size()
static Kernel
square
(int offset, int length)
-
Method Details
-
getDensity
double[] getDensity()Kernel values, offset as required, compared to a convolution this is in reverse order. The first value in this array is applied to the most recent data point, which may be in the future (prospective). -
getOffset
int getOffset()index of zero point in values. positive values mean that the kernel is 2 sided. zero means only left sided. negatives don't make particular sense but should work consistently -
getDensity
default double getDensity(int offset) get the kernel density value relevant to a point offset from now positive values of the offset are in the past, negative values relate to future data the full range of data is from [ -prospectiveSize(),retrospectiveSize() ) -
prospectiveSize
default int prospectiveSize()how far does this kernel extend in the future (inclusive)? -
retrospectiveSize
default int retrospectiveSize()how far in the past does this kernel extend (exclusive)? -
size
default int size() -
scale
-
normaliseTo
-
from
- Parameters:
offset
- : index of zero point in values. positive values mean that the kernel is 2 sided. zero means only left sided. negatives don't make particular sense but should work consistentlyvalues
-- Returns:
-
empty
-
square
-