(self, column_name, raw_column_data)
return ColumnTransformInfo(
            column_name=column_name, column_type='continuous', transform=gm,
            transform_aux=valid_component_indicator,
            output_info=[SpanInfo(1, 'tanh'), SpanInfo(num_components, 'softmax')],
            output_dimensions=1 + num_components)
Train Bayesian GMM for continuous column.
Train Bayesian GMM for continuous column.
Train Bayesian GMM for continuous column .
def _fit_continuous(self, column_name, raw_column_data):
        """Train Bayesian GMM for continuous column."""
        gm = BayesianGaussianMixture(
            n_components=self._max_clusters,
            weight_concentration_prior_type='dirichlet_process',
            weight_concentration_prior=0.001,
            n_init=1
        )

        gm.fit(raw_column_data.reshape(-1, 1))
        valid_component_indicator = gm.weights_ > self._weight_threshold
        num_components = valid_component_indicator.sum()

        return ColumnTransformInfo(
            column_name=column_name, column_type='continuous', transform=gm,
            transform_aux=valid_component_indicator,
            output_info=[SpanInfo(1, 'tanh'), SpanInfo(num_components, 'softmax')],
            output_dimensions=1 + num_components)
def _fit_continuous ( self , column_name , raw_column_data ) : gm = BayesianGaussianMixture ( n_components = self . _max_clusters , weight_concentration_prior_type = 'dirichlet_process' , weight_concentration_prior = 0.001 , n_init = 1 ) gm . fit ( raw_column_data . reshape ( - 1 , 1 ) ) valid_component_indicator = gm . weights_ > self . _weight_threshold num_components = valid_component_indicator . sum ( ) return ColumnTransformInfo ( column_name = column_name , column_type = 'continuous' , transform = gm , transform_aux = valid_component_indicator , output_info = [ SpanInfo ( 1 , 'tanh' ) , SpanInfo ( num_components , 'softmax' ) ] , output_dimensions = 1 + num_components )