Skip to content

Python script for hybrid inference on City10000 dataset#2019

Merged
varunagrawal merged 21 commits intodevelopfrom
city10000-py
Feb 9, 2025
Merged

Python script for hybrid inference on City10000 dataset#2019
varunagrawal merged 21 commits intodevelopfrom
city10000-py

Conversation

@varunagrawal
Copy link
Copy Markdown
Contributor

@varunagrawal varunagrawal commented Feb 9, 2025

Wrapped a bunch of methods and recreated the script Hybrid_City10000.cpp as HybridCity10000.py.

I get a similar final error:
Final error: 0.6931471805599453
and a similar total time:
Total time: 21.018189191818237 seconds

Please see the results of this new script below.

hybrid_city10000_py

Update: I added a python script for plotting the results. It takes an arbitrary number of estimate files (.txt) but needs a corresponding number of labels and colors associated.

@varunagrawal varunagrawal requested a review from dellaert February 9, 2025 04:32
@varunagrawal varunagrawal self-assigned this Feb 9, 2025
Copy link
Copy Markdown
Member

@dellaert dellaert left a comment

Choose a reason for hiding this comment

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

Cool. I’d undo the std::move changes though. Just adding. Constructor should low you to wrap.

HybridValues delta = bayesNet->optimize();
initial_ = initial_.retract(delta.continuous());
smoother_.reInitialize(std::move(*bayesNet));
smoother_.reInitialize(*bayesNet);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Why? Seems appropriate here

*/
void reInitialize(HybridBayesNet&& hybridBayesNet) {
hybridBayesNet_ = std::move(hybridBayesNet);
void reInitialize(HybridBayesNet& hybridBayesNet) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Just add another non && constructor rather than deleting this one?

@varunagrawal varunagrawal merged commit 82fcedf into develop Feb 9, 2025
@varunagrawal varunagrawal deleted the city10000-py branch February 9, 2025 18:42
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