def process(self, xp:PreProcessor=None, yp:PreProcessor=None, name:str=None):
        "Launch the processing on `self.x` and `self.y` with `xp` and `yp`."
        self.y.process(yp)
        if getattr(self.y, 'filter_missing_y', False):
            filt = array([o is None for o in self.y.items])
            if filt.sum()>0:
                #Warnings are given later since progress_bar might make them disappear.
                self.warn = f"You are labelling your items with {self.y.__class__.__name__}.\n"
                self.warn += f"Your {name} set contained the following unknown labels, the corresponding items have been discarded.\n"
                for p in self.y.processor:
                    if len(getattr(p, 'warns', [])) > 0:
                        warnings = list(set(p.warns))
                        self.warn += ', '.join(warnings[:5])
                        if len(warnings) > 5: self.warn += "..."
                    p.warns = []
                self.x,self.y = self.x[~filt],self.y[~filt]
        self.x.process(xp)
        return self
def process ( self , xp : PreProcessor = None , yp : PreProcessor = None , name : str = None ) : self . y . process ( yp ) if getattr ( self . y , 'filter_missing_y' , False ) : filt = array ( [ o is None for o in self . y . items ] ) if filt . sum ( ) > 0 : self . warn = f"You are labelling your items with {self.y.__class__.__name__}.\n" self . warn += f"Your {name} set contained the following unknown labels, the corresponding items have been discarded.\n" for p in self . y . processor : if len ( getattr ( p , 'warns' , [ ] ) ) > 0 : warnings = list ( set ( p . warns ) ) self . warn += ', ' . join ( warnings [ : 5 ] ) if len ( warnings ) > 5 : self . warn += "..." p . warns = [ ] self . x , self . y = self . x [ ~ filt ] , self . y [ ~ filt ] self . x . process ( xp ) return self
Launch the processing on `self.x` and `self.y` with `xp` and `yp`.