Commit Graph

263 Commits

Author SHA1 Message Date
Andy Eschbacher
dd32d45422 small pep8/syntax fixes 2018-02-27 16:12:20 -05:00
Andy Eschbacher
ba875bc50b creates new functions which expose spatial lag 2018-02-27 13:40:28 -05:00
Rafa de la Torre
4a81710749 Upgrade pysal to version 1.14.3
This solves a problem with the Markov analysis. Otherwise, with some
inputs it gives the following error:

```
Analysis A2 failed:
ValueError: operands could not be broadcast together with shapes (5) (3)
```

The stack trace is the following:
```
ERROR:  ValueError: operands could not be broadcast together with shapes (5) (2)
CONTEXT:  Traceback (most recent call last):
  PL/Python function "cdb_spatialmarkovtrend", line 7, in <module>
    return markov.spatial_trend(subquery, time_cols, num_classes, w_type, num_ngbrs, permutations, geom_col, id_col)
  PL/Python function "cdb_spatialmarkovtrend", line 76, in spatial_trend
  PL/Python function "cdb_spatialmarkovtrend", line 416, in __init__
  PL/Python function "cdb_spatialmarkovtrend", line 498, in _mn_test
  PL/Python function "cdb_spatialmarkovtrend", line 526, in _ssmnp_test
PL/Python function "cdb_spatialmarkovtrend"
```

and here is the line where it actually fails:
https://github.com/pysal/pysal/blob/v1.11.2/pysal/spatial_dynamics/markov.py#L526

In v1.14.3, the `shtest` is opt-in. So this gives us a chance to curate data if we wanted to apply that test, optionally, instead of crashing:

https://github.com/pysal/pysal/blob/v1.14.3/pysal/spatial_dynamics/markov.py#L490
2018-02-22 16:15:52 +01:00
Andy Eschbacher
068f43de10 adds test for exception if no data is present 2018-01-09 15:45:03 -05:00
Andy Eschbacher
b0e3f38f1e correctly finds the number of columns 2018-01-09 14:28:20 -05:00
Andy Eschbacher
b16c73f7d0 Merge branch 'develop' into add-nonspatial-kmeans-w-class-framework 2018-01-09 13:47:29 -05:00
Andy Eschbacher
001062f660 adds inertia as an output column 2018-01-09 13:02:55 -05:00
Andy Eschbacher
32bb3b1276 adds missing decorator for gwr_predict 2018-01-09 11:37:27 -05:00
Andy Eschbacher
b4ddfa1c5b Merge branch 'develop' into add-errors-on-null-only 2018-01-09 10:30:50 -05:00
Andy Eschbacher
77e73dbc75 updates error syntax 2018-01-09 10:23:38 -05:00
Javier Goizueta
44511682bc Merge branch 'develop' into test-travis-fix 2017-11-03 15:12:29 +01:00
Andy Eschbacher
2dafc0f80e Merge branch 'master' into taylor_oshan-pysal_gwr 2017-11-02 15:38:54 -04:00
Raul Marin
bd2b190643 Add PIP and NOSETESTS as variables to Makefile.global
This makes it easier to change between pip/pip2 depending on the local environment
2017-10-31 11:38:20 +01:00
Raul Ochoa
d07822c7a0 Fix missing comma for dict creation 2017-02-27 12:07:41 +01:00
Andy Eschbacher
8e4bbb8a90 add default return value on verify_data wrapper 2017-01-13 14:07:31 -05:00
Andy Eschbacher
be2bf19c0a removes print line 2017-01-12 17:14:32 -05:00
Andy Eschbacher
ddd69bb457 adds mock error function 2017-01-12 17:12:40 -05:00
Andy Eschbacher
04bd067045 standardizing naming conventions in code 2017-01-12 17:12:09 -05:00
Andy Eschbacher
4b3481b1a6 adds decorators to reduce boilerplate code 2017-01-12 17:03:01 -05:00
Andy Eschbacher
76f5eae928 quote col names 2017-01-12 16:02:27 -05:00
Andy Eschbacher
7322931ca1 classes to inherit from objects 2017-01-12 12:00:36 -05:00
Andy Eschbacher
7725cada13 tests for gwr predict 2017-01-10 15:53:09 -05:00
Andy Eschbacher
e456158cbf removes unneeded function / multilines some queries 2017-01-10 15:12:24 -05:00
Andy Eschbacher
50f6ef0fcc remove unnecessary code / tests 2017-01-10 15:01:44 -05:00
Andy Eschbacher
ca7a2d6e36 update verify_data to get full data reference 2017-01-10 15:00:59 -05:00
Andy Eschbacher
c114ccea33 add condition on null-valued geometries, ref: #143 2017-01-10 14:38:16 -05:00
Andy Eschbacher
10ce109d09 fix typo on error return 2017-01-10 14:37:07 -05:00
Andy Eschbacher
d679975f72 catch empty return values and error on them 2017-01-10 13:53:37 -05:00
Andy Eschbacher
69f38dd52e change parameter name to align with kmeans.spatial 2017-01-10 09:52:46 -05:00
Andy Eschbacher
c6f64ad2f4 bug fixes and adding of internal docs 2017-01-10 09:49:16 -05:00
Andy Eschbacher
0815db4661 move floats to numpy floats 2017-01-09 16:28:00 -05:00
Andy Eschbacher
0f24a4d35a adds framework for testing predict 2017-01-09 16:04:38 -05:00
Andy Eschbacher
25f1fc2b28 fix bug on output of predicted values with wrong id 2017-01-09 15:48:43 -05:00
Andy Eschbacher
0007082efe finishes python tests for regression 2017-01-09 10:00:44 -05:00
Andy Eschbacher
87890926ad adding back filter t-vals lost in commit squash 2017-01-09 14:12:22 +00:00
Andy Eschbacher
00567e5272 update date, correct col information and order 2017-01-06 13:50:23 -05:00
Andy Eschbacher
e39051e958 renaming for consistency 2017-01-06 12:04:41 -05:00
Andy Eschbacher
c782b812d5 stubs out more testing efforts 2017-01-06 12:03:30 -05:00
Andy Eschbacher
521a79ad7f packed with orig coords and deps in correct order 2017-01-06 12:02:50 -05:00
Andy Eschbacher
cdb81ea896 refactor 2017-01-06 10:37:12 -05:00
Andy Eschbacher
d95ca54cdc updating prediction to data provider 2017-01-05 14:22:40 -05:00
Andy Eschbacher
fa3eecb233 test updates 2017-01-05 14:21:46 -05:00
Andy Eschbacher
daf4d5984c first pass at tests 2017-01-05 13:02:36 -05:00
Andy Eschbacher
5735831142 adding fixture files 2017-01-05 13:01:56 -05:00
Andy Eschbacher
b049da4155 switch order of rowid to be last in output signature 2017-01-04 16:36:46 -05:00
Andy Eschbacher
dbee19723e clean up code and loose ends on data provider changes 2017-01-04 14:40:37 -05:00
Andy Eschbacher
fd9d08dfbc Merge branch 'pysal_gwr' of github.com:TaylorOshan/crankshaft into pysal_gwr 2017-01-04 12:09:00 -05:00
Andy Eschbacher
4d75d2cf74 Merge branch 'develop' into pysal_gwr 2017-01-04 12:03:28 -05:00
Andy Eschbacher
e52dd64dad moves gwr to data analysis provider framework 2017-01-04 11:52:44 -05:00
Andy Eschbacher
d404a66d99 Merge branch 'develop' into pysal_gwr 2017-01-04 11:23:02 -05:00