示例#1
0
def sweep_hyperparameter_space_and_plot_complexity_curves(clf, features, labels, problem_name, plot_dir):
    parameter_search_space = [[{'n_neighbors': 2}, {'n_neighbors': 4}, {'n_neighbors': 7}, {'n_neighbors': 10}, {'n_neighbors': 13}, \
    							{'n_neighbors': 15}], \
                                [{'weights': 'uniform'}, {'weights': 'distance'}]]
    for hyperparam_range in parameter_search_space:
        plot_complexity_curves_for_hyperparams(clf, train_features,train_labels, hyperparam_range, \
                                                problem_name, plot_dir)
示例#2
0
def sweep_hyperparameter_space_and_plot_complexity_curves(
        clf, features, labels, problem_name, plot_dir):
    parameter_search_space = [[{'hidden_layer_sizes': (25,)}, {'hidden_layer_sizes': (50,)}, {'hidden_layer_sizes': (100,)}, {'hidden_layer_sizes': (150,)}, {'hidden_layer_sizes': (200,)}], \
                                [{'activation': 'identity'}, {'activation': 'logistic'}, {'activation': 'tanh'}, {'activation': 'relu'}]]
    for hyperparam_range in parameter_search_space:
        plot_complexity_curves_for_hyperparams(clf, train_features,train_labels, hyperparam_range, \
                                                problem_name, plot_dir)
示例#3
0
def sweep_hyperparameter_space_and_plot_complexity_curves(
        clf, features, labels, problem_name, plot_dir):
    parameter_search_space = [[{'n_estimators': 25}, {'n_estimators': 50}, {'n_estimators': 75}, {'n_estimators': 100}, {'n_estimators': 150}, \
           {'n_estimators': 200}, {'n_estimators': 300}], \
                                [{'learning_rate': 0.80}, {'learning_rate': 0.825}, {'learning_rate': 0.85}, {'learning_rate': 0.875}, \
                                 {'learning_rate': 0.90}, {'learning_rate': 0.925}, {'learning_rate': 0.95}, {'learning_rate': 0.975}, {'learning_rate': 1.0}]]
    for hyperparam_range in parameter_search_space:
        plot_complexity_curves_for_hyperparams(clf, train_features,train_labels, hyperparam_range, \
                                                problem_name, plot_dir)
示例#4
0
def sweep_hyperparameter_space_and_plot_complexity_curves(clf, features, labels, problem_name, plot_dir):
    parameter_search_space = [[{'max_depth': 5}, {'max_depth': 8}, {'max_depth': 12}, {'max_depth': 15}, \
                                             {'max_depth': 20}, {'max_depth': 25}, {'max_depth': 30}], \
                                [{'min_samples_split': 25}, {'min_samples_split': 50}, {'min_samples_split': 100}, \
                                 {'min_samples_split': 150}, {'min_samples_split': 200}, {'min_samples_split': 300}, {'min_samples_split': 400}, {'min_samples_split': 500}], \
                                [{'min_samples_leaf': 50}, {'min_samples_leaf': 100}, {'min_samples_leaf': 150}, {'min_samples_leaf': 200}, \
                                {'min_samples_leaf': 250}, {'min_samples_leaf': 325}, {'min_samples_leaf': 400}, {'min_samples_leaf': 500}]]
    for hyperparam_range in parameter_search_space:
        plot_complexity_curves_for_hyperparams(clf, features, labels, hyperparam_range, \
                                                problem_name, plot_dir)