Created
          December 25, 2015 14:14 
        
      - 
      
- 
        Save hodzanassredin/d7ba71af3b71bb749720 to your computer and use it in GitHub Desktop. 
    4x speedup in classification
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | from sklearn.feature_selection.base import SelectorMixin | |
| #sklearn fix | |
| def get_support(self, indices=False): | |
| if hasattr(self, 'mask_cache'): | |
| return self.mask_cache | |
| mask = self._get_support_mask() | |
| self.mask_cache = mask if not indices else np.where(mask)[0] | |
| return self.mask_cache | |
| SelectorMixin.get_support = get_support | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment