pysal / spreg

Spatial econometric regression in Python
https://pysal.org/spreg/
Other
66 stars 23 forks source link

Version 1.5 #136

Closed pedrovma closed 2 months ago

pedrovma commented 3 months ago

Version 1.5

This new version of pysal/spreg brings several new features, performance enhancements and bug fixes. The main contributors to this new version are Luc Anselin, Pedro Amaral, Renan Serenini and Lisa Singh.

Updates:

1- Introduction of the DGP module

2- Introduction of new specification tests

3- Impact estimation

4- Endogenous Spatial Regimes estimation

5- A flag to allow for the printing of the table with the coefficients' results and their inference straight in LaTeX format

6- Skater_reg now allows for the estimation of Spatial Lag models with a common spatial lag across regimes. A method adapted from Mojena (1977)'s Rule Two has also been introduced to find the optimal number of regimes for the endogenous spatial regimes models.

7- Several minor performance enhancements and bug fixes.

knaaptime commented 2 months ago

this is great @pedrovma I'm happy to merge this quickly so we can do a release prior to the meta. I presume you don't actually want a full code review :) ? The one thing I can add to this PR is making sure the new functionality is documented. I think most of the changes are to existing functions, so should be picked up by autodoc, but we should add the new functions and classes from dgp to the docs for visibility (is there anything else function/class-level that I missed?)

@jGaboardi do you know why this PR isn't triggering tests?

jGaboardi commented 2 months ago

@jGaboardi do you know why this PR isn't triggering tests?

No... usually it gives a warning if something went wrong in the GHA, but there was actually no change to unittests.yml. So I am not sure at all.

knaaptime commented 2 months ago

looking closer, it looks like the CI has been failing for the last five months, though I don't think it's anything serious. I think there are some precision issues coming from the tests for Test_SUR_error, TestGM_Error_Regimes, and TestGMCombo (I think maybe just cranking down the numpy tolerance?) and it looks like it's having trouble reading the regimes weights file

self.w = libpysal.weights.Queen.from_shapefile(nat.get_path("natregimes.shp"))

pedrovma commented 2 months ago

I have no idea why it suddenly started failing. As you can see, it began after a Bump codecov/codecov-action from 3 to 4:

Screenshot 2024-06-24 at 14 57 00
jGaboardi commented 2 months ago

Failures likely have to do with #126 from October 2023 & #135 from April 2024.

pedrovma commented 2 months ago

Do you know of any way to force-trigger the tests for this PR so I can work on any updated errors?

jGaboardi commented 2 months ago

The workflow is only disabled. You can reenable it here: https://github.com/pysal/spreg/actions

Screenshot 2024-06-24 at 2 14 26 PM
pedrovma commented 2 months ago

Ok, the tests are finally fixed. The failure in this shouldn't be happening as previous functions using the very same line passed.

@knaaptime , please let me know what else is required for this PR. Many thanks!

knaaptime commented 2 months ago

cool, lets merge this. The remaining failure isn't spreg's fault and I can't reproduce in a local 3.11 environment. So lets go with this then debug in a follow up PR, then cut the release