add summary feature nodedefinition#797
Conversation
| time_standardization: float = 1e-3, | ||
| add_counts: bool = False, | ||
| ) -> None: | ||
| """Construct `PercentileClusters`. |
There was a problem hiding this comment.
Reference to wrong class in docstring
| cluster_class.add_counts() | ||
| return torch.tensor(cluster_class.clustered_x) | ||
|
|
||
| def set_indeces(self, feature_names: List[str]) -> None: |
| return graph | ||
|
|
||
|
|
||
| class DOMSummaryFeatures(NodeDefinition): |
There was a problem hiding this comment.
As you point out in the docstring, the method may aggregate information across any defined cluster. To avoid confusion, I think the name of the class should reflect this. It could for example be ClusterSummaryTheo :-)
|
|
||
|
|
||
| class DOMSummaryFeatures(NodeDefinition): | ||
| """Represent DOMs as clusters with summary features. |
ab66a04 to
cfcbe8c
Compare
|
@Aske-Rosted and I talked about some functionality and wanted to change a few small things.
See new feature ranges: |
Aske-Rosted
left a comment
There was a problem hiding this comment.
Two very minor things that you might consider, but otherwise good to go. Looking forward to using it on my end.
| ) | ||
|
|
||
| def _calculate_reference_time(self, time_index: int) -> np.ndarray: | ||
| """Calculate the charge weighted median time of the whole event.""" |
There was a problem hiding this comment.
Should probably say of the node.
There was a problem hiding this comment.
Maybe I do not understand what you mean by node, but I do not agree. The reference time is a weighted median of all pulses in the event, not just those at a single cluster/node. It is important to have a per-event reference point to have the relative time information between the clusters. Am I missing something?
| or inserted at the specified location | ||
| """ | ||
| # Summarize the values at different times | ||
| time_first_pulse = np.nanmin( |
There was a problem hiding this comment.
Could be made to a class feature since it is used in several of the class functions.
Aske-Rosted
left a comment
There was a problem hiding this comment.
Two very minor things that you might consider, but otherwise good to go. Looking forward to using it on my end.
dbef537 to
27800c4
Compare

Adding a new
NodeDefinitoncalledDOMSummaryFeatureswhich is a per DOM summary statistics NodeDefiniton used by different architectures in IceCube. This exact version is taken from Theo Glauchs thesis (https://mediatum.ub.tum.de/node?id=1584755). The reason for this PR is because I heard of other people also using/interested in these type of features.Features of the DOMSummaryFeatures
Here is a visual representation of the feature (more details are in Theos thesis above)
And the numerical ranges of these features:
NOTE: I had to change the clustering utility implemented by @Aske-Rosted in #770 (Therefore the review request) .
add_charge_threshold_summary(changed it so it does not alter the_padded_xattribute anymore)_calculate_charge_sum(change to deal with nans)I also did timing tests:
And some ratios:
Here the NodeDefinitons: