featuremapper/__init__.py
def _measure_responses(self, p):
        """
        Generate feature permutations and present each in sequence.
        """

        # Run hooks before the analysis session
        for f in p.pre_analysis_session_hooks: f()

        features_to_permute = [f for f in self.inner if f.compute_fn is None]
        self.features_to_compute = [f for f in self.inner if f.compute_fn is not None]

        self.feature_names, values_lists = zip(*[(f.name.lower(), f.values) for f in features_to_permute])

        self.permutations = [permutation for permutation in product(*values_lists)]

        # Permute outer or non-collapsed features
        self.outer_permutations = [permutation for permutation in product(*self.outer_vals)]
        if not self.outer_permutations: self.outer_permutations.append(())
        self.n_outer = len(self.outer_permutations)

        self.total_steps = len(self.permutations) * len(self.outer_permutations) * p.repetitions - 1
        for permutation_num, permutation in enumerate(self.permutations):
            try:
                self._present_permutation(p, permutation, permutation_num)
            except MeasurementInterrupt as MI:
                self.warning("Measurement was stopped after {0} out of {1} presentations. "
                             "Results may be incomplete.".format(MI.current, MI.total))
                break

        # Run hooks after the analysis session
        for f in p.post_analysis_session_hooks:
            f()

        Generate feature permutations and present each in sequence.
        
Generate feature permutations and present each in sequence.
Generate feature permutations and present each in sequence .
def _measure_responses(self, p):
        for f in p.pre_analysis_session_hooks: f()
        features_to_permute = [f for f in self.inner if f.compute_fn is None]
        self.features_to_compute = [f for f in self.inner if f.compute_fn is not None]
        self.feature_names, values_lists = zip(*[(f.name.lower(), f.values) for f in features_to_permute])
        self.permutations = [permutation for permutation in product(*values_lists)]
        self.outer_permutations = [permutation for permutation in product(*self.outer_vals)]
        if not self.outer_permutations: self.outer_permutations.append(())
        self.n_outer = len(self.outer_permutations)
        self.total_steps = len(self.permutations) * len(self.outer_permutations) * p.repetitions - 1
        for permutation_num, permutation in enumerate(self.permutations):
            try:
                self._present_permutation(p, permutation, permutation_num)
            except MeasurementInterrupt as MI:
                self.warning("Measurement was stopped after {0} out of {1} presentations. "
                             "Results may be incomplete.".format(MI.current, MI.total))
                break
        for f in p.post_analysis_session_hooks:
            f()
def _measure_responses ( self , p ) : for f in p . pre_analysis_session_hooks : f ( ) features_to_permute = [ f for f in self . inner if f . compute_fn is None ] self . features_to_compute = [ f for f in self . inner if f . compute_fn is not None ] self . feature_names , values_lists = zip ( * [ ( f . name . lower ( ) , f . values ) for f in features_to_permute ] ) self . permutations = [ permutation for permutation in product ( * values_lists ) ] self . outer_permutations = [ permutation for permutation in product ( * self . outer_vals ) ] if not self . outer_permutations : self . outer_permutations . append ( ( ) ) self . n_outer = len ( self . outer_permutations ) self . total_steps = len ( self . permutations ) * len ( self . outer_permutations ) * p . repetitions - 1 for permutation_num , permutation in enumerate ( self . permutations ) : try : self . _present_permutation ( p , permutation , permutation_num ) except MeasurementInterrupt as MI : self . warning ( "Measurement was stopped after {0} out of {1} presentations. " "Results may be incomplete." . format ( MI . current , MI . total ) ) break for f in p . post_analysis_session_hooks : f ( )
Generate feature permutations and present each in sequence.
Generate feature permutations and present each in sequence .
"""
        Generate feature permutations and present each in sequence.
        """ # Run hooks before the analysis session # Permute outer or non-collapsed features # Run hooks after the analysis session
self
p