def _compute_weights(self, X, rs):
        """Generate MLP weights"""

        # use supplied weights if present
        weights = self._get_user_components('weights')
        if (weights is None):
            n_features = X.shape[1]
            hw_size = (n_features, self.n_hidden)
            weights = rs.normal(size=hw_size)

        self.components_['weights'] = weights
def _compute_weights ( self , X , rs ) : weights = self . _get_user_components ( 'weights' ) if ( weights is None ) : n_features = X . shape [ 1 ] hw_size = ( n_features , self . n_hidden ) weights = rs . normal ( size = hw_size ) self . components_ [ 'weights' ] = weights
Generate MLP weights