Skip to content

Flexibility of prediction #42

@martinfleis

Description

@martinfleis

Our current implementation of predict_proba in BaseClassifier uses the ensemble approach where we build a kernel around a new point, make prediction using all the local models within the bandwidth and get a normalised weighted average. This can be very expensive with large bandwidths.

Georganos et al use a different approach.

For predicting, we fuse the global and local estimates using a weight parameter (a). Fusing the predictions allows us to extract the locally heterogeneous signal (low bias) from the local sub-model and merging it to that of a global model which uses more data (low variance).
...
To predict on new spatial locations, the closest available GRF model is used.

I think we should enhance our prediction in three ways:

The signature could looks something like

predict_proba(
    X, 
    geometry, 
    bandwidth: "nearest" | int | float | None = "nearest",
    global_model_weight:  float = 0,
)

In bandwidth, int or float are interpreted as the new bandwidth, most likely smaller than the original but there's no restriction, None is interpreted as self.bandwidth.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions