def METHOD_NAME(self, dataset, hyperparameters={}, topics=10):
    """
    Train the model and return output
    Parameters
    ----------
    dataset : dataset to use to build the model
    hyperparameters : hyperparameters to build the model
    topics : if greather than 0 returns the top k most significant
             words for each topic in the output
             Default True
    Returns
    -------
    result : dictionary with up to 3 entries,
             'topics', 'topic-word-matrix' and
             'topic-document-matrix'
    """
    partition = []
    if self.use_partitions:
        partition = dataset.get_partitioned_corpus()
    else:
        partition = [dataset.get_corpus(), []]
    if self.id2word is None:
        self.id2word = corpora.Dictionary(dataset.get_corpus())
    if self.id_corpus is None:
        self.id_corpus = [self.id2word.doc2bow(
            document) for document in partition[0]]
    hyperparameters["corpus"] = self.id_corpus
    hyperparameters["id2word"] = self.id2word
    self.hyperparameters.update(hyperparameters)
    self.trained_model = hdpmodel.HdpModel(**self.hyperparameters)
    result = dict()
    result["topic-word-matrix"] = self.trained_model.get_topics()
    if topics > 0:
        topics_output = []
        for topic in result["topic-word-matrix"]:
            top_k = np.argsort(topic)[-topics:]
            top_k_words = list(reversed([self.id2word[i] for i in top_k]))
            topics_output.append(top_k_words)
        result["topics"] = topics_output
    result["topic-document-matrix"] = self._get_topic_document_matrix()
    if self.use_partitions:
        new_corpus = [self.id2word.doc2bow(
            document) for document in partition[1]]
        if self.update_with_test:
            self.trained_model.update(new_corpus)
            self.id_corpus.extend(new_corpus)
            result["test-topic-word-matrix"] = self.trained_model.get_topics()
            if topics > 0:
                topics_output = []
                for topic in result["test-topic-word-matrix"]:
                    top_k = np.argsort(topic)[-topics:]
                    top_k_words = list(
                        reversed([self.id2word[i] for i in top_k]))
                    topics_output.append(top_k_words)
                result["test-topics"] = topics_output
            result["test-topic-document-matrix"] = self._get_topic_document_matrix()
        else:
            test_document_topic_matrix = []
            for document in new_corpus:
                document_topics_tuples = self.trained_model[document]
                document_topics = np.zeros(
                    len(self.trained_model.get_topics()))
                for single_tuple in document_topics_tuples:
                    document_topics[single_tuple[0]] = single_tuple[1]
                test_document_topic_matrix.append(document_topics)
            result["test-topic-document-matrix"] = np.array(
                test_document_topic_matrix).transpose()
    return result