Comments (1)
The solution that worked is - converting all dtypes to object type in data that you pass inside aggregate function, instead of having mixed dtypes like string, int, float etc. You can leave 'y' as-is.
train_orders = train_orders.astype({'ds': 'object',
'country': 'object',
'state': 'object',
'city': 'object',
'county': 'object',
'y': 'int64'})
aggregate(train_orders, spec)
My error -
_Cell In[32], line 118, in aggregate1(df, spec, is_balanced)
116 y_bottom = y_bottom.reshape(len(S_df.columns), len(dates))
117 print(y_bottom.shape)
--> 118 y_bottom_mask = np.isnan(y_bottom)
119 y_agg = Agg @ np.nan_to_num(y_bottom)
120 y_agg_mask = Agg @ y_bottom_mask
File ~/anaconda3/envs/python3/lib/python3.10/site-packages/pandas/core/arrays/masked.py:528, in BaseMaskedArray.array_ufunc(self, ufunc, method, *inputs, **kwargs)
526 for x in inputs:
527 if isinstance(x, BaseMaskedArray):
--> 528 mask |= x._mask
529 inputs2.append(x._data)
530 else:
ValueError: operands could not be broadcast together with shapes (160,) (160,61) (160,)_
from hierarchicalforecast.
Related Issues (20)
- TopDown Approach doesn't raise Exception as expected with `method="forecast_proportions"`
- Test sets includes y as defined
- Exception: min_trace (wls_var) needs covariance matrix to be positive definite. HOT 6
- [utils] aggregate doesn't work correctly with most recent version of the code HOT 1
- `MinTrace` fails for zero-inflated Time Series with `res_methods` in `['wls_var', 'mint_cov', 'mint_shrink']` HOT 2
- Update evaluation example in `README`
- hierarchicalforecast.core - 'list' object has no attribute 'insample' - HOT 2
- Sparse Methods Missing from 0.3.0 HOT 3
- StatsForecast models producing NotImplementedError: tiny datasets in 0.4.0 HOT 5
- MinTraceSparse(nonnegative=True) HOT 1
- [Core][Enhancement]: Add dummies to Aggregate
- Add temporal hierarchies HOT 2
- [Core] not balancing when doing aggregate() HOT 3
- [Core] KaTex parse error: Can't use function '$' in math mode
- Wrong argument name in evaluation section of README
- [utils] HierarchicalPlot is not plotting HOT 1
- TopDown method (proportion_averages, average_proportions) broken in 0.3.0, 0.4.0 and 0.4.1 HOT 6
- TopDown returns NaN HOT 10
- dependency on `quadprog` HOT 6
- [Core] Possible issue with core.py HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hierarchicalforecast.