7c960272c5ab4d25a022538f5849addec3e6bfee,loglizer/preprocessing.py,FeatureExtractor,transform,#FeatureExtractor#Any#,71

Before Change


        for i in range(X_seq.shape[0]):
            X_df.loc[i, :] = [0] * len(self.events)
            event_counts = Counter(X_seq[i])
            for event, count in event_counts.items():
                if event in self.events:
                    X_df.loc[i, event] = count
        X = X_df.fillna(0).values
        
        num_instance, num_event = X.shape
        if self.term_weighting == "tf-idf":

After Change


            X_df[event] = [0] * len(X_df)
        X = X_df[self.events].values
        if self.oov:
            oov_vec = np.sum(X_df[X_df.columns.difference(self.events)].values > 0, axis=1)
            X = np.hstack([X, oov_vec.reshape(X.shape[0], 1)])
        
        num_instance, num_event = X.shape
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: logpai/loglizer
Commit Name: 7c960272c5ab4d25a022538f5849addec3e6bfee
Time: 2019-02-25
Author: zhujm.home@gmail.com
File Name: loglizer/preprocessing.py
Class Name: FeatureExtractor
Method Name: transform


Project Name: dask/distributed
Commit Name: 909a943b67b6b472a2d77afa13a8caa61f25f972
Time: 2019-07-25
Author: jcrist@users.noreply.github.com
File Name: distributed/security.py
Class Name: Security
Method Name: __init__


Project Name: pantsbuild/pants
Commit Name: 5040d993d6253ed5842bee14f05d413d6b24ee9c
Time: 2020-06-25
Author: 14852634+Eric-Arellano@users.noreply.github.com
File Name: src/python/pants/backend/python/rules/inject_init.py
Class Name:
Method Name: inject_missing_init_files