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

Linear regression subpackage added to linear dynamical systems #8

Merged
merged 15 commits into from
May 22, 2024

Conversation

ncguilbeault
Copy link
Collaborator

This PR adds classes and workflows to the Bonsai.ML.LinearDynamicalSystems package to enable the Kalman filter to perform online linear regression. Additionally, several new visualisers were added to the Bonsai.ML.Visualizers package to allow users to visualise multidimensional arrays using OxyPlot's Heatmap.

Linear Regression Subpackage

3 new Bonsai nodes have been added. The KFModelParameters node provides a class which will create the parameters needed to initialise the Kalman filter as a linear regression model. The GridParameters and MultivariatePDF nodes provide methods to modify and access the python model attributes that relate to the creation of a multivariate distribution.

3 new workflows have also been added. They allow for model creation, Bayesian inference, and computing the multivariate pdf.

Linear Dynamical Systems Package

2 new nodes were added for manipulating 2D multidimensional arrays of double. The Slice operator will subsample an array using the specified start/stop indices of the desired columns/rows. The Reshape operator allows multidimensional arrays to be reshaped into a different number of rows/columns.

Visualizers Package

The HeatMapSeriesOxyPlotBase class provides underlying access to the HeatMapSeries from the OxyPlot package. Both the MultivariatePDFVisualizer and the MultidimensionalArrayVisualizer utilise this base class for visualising data.

@ncguilbeault ncguilbeault requested a review from glopesdev March 25, 2024 12:05
@ncguilbeault ncguilbeault changed the title Linear regression Linear regression added to linear dynamical systems package Mar 25, 2024
@ncguilbeault ncguilbeault changed the title Linear regression added to linear dynamical systems package Linear regression subpackage added to linear dynamical systems package Mar 25, 2024
@ncguilbeault ncguilbeault changed the title Linear regression subpackage added to linear dynamical systems package Linear regression subpackage added to linear dynamical systems Mar 25, 2024
Copy link
Member

@glopesdev glopesdev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks really nice overall, just went through everything and found a few inconsistencies on documentation, formatting and possibly naming and design conventions. Otherwise all good!

@ncguilbeault
Copy link
Collaborator Author

Thanks a lot for your feedback @glopesdev. I've implemented essentially all of your suggestions and pushed them as new commits.

@glopesdev glopesdev merged commit 26c0624 into main May 22, 2024
2 checks passed
@glopesdev glopesdev deleted the linear-regression branch May 22, 2024 12:41
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.

2 participants