Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exponential decay constant #128

Open
rolocampusano opened this issue Oct 15, 2019 · 3 comments
Open

Exponential decay constant #128

rolocampusano opened this issue Oct 15, 2019 · 3 comments

Comments

@rolocampusano
Copy link

Is there a way to change the lambda (exponential decay function) used in the exponential decay option in the aggregate module? I assume this is now set to be 1 by default, but there is no information about this in the docs.

In particular the exponential decay equation is as follow

and the parameter I'm speaking of its called the exponential decay constant, and relates to how fast the decay is over space.

Thanks

@knaaptime
Copy link

you might look into this old example that includes a manual decay function.

not too sure, but you may be able to pass your own function to the current aggregate function. Unfortunately the anything_score utility from that notebook was removed some time ago (any chance we could get that back? 🙏)

@rolocampusano
Copy link
Author

That would be great!! I second the request! :)

@smmaurer
Copy link
Member

Following up on this issue, I tracked down the exponential decay equation.

It's defined in accessibility.cpp#L21-L24: exp(-1*distance/radius) * var. I'm adding this information to the docstring for network.aggregate(), along with some other notes from reading through the code.

Because the math happens on the C++ side, it would be difficult to accept custom decay functions -- but it looks pretty feasible to add more alternatives, or further parameterize them. PRs welcome!

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

No branches or pull requests

3 participants