b96ebe95e2901cdb27b8c7ea5bead2c0b9265e59,tslearn/piecewise.py,PiecewiseAggregateApproximation,_transform,#PiecewiseAggregateApproximation#Any#Any#,140

Before Change


        for i_seg in range(self.n_segments):
            start = i_seg * sz_segment
            end = start + sz_segment
            X_transformed[:, i_seg, :] = X[:, start:end, :].mean(axis=1)
        return X_transformed

    def transform(self, X, y=None):

After Change


                for i_seg in range(self.n_segments):
                    start = i_seg * sz_segment
                    end = start + sz_segment
                    segment = X[i_ts, start:end, i_dim]
                    X_transformed[i_ts, i_seg, i_dim] = numpy.nanmean(segment)

        // sz_segment = sz // self.n_segments
        // for i_seg in range(self.n_segments):
        //     start = i_seg * sz_segment
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: rtavenar/tslearn
Commit Name: b96ebe95e2901cdb27b8c7ea5bead2c0b9265e59
Time: 2019-11-24
Author: givdwiel.vandewiele@ugent.be
File Name: tslearn/piecewise.py
Class Name: PiecewiseAggregateApproximation
Method Name: _transform


Project Name: dPys/PyNets
Commit Name: fc8c76feb95fe5fb988441b6b42cb29be2369c0f
Time: 2018-11-05
Author: dpisner@utexas.edu
File Name: pynets/utils.py
Class Name:
Method Name: collect_pandas_df_make


Project Name: theislab/scanpy
Commit Name: 14124ebc79621009018907a2f0564b52b557ba92
Time: 2018-12-09
Author: f.alex.wolf@gmx.de
File Name: scanpy/tools/score_genes.py
Class Name:
Method Name: score_genes