b7eb836b40893bc25e782658cfec6f7bd6c4c451,seglearn/segment.py,Segment,transform,#Segment#Any#,26

Before Change



    def transform(self, X):
        check_is_fitted(self, "step")
        if type(X) is np.recarray:
            X_new = self._transform_recarray(X)
        else:
            X_new = self._transform(X)

        return X_new

    def _transform(self, X):
        N = len(X)

After Change



    def transform(self, X):
        check_is_fitted(self, "step")
        Xt = np.array([sliding_tensor(X["ts"][i], self.width, self.step) for i in range(len(X))])
        h_names = [h for h in X.dtype.names if h != "ts"]
        Xh = [X[h] for h in h_names]
        X_new = np.core.records.fromarrays([Xt] + Xh, names=["ts"] + h_names)
        return X_new
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: dmbee/seglearn
Commit Name: b7eb836b40893bc25e782658cfec6f7bd6c4c451
Time: 2018-03-06
Author: david.mo.burns@gmail.com
File Name: seglearn/segment.py
Class Name: Segment
Method Name: transform


Project Name: EpistasisLab/tpot
Commit Name: 2ab8c1444facbd46df8767a5badda5b9f1a50c29
Time: 2016-08-01
Author: supacoofoo@gmail.com
File Name: tpot/tpot.py
Class Name: TPOT
Method Name: predict


Project Name: EpistasisLab/tpot
Commit Name: 2ab8c1444facbd46df8767a5badda5b9f1a50c29
Time: 2016-08-01
Author: supacoofoo@gmail.com
File Name: tests.py
Class Name:
Method Name: