Giter Club home page Giter Club logo

Comments (1)

Usama-Samad avatar Usama-Samad commented on June 9, 2024

Hello, Im Also getting the same error, can someone please check

**>

dataset = get_dataset("solar_nips", regenerate=False)
dataset.metadata
train_grouper = MultivariateGrouper(max_target_dim=int(dataset.metadata.feat_static_cat[0].cardinality))

test_grouper = MultivariateGrouper(num_test_dates=int(len(dataset.test)/len(dataset.train)),
max_target_dim=int(dataset.metadata.feat_static_cat[0].cardinality))
dataset_train = train_grouper(dataset.train)
dataset_test = test_grouper(dataset.test)**


ValueError Traceback (most recent call last)
Cell In[7], line 2
1 dataset_train = train_grouper(dataset.train)
----> 2 dataset_test = test_grouper(dataset.test)

File ~\anaconda3\envs\Thesis_2\lib\site-packages\gluonts\dataset\multivariate_grouper.py:87, in MultivariateGrouper.call(self, dataset)
85 def call(self, dataset: Dataset) -> Dataset:
86 self._preprocess(dataset)
---> 87 return self._group_all(dataset)

File ~\anaconda3\envs\Thesis_2\lib\site-packages\gluonts\dataset\multivariate_grouper.py:125, in MultivariateGrouper._group_all(self, dataset)
123 grouped_dataset = self._prepare_train_data(dataset)
124 else:
--> 125 grouped_dataset = self._prepare_test_data(dataset)
126 return grouped_dataset

File ~\anaconda3\envs\Thesis_2\lib\site-packages\gluonts\dataset\multivariate_grouper.py:152, in MultivariateGrouper._prepare_test_data(self, dataset)
148 assert self.num_test_dates is not None
150 logging.info("group test time series to datasets")
--> 152 grouped_data = self._transform_target(self._left_pad_data, dataset)
153 # splits test dataset with rolling date into N R^d time series where
154 # N is the number of rolling evaluation dates
155 split_dataset = np.split(
156 grouped_data[FieldName.TARGET], self.num_test_dates
157 )

File ~\anaconda3\envs\Thesis_2\lib\site-packages\gluonts\dataset\multivariate_grouper.py:205, in MultivariateGrouper._transform_target(funcs, dataset)
203 @staticmethod
204 def _transform_target(funcs, dataset: Dataset) -> DataEntry:
--> 205 return {FieldName.TARGET: np.array([funcs(data) for data in dataset])}

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (959,) + inhomogeneous part.

from gluonts.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.