mehaksachdeva's Blog

Coding week #2

mehaksachdeva
Published: 06/11/2019

What did I do this week?

This week I implemented an independent module for the algorithm as hypothesized in the proposal. Though the model ran and the loop converged, the betas and the bandwidths from the model using a single variable did not coincide with the results from the already implemented Geographically Weighted Poisson Regression (GWPR) function. On discussion with the mentors on what could be going wrong, we decided to go forward with a different approach. This approach would entail changing the functions within the MGWR implementation to allow calling the function with the family attribute set to Poisson. This model with one variable is expected to result in the same bandwidth and beta values as from the GWPR model.

What is coming up next?

In the coming week I will work on debugging the implementation of the selector function and the MGWR fit function to allow the family attribute to be set to Poisson. The results from that model will then be checked with the GWPR model results.

Did I get stuck anywhere?

No major issues were encountered in the coding of the algorithm this week. The results were not as expected but it revealed further enhancements in the methodology that need to be made.

Looking forward to the progress update next week!

View Blog Post

Coding week #1

mehaksachdeva
Published: 06/04/2019

What did I do this week?

I started with expanding and understanding a module within the PySAL package that estimates GWR models with Poisson response variables. My initial understanding was that updating and changing the functions while using the core functionality in the module to accommodate parameters from the MGWR model would be the way forward to enable its implementation for the MGWR model. It soon became that this approach would not work for more than one predictor variables in the model. The next approach I attempted was to use the existing functionality in the MGWR module to enable changing the family to Poisson() and implementing the hypothesized algorithm. On a detailed call with the mentors, it was realized that integration within the existing module could be challenging given the current design restricted to only Gaussian response variables for MGWR. Some functions would need to be re-written and new functions to handle parameters differently would be needed to supplement the algorithm and it was suggested that integration could follow once the algorithm is tested and finalized. On a discussion with regard to the algorithm suggested in the proposal it was also realized that the various estimations and updates implemented in the iterations needed to be theoretically checked and stated clearly.

What is coming up next?

In the coming week I will work on coding a separate module calling the functions as needed and creating new functions for implementing some already existing functionality to accommodate the Poisson implementation for MGWR. Once the algorithm is tested and the implementation gives the expected output, I will work toward integrating the algorithm in the package. Alongside, I will also work on rechecking the equations from the proposal to ensure they are theoretically sound and that they read clearly.

Did I get stuck anywhere?

This week I got stuck in a few places which led to an enhanced understanding about the functions, dependencies and module architecture. The attempts to implement the algorithm using the preexisting functions also made the differences between the existing implementation and required changes in the functions to accommodate the new implementation clearer. Detailed discussions with the mentors really helped me through the blocks and led to a defined way forward.

Excited to be learning new things everyday and for the progress update next week!

View Blog Post

Community Bonding Period

mehaksachdeva
Published: 05/29/2019

Hi everyone! My name is Mehak Sachdeva and I am a first year PhD student at Arizona State University. I am very excited to be a part of GSoC and to contribute to the Python Spatial Analysis Library (PySAL) - a library I have used and learnt from tremendously.

The community bonding period went well and it was great to get in touch with the mentors and set up weekly hangout calls for the project. I was able to understand the architecture of the module I will be contributing to and the dependencies that will be a part of the project. The mentors were hands-on and instrumental in defining sub-tasks of the project for the weeks to come to better accomplish results. So far no problems were encountered and the project is expected to follow the timeline stated in the proposal.

Cheers and thanks for reading!

View Blog Post