\[\DeclareMathOperator{\erf}{erf}
\DeclareMathOperator{\argmin}{argmin}
\newcommand{\R}{\mathbb{R}}
\newcommand{\n}{\boldsymbol{n}}\]
Module implementing non-parametric regressions using kernel methods.
-
class pyqt_fit.nonparam_regression.NonParamRegression(xdata, ydata, **kwords)[source]
Class performing kernel-based non-parametric regression.
The calculation is split in three parts:
-
N[source]
Number of points in the dataset (set by the fitting)
-
bandwidth[source]
Bandwidth of the kernel.
This is defined as the square root of the covariance matrix
-
covariance[source]
Covariance matrix of the kernel.
It must be of the right dimension!
-
dim[source]
Dimension of the domain (set by the fitting)
-
fit()[source]
Method to call to fit the parameters of the fitting
-
fitted[source]
Check if the fitting needs to be performed.
-
fitted_method[source]
Method actually used after fitting.
The main method may choose to provide a more tuned method during fitting.
-
kernel[source]
Kernel object. Should provide the following methods:
- kernel.pdf(xs)
- Density of the kernel, denoted \(K(x)\)
-
kernel_type[source]
Type of the kernel. The kernel type is a class or function accepting
the dimension of the domain as argument and returning a valid kernel object.
-
lower[source]
Lower bound of the domain for each dimension
-
method[source]
Regression method itself. It should be an instance of the class following the template
pyqt_fit.npr_methods.RegressionKernelMethod.
-
need_fit()[source]
Calling this function will mark the object as needing fitting.
-
set_actual_bandwidth(bandwidth, covariance)[source]
Method computing the bandwidth if needed (i.e. if it was defined by functions)
-
upper[source]
Lower bound of the domain for each dimension
-
xdata[source]
2D array (D,N) with D the dimension of the domain and N the number of points.
-
ydata[source]
1D array (N,) of values for each point in xdata