gwlearn.search.BandwidthSearch

gwlearn.search.BandwidthSearch#

class gwlearn.search.BandwidthSearch(model, fixed=False, kernel='bisquare', n_jobs=-1, search_method='golden_section', criterion='aic', min_bandwidth=None, max_bandwidth=None, interval=None, max_iterations=100, tolerance=0.01, verbose=False, **kwargs)[source]#

Optimal bandwidth search for geographically-weighted models

Minimises one of AIC, AICc, BIC based on prediction probability on focal geometries.

Parameters:
modelmodel class

Scikit-learn model class

fixedbool, optional

True for distance based bandwidth and False for adaptive (nearest neighbor) bandwidth, by default False

kernelstr, optional

type of kernel function used to weight observations, by default “bisquare”

n_jobsint, optional

The number of jobs to run in parallel. -1 means using all processors by default -1

fit_global_modelbool, optional

Determines if the global baseline model shall be fitted alognside the g eographically weighted.

**kwargs

Additional keyword arguments passed to model initialisation

__init__(model, fixed=False, kernel='bisquare', n_jobs=-1, search_method='golden_section', criterion='aic', min_bandwidth=None, max_bandwidth=None, interval=None, max_iterations=100, tolerance=0.01, verbose=False, **kwargs)[source]#

Methods

__init__(model[, fixed, kernel, n_jobs, ...])

fit(X, y, geometry)

fit(X, y, geometry)[source]#