-
Notifications
You must be signed in to change notification settings - Fork 8
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
Identity basis #282
Identity basis #282
Conversation
… naming convention
…a private method _set_input_independent_sates
Co-authored-by: William F. Broderick <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## development #282 +/- ##
===============================================
+ Coverage 96.13% 97.27% +1.13%
===============================================
Files 34 35 +1
Lines 2642 2750 +108
===============================================
+ Hits 2540 2675 +135
+ Misses 102 75 -27 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this PR is showing the changes from #280 in the diff, do you know why?
Otherwise, these looks generally good, though I think this means we're going to have to go through the existing how-tos ,etc to see where to use the new bases (at least in the head direction tutorial). Can we make an issue for that?
The new how-tos all looks like they match what they are in diataxis, i.e., very short and answering a single question. I think we'll need to go back through the existing ones and update / move them then, and I think we should consider changing the layout of the landing page for them: make the cards smaller, only show the top-level title, which should be very descriptive. This should also be a separate issue.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not do this one using the data from https://nemos--282.org.readthedocs.build/en/282/tutorials/plot_02_head_direction.html? then we can visualize the outputs (and point them to the full tutorial for more details)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
regardless, I think we should visualize the model coefficients we get
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think it requires too much pre-processing for this session. I'll print the coefficients
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also, i would need more explaining about the data, maybe filter a subset of unit and samples... I think it is better to go straight to the point. If we had a sample data which has already a sub-population and a short duration we could load that (like the iris dataset for sklearn)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay, I think this is fine, but it would be nice to think about whether there is a meaningful dataset we could use. because it's nice to plot the coefficients and have them look meaningful.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you are right
Co-authored-by: William F. Broderick <[email protected]>
Co-authored-by: William F. Broderick <[email protected]>
You can directly pass a [`pandas.DataFrame`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) to the | ||
`fit` method, as long as it can be internally converted to a floating-point array. The conversion is handled automatically, | ||
so no additional steps are required on your part. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can directly pass a [`pandas.DataFrame`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) to the | |
`fit` method, as long as it can be internally converted to a floating-point array. The conversion is handled automatically, | |
so no additional steps are required on your part. | |
You can directly pass a [`pandas.DataFrame`](https://pandas.pydata.org/docs/reference/api/pandas.DataFrame.html) to the | |
`fit` method, as long as it can be internally converted to a floating-point array (that means, for example, that you can't have a column whose values are strings). The conversion is handled automatically, by calling `design_df.values`, | |
so no additional steps are required on your part. |
bas = nmo.basis.IdentityEval() + nmo.basis.BSplineEval(5) | ||
|
||
# Compute features | ||
X = bas.compute_features(design_df, speed) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but it will fail if they try to do use a dataframe with non-numeric values anyway, right?
I agree with both points |
In this PR I add an identity basis function and a basis function that capture raw history.
I added a few how-to guide that showcase the use of these basis for: