AI-multimodal / aimmdb

BSD 3-Clause "New" or "Revised" License
0 stars 10 forks source link

Add averaging operator to postprocessing #49

Open CharlesC30 opened 1 year ago

CharlesC30 commented 1 year ago

Eli's next request is to add an operator to postprocessing for averaging data from multiple aimmdb entries. This operator should take an arbitrary number of entries as input and return a new entry with the averaged data, and metadata that points to the original unaveraged data.

@x94carbone I noticed all the currently defined operators use the UnaryOperator class. Is there any abstraction defined for operators that take multiple inputs?

matthewcarbone commented 1 year ago

@CharlesC30

I noticed all the currently defined operators use the UnaryOperator class. Is there any abstraction defined for operators that take multiple inputs?

Nope! We need to make one 👍

CharlesC30 commented 1 year ago

@x94carbone I came up with this MultiOperator abstraction by modifying the UnaryOperator class. I am still working on the averaging operator itself but let me know if this looks alright so far. The one thing I am wondering is if this should also be able to operate on the Node class.

https://github.com/CharlesC30/aimmdb/blob/3664eaa08f9e876dd1d947e06157a5f2977a63b7/aimmdb/postprocessing/operations.py#L105-L163

matthewcarbone commented 1 year ago

@CharlesC30 great, thank you! Can you open a PR for this? We can discuss there. Totally fine if it's still a WIP.

CharlesC30 commented 1 year ago

@x94carbone sure! I just created the PR. Not sure why but it included several commits from when I was working on the NormalizeLarch scheme, so just the most recent few commits are related to this.