How to create custom aggregation using FuncAggregator #345
                  
                    
                      xhayden-veic
                    
                  
                
                  started this conversation in
                General
              
            Replies: 1 comment
-
| UPDATE: mean_downsampler = MeanDownsampler() | 
Beta Was this translation helpful? Give feedback.
                  
                    0 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Has anyone successfully been able to incorporate the FuncAggregator class to create their own custom data aggregation? The documentation is limited and simplified, and I've been having a doozy of a time getting it to work properly with my timeseries datasets. Below is my attempt at creating a class that inherits from DataAggregator to create a custom mean aggregation per window. Any examples or suggestions would be a huge help! Doesn't seem to be much customization.
`
class MeanAggregator(DataAggregator):
"""Custom Mean Aggregator for Plotly-Resampler to compute the mean per window."""
mean_aggregator = FuncAggregator(MeanAggregator)
fig = FigureResampler(go.Figure(), default_downsampler=mean_aggregator)
`
Apologies, not sure why the code is showing up a bit disjointed.
Beta Was this translation helpful? Give feedback.
All reactions