Skip to content

Sale price spatial lag configuration#296

Open
connorschwartz wants to merge 1 commit intolarsiusprime:masterfrom
connorschwartz:patch-4
Open

Sale price spatial lag configuration#296
connorschwartz wants to merge 1 commit intolarsiusprime:masterfrom
connorschwartz:patch-4

Conversation

@connorschwartz
Copy link
Copy Markdown

The number of nearest neighbors for spatial lag calculations is configurable for other variables under process.enrich.spatial_lag.fields. Spatial lag for sale price is calculated with different code that currently is not configurable. This PR updates the code so that the sale price spatial lag calculation can be adjusted in a similar way.

Also, if k is less than the number of sales in the training set, the calculation fails. So, we can instead use the minimum of k and the length of the training set.

The number of nearest neighbors for spatial lag calculations is configurable for other variables under process.enrich.spatial_lag.fields. Spatial lag for sale price is calculated with different code that currently is not configurable. This PR updates the code so that the sale price spatial lag calculation can be adjusted in a similar way.

Also, if k is less than the number of sales in the training set, the calculation fails. So, we can instead use the minimum of k and the length of the training set.
@github-actions
Copy link
Copy Markdown
Contributor

Thank you for your contribution.
Please sign our CLA at the following link:
Click here to sign the CLA.
A maintainer will verify your signature and confirm it here by commenting with the following sentence:


I affirm that this contributor has signed the CLA


You can retrigger this bot by commenting recheck in this Pull Request. Posted by the CLA Assistant Lite bot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant