<commit_before>//
//  Functions.h
//  Functor classes for activation and activation derivative functions.
//

#include <Eigen/Dense>
#include <cmath>

#ifndef Cynapse_Functions_h
#define Cynapse_Functions_h

double sigmoid(double theta) {
    return 1.0 / (1.0 + exp(-theta));
}

double heaviside(double theta) {
    return (theta >= 0.5 ? 1.0 : 0.0);
}

double sigmoid_derivative(double z) {
    return sigmoid(z) * (1-sigmoid(z));
}

Eigen::MatrixXd quadratic_cost_derivative(Eigen::MatrixXd output, Eigen::MatrixXd input) {
    return output - input;
}

#endif<commit_msg>Refs #1 Add more logical code order.<commit_after>//
//  Functions.h
//  Functor classes for activation and activation derivative functions.
//

#include <Eigen/Dense>
#include <cmath>

#ifndef Cynapse_Functions_h
#define Cynapse_Functions_h

double sigmoid(double theta) {
    return 1.0 / (1.0 + exp(-theta));
}

double sigmoid_derivative(double z) {
    return sigmoid(z) * (1-sigmoid(z));
}

double heaviside(double theta) {
    return (theta >= 0.5 ? 1.0 : 0.0);
}

Eigen::MatrixXd quadratic_cost_derivative(Eigen::MatrixXd output, Eigen::MatrixXd input) {
    return output - input;
}

#endif
{'fraction_non_alphanumeric': 0.1329923273657289, 'fraction_numerical': 0.0196078431372549, 'mean_word_length': 4.149122807017544, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2530359', 'n_tokens_mistral': 447, 'n_tokens_neox': 420, 'n_words': 101}