def __init__(self, vectorizer='tfidf', num_leaves=23, learning_rate=0.01, max_depth=-1, num_boost_round=99999): self.vectorizer = feature_extraction.get(vectorizer) self.classifier = self.build_classifier(num_leaves, learning_rate, max_depth, num_boost_round)
def __init__(self, question_encoder_shape=64, text_encoder_shape=64, learning_rate=0.001): self.vectorizer = feature_extraction.get('word2vec') self.num_features = config.WORD_VECTOR_DIM self.question_encoder_shape = question_encoder_shape self.text_encoder_shape = text_encoder_shape # Tensorflow currently does not support Tensors with different lengths along a dimension. self.batch_size = 1 self.learning_rate = learning_rate self.classifier = self.build_classifier()
def __init__(self, vectorizer='tfidf', kernel='rbf', degree=3): self.vectorizer = feature_extraction.get(vectorizer) self.classifier = self.build_classifier(kernel, degree)
def __init__(self, vectorizer='tfidf'): self.vectorizer = feature_extraction.get(vectorizer) self.classifier = self.build_classifier()
def __init__(self, vectorizer='tfidf', n_neighbors=3): self.vectorizer = feature_extraction.get(vectorizer) self.classifier = self.build_classifier(n_neighbors)
def __init__(self, vectorizer='tfidf', max_depth=66, random_state=1): self.vectorizer = feature_extraction.get(vectorizer) self.classifier = self.build_classifier(max_depth, random_state)
def __init__(self, vectorizer='tfidf', random_state=None): self.vectorizer = feature_extraction.get(vectorizer) self.classifier = self.build_classifier(random_state)
def __init__(self, vectorizer='tfidf', max_depth=8, tree_method='auto'): self.vectorizer = feature_extraction.get(vectorizer) self.classifier = self.build_classifier(max_depth, tree_method)
def __init__(self, embedding_dim=64, batch_size=32): self.vectorizer = feature_extraction.get('label_encoder') self.embedding_dim = embedding_dim self.batch_size = batch_size self.classifier = self.build_classifier()