Exemplo n.º 1
0
def run_pulsar_svm():
    tuned_parameters = {"C": [0.1, 1, 10], 'gamma': [0.0001, 0.001, 0.01]}

    iter_range = np.arange(1, 150, 15)

    x_train, x_test, y_train, y_test = get_pulsar_data()
    run_svm("Pulsar", x_train, x_test, y_train, y_test, tuned_parameters,
            iter_range)
Exemplo n.º 2
0
def run_pulsar_boosting():
    x_train, x_test, y_train, y_test = get_pulsar_data()

    tuned_parameters = {
        "learning_rate": [0.1, 0.15, 0.2, 0.25, 0.3],
        "max_depth": [2, 3, 4, 5, 6],
        "n_estimators": [10, 15, 20, 25, 30]
    }

    run_boosting("Pulsar", x_train, x_test, y_train, y_test, tuned_parameters)
Exemplo n.º 3
0
def run_pulsar_nn():
    name = 'Pulsar'

    x_train, x_test, y_train, y_test = get_pulsar_data()

    run_nn(name, x_train, x_test, y_train, y_test)

    run_rhc_nn(name, x_train, x_test, y_train, y_test)
    run_sa_nn(name, x_train, x_test, y_train, y_test)
    run_ga_nn(name, x_train, x_test, y_train, y_test)
def run_pulsar_nn():
    tuned_parameters = {
        "C": [0.1, 1, 10],
        'gamma': [0.001, 0.01, 0.1]
    }

    tuned_parameters = {
        'max_iter': [1000],
        'alpha': 10.0 ** -np.arange(1, 5),
        'hidden_layer_sizes':np.arange(10, 15),
        'random_state':[99]
        }

    iter_range = np.arange(1,200,10)

    x_train, x_test, y_train, y_test = get_pulsar_data()
    run_nn("Pulsar", x_train, x_test, y_train, y_test, tuned_parameters, iter_range)
Exemplo n.º 5
0
def run_pulsar_knn():
    x_train, x_test, y_train, y_test = get_pulsar_data()
    tuned_parameters = [{'n_neighbors': list(range(1, 10))}]
    run_knn("Pulsar", x_train, x_test, y_train, y_test, tuned_parameters)
def run_pulsar_dt():
    x_train, x_test, y_train, y_test = get_pulsar_data()
    run_dt("Pulsar", x_train, x_test, y_train, y_test)