mehaksachdeva's Blog

Coding week #7

mehaksachdeva
Published: 07/16/2019

What did I do this week?

This week I debugged the issues being faced around the miscalculation of the three performance parameters (AIC, AICc and BIC) for the Poisson model. The parameters are as expected now and follow the expected trend. I also added other parameter checks to the Monte Carlo experiment (such as betas, performance parameters etc.). A complete notebook enlisting links to all the notebooks  within the Poisson MGWR model was made to make it easier to follow the completeness of the project. I am maintaining the Pull request for the simulated data example for Poisson MGWR and added the updated code to the PR (https://github.com/pysal/mgwr/pull/60 ).

What is coming up next?

In the coming week I will work on testing the Binomial MGWR model with simulated data and finalize the approach for the Binomial model. I will also begin to understand the prediction part of the code to begin the third part of the project.

Did I get stuck anywhere?

The debugging of the parameters required going back to literature for the local scoring algorithm weights and add that to the existing code. It was challenging yet fun to understand the optimizations applied to the current code and I learnt a great deal from it.

Looking forward to the progress update next week!

View Blog Post

Coding week #6

mehaksachdeva
Published: 07/11/2019

What did I do this week?

This week I constructed a Monte Carlo experiment design to test the parameters from the Poisson MGWR model. The model was designed to create a random sample for the independent variables, construct dependent variables for Poisson distribution and run the model for 1000 iterations. The results from the experiment were plotted in a notebook and analysed and follow the expected trend. I am maintaining the Pull request for the simulated data example for Poisson MGWR and added the experiment design code to the PR for reference (https://github.com/pysal/mgwr/pull/60 ).

What is coming up next?

In the coming week I will work on testing the Binomial MGWR model with simulated data and finalize the approach for the Binomial model. I will also work on understanding and debugging an issue that is being encountered in the calculation of three performance parameters of the model. It is expected to make the Binomial model convergence simpler too.

Did I get stuck anywhere?

The Monte Carlo design experiment was time consuming and computationally intensive. This issue was resolved using parallel computing techniques that though took a little time to implement, it in turn sped up the process manifold.

Looking forward to the progress update next week!

View Blog Post

Coding week #5

mehaksachdeva
Published: 07/04/2019

What did I do this week?

This week I tested the Binomial MGWR model using a simulated dataset with three cases - single independent variable, multiple independent variables and a global model to check with the Binomial global model. The test results compared to the existing GWR model but the bandwidths observed were not as expected for both. The scores for AIC, AICc and BIC were similar for the MGWR model as for the GWR model. After theoretical research on Binomial GAMs, I concluded that the approach was in sync with the theory and should result in comparable results. I also edited the Poisson model tests and example notebooks this week. I also performed a Monte Carlo simulation for it to test the output distribution of the parameters. The binomial model though on track, needs further exploration and resolution of a few outstanding tasks. I am maintaining the Pull request for the simulated data example for Poisson MGWR and the code base changes to accommodate these models (https://github.com/pysal/mgwr/pull/60 ).

What is coming up next?

In the coming week I will work on testing the Binomial MGWR model with simulated data and finalize the approach for the Binomial model. I will also plan for the next part of the project which is to enable predictions from the model at unsampled locations and think about how to introduce that functionality.

Did I get stuck anywhere?

No major issues were encountered in testing the Poisson and Binomial model using simulated data this week. The results were as expected and comparable to the GWR and global models. The Binomial MGWR model still needs more example cases which will be updated till next week.

Looking forward to the progress update next week!

View Blog Post

Coding week #4

mehaksachdeva
Published: 06/25/2019

What did I do this week?

This week I tested the Poisson MGWR model using a simulated dataset with three cases - single independent variable, multiple independent variables and a global model to check with the Poisson global model. The tests performed as expected and the results were all as expected. The scores for AIC, AICc and BIC were a little different from what was expected, but after testing it was realized that the simulated data was not the best use-case for a multiple bandwidth test case. I also tried the Binomial MGWR model this week. Though it ran without errors and converged, the results are not as expected. This model needs further exploration and resolution of a few outstanding tasks. I opened a Pull request for the simulated data example for Poisson MGWR (https://github.com/pysal/mgwr/pull/56 ) and for the code base changes to accommodate these models (https://github.com/pysal/mgwr/pull/57 ).

What is coming up next?

In the coming week I will work on testing the Binomial MGWR model and resolve the issues in the results. I will also plan for the next part of the project which is to enable predictions from the model at unsampled locations and think about how to introduce that functionality.

Did I get stuck anywhere?

No major issues were encountered in testing the Poisson model using simulated data this week. The results were as expected and comparable to the GWR and global models. The Binomial MGWR model still needs further work and resolution of some issues.

Looking forward to the progress update next week!

View Blog Post

Coding week #3

mehaksachdeva
Published: 06/18/2019

What did I do this week?

This week I was able to make changes to the existing functions within the MGWR functionality to accommodate changing the family of the dependent variable to Poisson. The results for a univariate model check using a data-set from the repository gave expected results very similar (difference to the order of 1e-06, which was deemed acceptable in the model) to the already existing Poisson GWR model. The proposed model changes and checks with the existing functions are also provided in a notebook within this open pull request (https://github.com/pysal/mgwr/pull/56).

What is coming up next?

In the coming week I will work on testing this model with simulated data to better enhance understanding of the model performance with multiple variables. Adding on to this, implementation of the MGWR model with logit dependent variables will  be implemented and tested this week.

Did I get stuck anywhere?

No major issues were encountered in implementing the Poisson model functions this week. The results were as expected and promising for further development.

Looking forward to the progress update next week!

View Blog Post