7c960272c5ab4d25a022538f5849addec3e6bfee,loglizer/preprocessing.py,FeatureExtractor,transform,#FeatureExtractor#,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_new: The transformed data matrix
        
        print("====== Transformed test data summary ======")
        X_counts = []
        for i in range(X_seq.shape[0]):
            event_counts = Counter(X_seq[i])
            X_counts.append(event_counts)
        X_df = pd.DataFrame(X_counts)
        X_df = X_df.fillna(0)
        empty_events = set(self.events) - set(X_df.columns)
        for event in empty_events:
            X_df[event] = [0] * len(X_df)
        X = X_df[self.events].values
        if self.oov:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

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: Vaibhav/Stock-Analysis
Commit Name: ded118ad8554f0faedc61193e60fb9bbde026a4d
Time: 2018-08-15
Author: ishuvaibhav@gmail.com
File Name: Screener/QMAScreener.py
Class Name:
Method Name:


Project Name: scikit-learn-contrib/categorical-encoding
Commit Name: fc4917ae8a7320fc9a258b50d82a177ed2124a91
Time: 2018-12-21
Author: jcastaldo08@gmail.com
File Name: category_encoders/basen.py
Class Name: BaseNEncoder
Method Name: fit_base_n_encoding