#NEWLINE# def __init__( self , distribution , kernel , Z , nu2 = 0.1 , gamma = 0.1 , num_eigen = 10 ) : #NEWLINE# #INDENT# Kameleon . __init__ ( self , distribution , kernel , Z , nu2 , gamma ) #NEWLINE# self . num_eigen = num_eigen #NEWLINE# if ( Z is None ) : #NEWLINE# #INDENT# self . Kc = None #NEWLINE# self . eigvalues = None #NEWLINE# self . eigvectors = None #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# K = self . kernel . kernel ( Z ) #NEWLINE# H = Kernel . centring_matrix ( len ( self . Z ) ) #NEWLINE# self . Kc = H . dot ( K . dot ( H ) ) #NEWLINE# ( u , s , _ ) = svd ( self . Kc ) #NEWLINE# self . eigvalues = s [ 0 : self . num_eigen ] #NEWLINE# self . eigvectors = u [ : , 0 : self . num_eigen ]