コード例 #1
0
ファイル: dataset.py プロジェクト: sanmik/ICW-fMRI-GAN
 def get_ids_by_expression(self, expression, threshold=0.001, func=np.sum):
     """ Use a PEG to parse expression and return study IDs."""
     lexer = lp.Lexer()
     lexer.build()
     parser = lp.Parser(lexer, self.dataset, threshold=threshold, func=func)
     parser.build()
     return parser.parse(expression).keys().values
コード例 #2
0
 def get_ids_by_expression(self, expression, threshold=0.001, func=np.sum):
     """ Use a PEG to parse expression and return mappables. """
     from neurosynth.base import lexparser as lp
     lexer = lp.Lexer()
     lexer.build()
     parser = lp.Parser(lexer, self.dataset, threshold=threshold, func=func)
     parser.build()
     return parser.parse(expression).keys()