562508c5edf9988078f3ca4300e1d6be569a4b8f,python/timeseries/timeseries_customRNN.py,TsRNNCustom,predict,#TsRNNCustom#Any#Any#,141

Before Change


        if self.n_inputs != 1:
            raise ValueError("Currently only supports univariate input per time-step")
        preds = list()
        x = np.zeros(shape=(1, self.n_lag, 1), dtype=np.float32)
        for i in range(self.n_lag):
            x[0, i, 0] = start_ts[i]
        init_state = np.zeros(shape=(1, self.state_size))
        for i in range(n):
            yhat = self.predict_op.eval(feed_dict={self.X: x,

After Change


        
        if self.n_inputs != 1:
            raise ValueError("Currently only supports univariate input per time-step")
        seq = list(np.reshape(start_ts, newshape=(-1,)))
        logger.debug("seq: %s" % str(seq))
        preds = list()
        init_state = np.zeros(shape=(1, self.state_size))
        for i in range(n):
            ts = seq[-self.n_lag:]
            X_batch = np.array(ts).reshape(1, self.n_lag, self.n_inputs)
            yhat = self.predict_op.eval(feed_dict={self.X: X_batch,
                                                   self.init_state: init_state})
            logger.debug("pred: %d %s" % (i, str(yhat)))
            preds.append(yhat[0, 0])
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: shubhomoydas/ad_examples
Commit Name: 562508c5edf9988078f3ca4300e1d6be569a4b8f
Time: 2018-04-01
Author: smd.shubhomoydas@gmail.com
File Name: python/timeseries/timeseries_customRNN.py
Class Name: TsRNNCustom
Method Name: predict


Project Name: cornellius-gp/gpytorch
Commit Name: 3879bcde8d42c619c96b6483dba14a76a8e5f00b
Time: 2019-09-29
Author: kaw293@cornell.edu
File Name: gpytorch/utils/grid.py
Class Name:
Method Name: create_data_from_grid


Project Name: scikit-learn-contrib/DESlib
Commit Name: 3d5ab488d9bf0e5f5ec0ae52de6b30b9b807ff90
Time: 2018-04-01
Author: rafaelmenelau@gmail.com
File Name: deslib/des/des_knn.py
Class Name: DESKNN
Method Name: estimate_competence