Belle II Software development
MyFancyClassifier Class Reference

Public Member Functions

def __init__ (self, *my_fancy_parameters)
 
def fit (self, X, y)
 
def predict (self, X)
 

Detailed Description

 Let's assume we have written our own classifier (or installed something from github) 

Definition at line 21 of file how_to_use_arbitrary_methods.py.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
my_fancy_parameters 
)
 Just print the passed parameters 

Definition at line 24 of file how_to_use_arbitrary_methods.py.

24 def __init__(self, *my_fancy_parameters):
25 """ Just print the passed parameters """
26 print(my_fancy_parameters)
27

Member Function Documentation

◆ fit()

def fit (   self,
  X,
  y 
)
 Our method is so good, it doesn't even have to look at the data! 

Definition at line 28 of file how_to_use_arbitrary_methods.py.

28 def fit(self, X, y):
29 """ Our method is so good, it doesn't even have to look at the data! """
30 return self
31

◆ predict()

def predict (   self,
  X 
)
 Always return 1, this will boost our signal efficiency to the max 

Definition at line 32 of file how_to_use_arbitrary_methods.py.

32 def predict(self, X):
33 """ Always return 1, this will boost our signal efficiency to the max """
34 return np.ones(len(X))
35
36
37# These are the hooks you should implement
38
39

The documentation for this class was generated from the following file: