9439f5215fde61ee40910b0320ff4dd8d28571e2,fancyimpute/MICE.py,MICE,perform_imputation_round,#MICE#,121

Before Change


            n_missing_for_this_col = n_missing_for_each_column[col_idx]
            if n_missing_for_this_col > 0:  // if we have any missing data at all
                observed_row_mask_for_col = observed_mask[:, col_idx]
                other_cols = np.array(list(range(0, col_idx)) + list(range(col_idx + 1, n_cols)))
                output = X_filled[observed_row_mask_for_col, col_idx]
                if (n_cols - int(self.add_ones) > self.n_nearest_columns):
                    // probability of column draw is proportional to absolute 
                    // pearson correlation

After Change


            abs_correlation_matrix = np.abs(np.corrcoef(X_filled.T))

        n_missing_for_each_column = missing_mask.sum(axis=0)
        ordered_column_indices = np.arange(n_cols)
        for col_idx in visit_indices:
            missing_mask_col = missing_mask[:, col_idx]  // missing mask for this column
            n_missing_for_this_col = n_missing_for_each_column[col_idx]
            if n_missing_for_this_col > 0:  // if we have any missing data at all
                observed_row_mask_for_col = observed_mask[:, col_idx]
                output = X_filled[observed_row_mask_for_col, col_idx]

                other_cols = np.concatenate([
                    ordered_column_indices[:col_idx],
                    ordered_column_indices[col_idx + 1:]
                ])

                if n_original_cols > self.n_nearest_columns:
                    // probability of column draw is proportional to absolute
                    // pearson correlation
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: iskandr/fancyimpute
Commit Name: 9439f5215fde61ee40910b0320ff4dd8d28571e2
Time: 2016-01-10
Author: alex.rubinsteyn@gmail.com
File Name: fancyimpute/MICE.py
Class Name: MICE
Method Name: perform_imputation_round


Project Name: keunwoochoi/kapre
Commit Name: fe8a6175dc98c7bc3b667fe88afcb5c2a4c94169
Time: 2017-01-17
Author: gnuchoi+github@gmail.com
File Name: kapre/stft.py
Class Name: Stft
Method Name: call


Project Name: librosa/librosa
Commit Name: 2bae518e899657e536572fa59df6e1587795e397
Time: 2014-12-30
Author: brian.mcfee@nyu.edu
File Name: librosa/feature.py
Class Name:
Method Name: line_features