gnnwr.utils module

class gnnwr.utils.DIAGNOSIS(weight, x_data, y_data, y_pred)[source]

Bases: object

Diagnosis is the class to calculate the diagnoses of GNNWR/GTNNWR.

Parameters:
  • weight – output of the neural network

  • x_data – the independent variables

  • y_data – the dependent variables

  • y_pred – output of the GNNWR/GTNNWR

AIC()[source]
Returns:

AIC

AICc()[source]
Returns:

AICc

Adjust_R2()[source]
Returns:

Adjust R2 of the result

F1_GNN()[source]
Returns:

F1-test

R2()[source]
Returns:

R2 of the result

RMSE()[source]
Returns:

RMSE of the result

hat()[source]
Returns:

hat matrix

class gnnwr.utils.OLS(dataset, xName: list, yName: list)[source]

Bases: object

OLS is the class to calculate the OLR weights of data.Get the weight by object.params.

Parameters:
  • dataset – Input data

  • xName – the independent variables’ column

  • yName – the dependent variable’s column

class gnnwr.utils.Visualize(data, lon_lat_columns=None, zoom=4)[source]

Bases: object

display_dataset(name='all', y_column=None, colors=None, steps=20, vmin=None, vmax=None)[source]
dot_map(data, lon_column, lat_column, y_column, zoom=4, colors=None, steps=20, vmin=None, vmax=None)[source]
weights_heatmap(data_column, colors=None, steps=20, vmin=None, vmax=None)[source]