(self, data_shape, fit_intercept, data_instances)
return inits
If fit intercept, use the following formula to initialize b can get a faster converge rate
            b = log(P(1)/P(0))
If fit intercept, use the following formula to initialize b can get a faster converge rate
            b = log(P(1)/P(0))
If fit intercept use the following formula to initialize b can get a faster converge rate b = log ( P ( 1 ) / P ( 0 ))
def zeros(self, data_shape, fit_intercept, data_instances):
        """
        If fit intercept, use the following formula to initialize b can get a faster converge rate
            b = log(P(1)/P(0))
        """

        inits = np.zeros(data_shape)
        if fit_intercept and data_instances is not None:
            static_obj = statics.MultivariateStatisticalSummary(data_instances, cols_index=-1)
            label_historgram = static_obj.get_label_histogram()
            LOGGER.debug("label_histogram is : {}".format(label_historgram))
            one_count = label_historgram.get(1)
            zero_count = label_historgram.get(0, 0) + label_historgram.get(-1, 0)
            init_intercept = np.log((one_count / zero_count))
            inits[-1] = init_intercept
        return inits
def zeros ( self , data_shape , fit_intercept , data_instances ) : inits = np . zeros ( data_shape ) if fit_intercept and data_instances is not None : static_obj = statics . MultivariateStatisticalSummary ( data_instances , cols_index = - 1 ) label_historgram = static_obj . get_label_histogram ( ) LOGGER . debug ( "label_histogram is : {}" . format ( label_historgram ) ) one_count = label_historgram . get ( 1 ) zero_count = label_historgram . get ( 0 , 0 ) + label_historgram . get ( - 1 , 0 ) init_intercept = np . log ( ( one_count / zero_count ) ) inits [ - 1 ] = init_intercept return inits