def __init__(self, n_components=10): super().__init__() self.set_params(**{'n_components': n_components})
Also, one can get access to the n_components using the following syntax:
n_components = self.get_params()['n_components']
Last modified: Mon Feb 26 23:09:15 2018