This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from sklearn import metrics | |
from sklearn.neighbors import BallTree | |
import numpy, pandas | |
from scipy.optimize import minimize_scalar | |
from scipy import sparse, stats | |
from libpysal.weights import WSP, Kernel | |
from libpysal.weights.util import get_points_array | |
coordinates = numpy.random.normal(0, 1, size=(100, 2)) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
We can't make this file beautiful and searchable because it's too large.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
latitude,longitude,q-score,geometry | |
40.571148,-73.997086,10.854957,POINT (-73.997086 40.571148) | |
40.571148,-73.996719,13.955506,POINT (-73.996719 40.571148) | |
40.571159,-73.995979,11.594976,POINT (-73.99597900000001 40.571159) | |
40.571167,-73.995605,12.206305,POINT (-73.995605 40.571167) | |
40.571175,-73.998177,11.686462,POINT (-73.998177 40.571175) | |
40.571178,-73.994858,11.74865,POINT (-73.99485799999999 40.571178) | |
40.571178,-73.99781,11.360404,POINT (-73.99781 40.571178) | |
40.571186,-73.994476,11.910742,POINT (-73.99447600000001 40.571186) | |
40.571198,-73.993729,11.689811,POINT (-73.993729 40.571198) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy | |
from scipy import sparse | |
from scipy import stats | |
from sklearn.base import BaseEstimator | |
import pysal.lib as lp | |
class losh(BaseEstimator): | |
"""Local spatial heteroscedasticity (LOSH)""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
from scipy.spatial import distance | |
from scipy.special import (entr, rel_entr, kl_div) | |
def entropy(p, q=None): | |
p = np.asarray(p) | |
if p.ndim == 1: | |
p = p.reshape(1,-1) | |
p = p/p.sum(axis=1, keepdims=True) | |
if q is None: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# packages in environment at /home/lw17329/anaconda/envs/ana: | |
# | |
# Name Version Build Channel | |
_r-mutex 1.0.0 mro_2 r | |
affine 2.2.1 py_0 conda-forge | |
appdirs 1.4.3 py37h28b3542_0 | |
asn1crypto 0.24.0 py37_0 | |
atomicwrites 1.1.5 py37_0 | |
atomicwrites 1.1.5 <pip> | |
attrs 18.1.0 py_1 conda-forge |
NewerOlder