def METHOD_NAME(self, dataset, hyperparameters=None, top_words=10):
    """
    Train the model and return output
    Parameters
    ----------
    dataset : dataset to use to build the model
    hyperparameters : hyperparameters to build the model
    top_words : if greather than 0 returns the 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'
    """
    if hyperparameters is None:
        hyperparameters = {}
    if self.id2word is None or self.id_corpus is None:
        vectorizer = TfidfVectorizer(
            min_df=0.0, token_pattern=r"(?u)\b[\w|\-]+\b",
            vocabulary=dataset.get_vocabulary())
        if self.use_partitions:
            partition = dataset.get_partitioned_corpus(
                use_validation=False)
            corpus = partition[0]
        else:
            corpus = dataset.get_corpus()
        real_corpus = [" ".join(document) for document in corpus]
        X = vectorizer.fit_transform(real_corpus)
        self.id2word = {i: k for i, k in enumerate(
            vectorizer.get_feature_names_out())}
        if self.use_partitions:
            test_corpus = []
            for document in partition[1]:
                test_corpus.append(" ".join(document))
            Y = vectorizer.transform(test_corpus)
            self.id_corpus = X
            self.new_corpus = Y
        else:
            self.id_corpus = X
    #hyperparameters["corpus"] = self.id_corpus
    #hyperparameters["id2word"] = self.id2word
    self.hyperparameters.update(hyperparameters)
    model = NMF(
        n_components=self.hyperparameters["num_topics"],
        init=self.hyperparameters["init"],
        alpha=self.hyperparameters["alpha"],
        l1_ratio=self.hyperparameters["l1_ratio"],
        regularization=self.hyperparameters['regularization'])
    W = model.fit_transform(self.id_corpus)
    #W = W / W.sum(axis=1, keepdims=True)
    H = model.components_
    #H = H / H.sum(axis=1, keepdims=True)
    result = {}
    result["topic-word-matrix"] = H
    if top_words > 0:
        result["topics"] = self.get_topics(H, top_words)
    result["topic-document-matrix"] = np.array(W).transpose()
    if self.use_partitions:
        if self.update_with_test:
           # NOT IMPLEMENTED YET
            result["test-topic-word-matrix"] = W
            if top_words > 0:
                result["test-topics"] = self.get_topics(W, top_words)
            result["test-topic-document-matrix"] = H
        else:
            result["test-topic-document-matrix"] = model.transform(
                self.new_corpus).T
    return result