mgwr.sel_bw.Sel_BW

Sel_BW.search(self, search_method='golden_section', criterion='AICc', bw_min=None, bw_max=None, interval=0.0, tol=1e-06, max_iter=200, init_multi=None, tol_multi=1e-05, rss_score=False, max_iter_multi=200, multi_bw_min=[None], multi_bw_max=[None], bws_same_times=3, pool=None, verbose=False)[source]

Method to select one unique bandwidth for a gwr model or a bandwidth vector for a mgwr model.

Parameters
criterionstring

bw selection criterion: ‘AICc’, ‘AIC’, ‘BIC’, ‘CV’

search_methodstring

bw search method: ‘golden’, ‘interval’

bw_minfloat

min value used in bandwidth search

bw_maxfloat

max value used in bandwidth search

multi_bw_minlist

min values used for each covariate in mgwr bandwidth search. Must be either a single value or have one value for each covariate including the intercept

multi_bw_maxlist

max values used for each covariate in mgwr bandwidth search. Must be either a single value or have one value for each covariate including the intercept

intervalfloat

interval increment used in interval search

tolfloat

tolerance used to determine convergence

max_iterinteger

max iterations if no convergence to tol

init_multifloat

None (default) to initialize MGWR with a bandwidth derived from GWR. Otherwise this option will choose the bandwidth to initialize MGWR with.

tol_multiconvergence tolerence for the multiple bandwidth

backfitting algorithm; a larger tolerance may stop the algorith faster though it may result in a less optimal model

max_iter_multimax iterations if no convergence to tol for multiple

bandwidth backfitting algorithm

rss_scoreTrue to use the residual sum of sqaures to evaluate

each iteration of the multiple bandwidth backfitting routine and False to use a smooth function; default is False

bws_same_timesIf bandwidths keep the same between iterations for

bws_same_times (default 3) in backfitting, then use the current set of bandwidths as final bandwidths.

poolA multiprocessing Pool object to enbale parallel fitting;

default is None

verboseBoolean

If true, bandwidth searching history is printed out; default is False.

Returns
bwscalar or array

optimal bandwidth value or values; returns scalar for multi=False and array for multi=True; ordering of bandwidths matches the ordering of the covariates (columns) of the designs matrix, X