def train_vine(self, tree_type):
        """Train vine."""
        LOGGER.debug('start building tree : 0')
        tree_1 = Tree(tree_type)
        tree_1.fit(0, self.n_var, self.tau_mat, self.u_matrix)
        self.trees.append(tree_1)
        LOGGER.debug('finish building tree : 0')

        for k in range(1, min(self.n_var - 1, self.truncated)):
            # get constraints from previous tree
            self.trees[k - 1]._get_constraints()
            tau = self.trees[k - 1].get_tau_matrix()
            LOGGER.debug('start building tree: {0}'.format(k))
            tree_k = Tree(tree_type)
            tree_k.fit(k, self.n_var - k, tau, self.trees[k - 1])
            self.trees.append(tree_k)
            LOGGER.debug('finish building tree: {0}'.format(k))
def train_vine ( self , tree_type ) : LOGGER . debug ( 'start building tree : 0' ) tree_1 = Tree ( tree_type ) tree_1 . fit ( 0 , self . n_var , self . tau_mat , self . u_matrix ) self . trees . append ( tree_1 ) LOGGER . debug ( 'finish building tree : 0' ) for k in range ( 1 , min ( self . n_var - 1 , self . truncated ) ) : self . trees [ k - 1 ] . _get_constraints ( ) tau = self . trees [ k - 1 ] . get_tau_matrix ( ) LOGGER . debug ( 'start building tree: {0}' . format ( k ) ) tree_k = Tree ( tree_type ) tree_k . fit ( k , self . n_var - k , tau , self . trees [ k - 1 ] ) self . trees . append ( tree_k ) LOGGER . debug ( 'finish building tree: {0}' . format ( k ) )
Train vine.