def evaluate_power(clf):
    res = np.empty(shape=(NUM_PASSES, 1))
    load_train = get_stats(res, check_load_training, clf, TRAIN_PATH)
    print('Loading Training: ', load_train)
    load_test = get_stats(res, check_load_testing, clf, TEST_PATH)
    print('Loading Testing: ', load_test)
    train = get_stats(res, check_training, clf)
    print('Training: ', train)
    test_dataset = get_stats(res, check_testing_entire_dataset, clf)
    print('Testing dataset: ', test_dataset)
    row = clf.testing[0].iloc[0].values.reshape(1, (- 1))
    test_row = get_stats(res, check_predict_row, clf, row)
    print('Testing one row: ', test_row)
    with open('results.csv', 'a', newline='') as csvf:
        csv_writer = csv.writer(csvf)
        csv_writer.writerow([clf.__class__.__name__, 'Number of Passes:', NUM_PASSES, 'Power'])
        csv_writer.writerow(['Function', 'Time (s) Mean', 'Time Std', 'Total Power (microwatt-hour)'])
        csv_writer.writerow((['Loading Training Data'] + load_train))
        csv_writer.writerow((['Loading Testing Data'] + load_test))
        csv_writer.writerow((['Training Classifier'] + train))
        csv_writer.writerow((['Testing Dataset'] + test_dataset))
        csv_writer.writerow((['Testing One Row'] + test_row))
def evaluate_power(clf):
    res = np.empty(shape=(NUM_PASSES, 1))
    load_train = get_stats(res, check_load_training, clf, TRAIN_PATH)
    print('Loading Training: ', load_train)
    load_test = get_stats(res, check_load_testing, clf, TEST_PATH)
    print('Loading Testing: ', load_test)
    train = get_stats(res, check_training, clf)
    print('Training: ', train)
    test_dataset = get_stats(res, check_testing_entire_dataset, clf)
    print('Testing dataset: ', test_dataset)
    row = clf.testing[0].iloc[0].values.reshape(1, (- 1))
    test_row = get_stats(res, check_predict_row, clf, row)
    print('Testing one row: ', test_row)
    with open('results.csv', 'a', newline=) as csvf:
        csv_writer = csv.writer(csvf)
        csv_writer.writerow([clf.__class__.__name__, 'Number of Passes:', NUM_PASSES, 'Power'])
        csv_writer.writerow(['Function', 'Time (s) Mean', 'Time Std', 'Total Power (microwatt-hour)'])
        csv_writer.writerow((['Loading Training Data'] + load_train))
        csv_writer.writerow((['Loading Testing Data'] + load_test))
        csv_writer.writerow((['Training Classifier'] + train))
        csv_writer.writerow((['Testing Dataset'] + test_dataset))
        csv_writer.writerow((['Testing One Row'] + test_row))