Exemplo n.º 1
0
def LDA_TAGS_NUM_AVERAGE_BUILDER():
    pipeline_components = [(json_layer, JsonToTagsNumericalTransformer()),
                           (embedder, LdaTransformer()),
                           (tree, BallTreePredictor(average=True)),
                           (output, DumbOutput())]

    return Pipeline(pipeline_components)
Exemplo n.º 2
0
def LDA_TAGS_NUM_GREEDY_BUILDER():
    pipeline_components = [(json_layer, JsonToTagsNumericalTransformer()),
                           (embedder, LdaTransformer()),
                           (tree, BallTreePredictor()),
                           (output, GreedyOutput())]

    return Pipeline(pipeline_components)
Exemplo n.º 3
0
def GLOVE_GREEDY_BUILDER():
    with open("word_hash", "rb") as file:
        word_hash = pickle.load(file)

        pipeline_components = [
            (json_layer, JsonTransform()),
            (embedder, TfIdfGloveTransformer(word_embedder=word_hash)),
            (tree, BallTreePredictor()), (output, GreedyOutput())
        ]

        return Pipeline(pipeline_components)