Beispiel #1
0
def main():
    np.random.seed(311)
    # import the datasets
    x_census_data, y_census_data = process_data.process_census_data(
        './../Datasets/Census_Income')
    x_stock_data, y_stock_data = process_data.process_stock_data(
        './../Datasets/Stocks', ["2016", "2017"])

    stock_params = {
        'variance': range(1, 221),
        'name': "Stock Data",
        'svd_graph_recon': "Stock Data Reconstruction Graph of SVD",
        'n_components': 100,
        'filename': "stock_data_svd.txt",
        'svd_graph': "Stock Data - Data Plotted on Principal Axes using SVD"
    }

    census_params = {
        'variance': range(1, 13),
        'name': "Census Data",
        'svd_graph_recon': "Census Data Reconstruction Graph of SVD",
        'n_components': 4,
        'filename': "census_data_svd.txt",
        'svd_graph': "Census Data - Data Plotted on Principal Axes using SVD"
    }

    run_svd_reconstruction(stock_params, x_stock_data)
    run_svd_reconstruction(census_params, x_census_data)
    run_svd(stock_params, x_stock_data, y_stock_data)
    run_svd(census_params, x_census_data, y_census_data)
def main():
    x_gas_data, y_gas_data = process_data.process_gas_data('./../Datasets/Gas_Data')
    x_stock_data, y_stock_data = process_data.process_stock_data('./../Datasets/Stocks', ["2016"])
    x_census_data, y_census_data = process_data.process_census_data('./../Datasets/Census_Income')
    # run_decision_tree(x_gas_data, y_gas_data, "Gas Sensor Data")
    # run_decision_tree(x_stock_data, y_stock_data, "Stock Data")
    run_decision_tree(x_census_data, y_census_data, "Census Data")
def main():
    np.random.seed(311)
    # import the datasets
    x_census_data, y_census_data = process_data.process_census_data(
        './../Datasets/Census_Income')
    x_stock_data, y_stock_data = process_data.process_stock_data(
        './../Datasets/Stocks', ["2016", "2017"])

    stock_params = {
        'variance': range(1, 221),
        'name': "Stock Data",
        'ica_graph_recon': "Stock Data Reconstruction Graph of ICA",
        'n_components': 100,
        'filename': "stock_data_ica.txt",
        'ica_title': 'Stock Data Kurtosis of Calculated Components',
        'ica_graph': "Stock Data on Principle Components of ICA"
    }

    census_params = {
        'variance': range(1, 14),
        'name': "Census Data",
        'ica_graph_recon': "Census Data Reconstruction Graph of ICA",
        'n_components': 4,
        'filename': "census_data_ica.txt",
        'ica_title': 'Census Data Kurtosis of Calculated Components',
        'ica_graph': "Census Data on Principle Components of ICA"
    }

    run_ica_reconstruction(stock_params, x_stock_data)
    run_ica_reconstruction(census_params, x_census_data)
    run_ica(stock_params, x_stock_data, y_stock_data)
    run_ica(census_params, x_census_data, y_census_data)
def main():
    x_gas_data, y_gas_data = process_data.process_gas_data(
        './../Datasets/Gas_Data')
    x_stock_data, y_stock_data = process_data.process_stock_data(
        './../Datasets/Stocks', ["2016"])
    run_knn_learning(x_gas_data, y_gas_data, "Gas Sensor Data")
    run_knn_learning(x_stock_data, y_stock_data, "Stock Data")
Beispiel #5
0
def main():
    x_gas_data, y_gas_data = process_data.process_gas_data(
        './../Datasets/Gas_Data')
    x_bank_data, y_bank_data = process_data.process_bank_data(
        './../Datasets/Banking')
    x_letter_data, y_letter_data = process_data.process_letter_data(
        './../Datasets/Letter')
    x_spam_data, y_spam_data = process_data.process_spam_data(
        './../Datasets/Spam')
    x_stock_data, y_stock_data = process_data.process_stock_data(
        './../Datasets/Stocks', ["2016"])
    neural_network_learning(x_gas_data, y_gas_data, "Gas Sensor Data")
    # neural_network_learning(x_bank_data, y_bank_data, "Bank Data")
    # neural_network_learning(x_letter_data, y_letter_data, "Letter Data")
    # neural_network_learning(x_spam_data, y_spam_data, "Spam Data")
    neural_network_learning(x_stock_data, y_stock_data, "Stock Data")
Beispiel #6
0
def main():
    x_gas_data, y_gas_data = process_data.process_gas_data(
        './../Datasets/Gas_Data')
    x_bank_data, y_bank_data = process_data.process_bank_data(
        './../Datasets/Banking')
    x_letter_data, y_letter_data = process_data.process_letter_data(
        './../Datasets/Letter')
    x_spam_data, y_spam_data = process_data.process_spam_data(
        './../Datasets/Spam')
    x_stock_data, y_stock_data = process_data.process_stock_data(
        './../Datasets/Stocks', ["2016"])
    run_boosted_learning(x_gas_data, y_gas_data, "Gas Sensor Data")
    # run_decision_tree(x_bank_data, y_bank_data, "Bank Data")
    # run_decision_tree(x_letter_data, y_letter_data, "Letter Data")
    # run_boosted_learning(x_spam_data, y_spam_data, "Spam Data")
    # run_boosted_learning_deep(x_gas_data, y_gas_data, "Gas Sensor Data")
    run_boosted_learning(x_stock_data, y_stock_data, "Stock Data")
def main():
    timer = time.time()

    x_gas_data, y_gas_data = process_data.process_gas_data(
        './../Datasets/Gas_Data')
    x_census_data, y_census_data = process_data.process_census_data(
        './../Datasets/Census_Income')
    x_stock_data, y_stock_data = process_data.process_stock_data(
        './../Datasets/Stocks', ["2016", "2017"])

    print("\n---------- Running Data on Decision Tree Learner -------------\n")
    decision_tree_learning.run_decision_tree(x_census_data, y_census_data,
                                             "Census Data")
    decision_tree_learning.run_decision_tree(x_stock_data, y_stock_data,
                                             "Stock Data")

    print(
        "\n---------- Running Data on Artificial Neural Network Learner -------------\n"
    )
    ann_learning.neural_network_learning(x_census_data, y_census_data,
                                         "Census Data")
    ann_learning.neural_network_learning(x_stock_data, y_stock_data,
                                         "Stock Data")

    print(
        "\n---------- Running Data on Decision Tree Learner with Adaboost -------------\n"
    )
    boosted_learning.run_boosted_learning(x_census_data, y_census_data,
                                          "Census Data")
    boosted_learning.run_boosted_learning(x_stock_data, y_stock_data,
                                          "Stock Data")

    print(
        "\n---------- Running Data on Support Vector Learner -------------\n")
    support_vector_learning.run_svc_learning(x_census_data, y_census_data,
                                             "Census Data")
    support_vector_learning.run_svc_learning(x_stock_data, y_stock_data,
                                             "Stock Data")

    print("\n---------- Running Data on KNN Learner -------------\n")
    knn_learning.run_knn_learning(x_census_data, y_census_data, "Census Data")
    knn_learning.run_knn_learning(x_stock_data, y_stock_data, "Stock Data")

    print("Total Execution time: " + str(time.time() - timer) + "s")