BasisResearch / collab-creatures

Analyzing animal collaboration with Bayesian and causal inference.
4 stars 1 forks source link

Adding documentation to rhf notebook #66

Closed emackev closed 6 months ago

emackev commented 6 months ago

Adding documentation. Questions along the way:

emackev commented 6 months ago

To do: consider adding some explanation how to interpret the coefficient on the visibility parameter

review-notebook-app[bot] commented 6 months ago

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

rfl-urbaniak commented 6 months ago

Why are some values missing in the simulated data? (missing values are subsequently dropped -- I want to provide an explanation why they are missing in the first place)

Can you confirm that how_far_score is highest at the location where the agent actually moved,

Correct for the transformed score, not correct for just how_far, read below.

and drops off exponentially from there,

Not exactly, take a look at the formula in the paper. take a look at the data frame, there should be a few columns whose names start with how_far. If I remember well, how_far itself is ja squared distance, then it is transformed and scaled:

_hf["how_far_squared"] = (_hf["x"] - x_new) ** 2 + (_hf["y"] - y_new) ** 2
            _hf["how_far_squared_scaled"] = (
                -_hf["how_far_squared"]
                / (2 * (sim.step_size_max + sim.visibility_range) ** 2)
                + 1
            )

and is only computed at locations close enough to the agents current location that the agent is able to jump there?

This is computed for all the (sampled) points that the bird considers for the next move, within their visibility. Whether the agent is capable everywhere they can reach with their sight is a separate issue.

consider adding some explanation how to interpret the coefficient on the visibility parameter

Yes, so visiblity is predictive as all agents in this notebook move within their visibility range, to closer (=more visibile) [pomts] more often than the ones that are further.

review-notebook-app[bot] commented 6 months ago

View / edit / reply to this conversation on ReviewNB

rfl-urbaniak commented on 2024-03-12T09:59:11Z ----------------------------------------------------------------

not sure whether double dash shouldn't be replaced with a single one.

interpreted as indicative of how predictive each factor is of agents' ...


emackev commented on 2024-03-12T14:00:32Z ----------------------------------------------------------------

fixed, will push