Beispiel #1
0
def model_with_all_preprocessing_and_features(no_bag_of_words=False):
    print('## Download and load the data')
    dataset = get_dataset()
    print('## Clean the data')
    cleaned_X = clean_data(dataset['X'])
    print('## Feature Extraction')
    all_features_X = extract_features(cleaned_X, dataset['X'], no_bag_of_words=no_bag_of_words)
    print('## Training and Evaluation')
    train_the_model(all_features_X, dataset['Y'])
Beispiel #2
0
def model_with_only_features():
    print('## Download and load the data')
    dataset = get_dataset()
    print('## Only separate using spaces')
    cleaned_X = [val.split(' ') for val in dataset['X']]
    print('## Feature Extraction')
    all_features_X = extract_features(cleaned_X, dataset['X'])
    print('## Training and Evaluation')
    train_the_model(all_features_X, dataset['Y'])
Beispiel #3
0
def model_with_only_preprocessing():
    print('## Download and load the data')
    dataset = get_dataset()
    print('## Clean the data')
    cleaned_X = clean_data(dataset['X'])
    print('## Only perform BoW')
    all_features_X = perform_bag_of_words(cleaned_X)
    print('## Training and Evaluation')
    train_the_model(all_features_X, dataset['Y'])
Beispiel #4
0
def model_with_no_preprocessing_or_features():
    print('## Download and load the data')
    dataset = get_dataset()
    print('## Only separate using spaces')
    cleaned_X = [val.split(' ') for val in dataset['X']]
    print('## Only perform BoW')
    all_features_X = perform_bag_of_words(cleaned_X)
    print('## Training and Evaluation')
    train_the_model(all_features_X, dataset['Y'])