src/rime/__init__.py
def run(self, models_to_run=None,
            models_to_exclude=["ItemKNN-0", "ItemKNN-1", "BayesLM-0", "BayesLM-1"]):
        """ models_to_exclude is ignored if models_to_run is explicitly provided """

        if models_to_run is None:
            models_to_run = [m for m in self.models_to_run if m not in models_to_exclude]
        elif isinstance(models_to_run, str):
            models_to_run = [models_to_run]

        for model in models_to_run:
            assert model in self.registered, f"{model} disabled or unregistered"
        print("models to run", models_to_run)

        for model in models_to_run:
            print("running", model)
            S = self.registered[model](self.D)

            if self.D.prior_score is not None:
                S = S + self.D.prior_score

            if self.tie_break:
                warnings.warn("Using experimental RandScore class")
                S = S + RandScore.like(S) * self.tie_break

            if self.online:
                V = self.V.reindex(self.D.item_in_test.index, axis=1)
                T = self.registered[model](V)

                if V.prior_score is not None:
                    T = T + V.prior_score

                if self.tie_break:
                    warnings.warn("Using experimental RandScore class")
                    T = T + RandScore.like(T) * self.tie_break

            else:
                T = None
            self.metrics_update(model, S, T)
 models_to_exclude is ignored if models_to_run is explicitly provided 
models_to_exclude is ignored if models_to_run is explicitly provided
models_to_exclude is ignored if models_to_run is explicitly provided
def run(self, models_to_run=None,
            models_to_exclude=["ItemKNN-0", "ItemKNN-1", "BayesLM-0", "BayesLM-1"]):
        if models_to_run is None:
            models_to_run = [m for m in self.models_to_run if m not in models_to_exclude]
        elif isinstance(models_to_run, str):
            models_to_run = [models_to_run]
        for model in models_to_run:
            assert model in self.registered, f"{model} disabled or unregistered"
        print("models to run", models_to_run)
        for model in models_to_run:
            print("running", model)
            S = self.registered[model](self.D)
            if self.D.prior_score is not None:
                S = S + self.D.prior_score
            if self.tie_break:
                warnings.warn("Using experimental RandScore class")
                S = S + RandScore.like(S) * self.tie_break
            if self.online:
                V = self.V.reindex(self.D.item_in_test.index, axis=1)
                T = self.registered[model](V)
                if V.prior_score is not None:
                    T = T + V.prior_score
                if self.tie_break:
                    warnings.warn("Using experimental RandScore class")
                    T = T + RandScore.like(T) * self.tie_break
            else:
                T = None
            self.metrics_update(model, S, T)
def run ( self , models_to_run = None , models_to_exclude = [ "ItemKNN-0" , "ItemKNN-1" , "BayesLM-0" , "BayesLM-1" ] ) : if models_to_run is None : models_to_run = [ m for m in self . models_to_run if m not in models_to_exclude ] elif isinstance ( models_to_run , str ) : models_to_run = [ models_to_run ] for model in models_to_run : assert model in self . registered , f"{model} disabled or unregistered" print ( "models to run" , models_to_run ) for model in models_to_run : print ( "running" , model ) S = self . registered [ model ] ( self . D ) if self . D . prior_score is not None : S = S + self . D . prior_score if self . tie_break : warnings . warn ( "Using experimental RandScore class" ) S = S + RandScore . like ( S ) * self . tie_break if self . online : V = self . V . reindex ( self . D . item_in_test . index , axis = 1 ) T = self . registered [ model ] ( V ) if V . prior_score is not None : T = T + V . prior_score if self . tie_break : warnings . warn ( "Using experimental RandScore class" ) T = T + RandScore . like ( T ) * self . tie_break else : T = None self . metrics_update ( model , S , T )
models_to_exclude is ignored if models_to_run is explicitly provided
models_to_exclude is ignored if models_to_run is explicitly provided
""" models_to_exclude is ignored if models_to_run is explicitly provided """
self
models_to_run
models_to_exclude