def nn(self, input_file, output_file, weights_file, total_epochs, learning_rate):
    simple_example = pd.read_csv(input_file, sep=',')
    social_features = simple_example[['follower_nbr', 'followee_nbr', 'tweets_nbr', 'avg_length_tweets']].values
    true_labels = simple_example[['label']].values
    n = social_features.shape[0]
    m = social_features.shape[1]
    (p_z_i_0, p_z_i_1) = self.init_probabilities(n)
    n_neurons = 3
    steps = 1
    hidden = True
    size_train = int((0.8 * n))
    classifier = self.define_nn(n_neurons, hidden, m, learning_rate)
    (result, eval_model, weights, metrics_names, theta_i) = self.train(classifier, social_features, true_labels, p_z_i_1, total_epochs, steps, size_train)
    np.savetxt(weights_file, weights, delimiter=',')
    result.to_csv(output_file)
    metrics = pd.DataFrame(np.array(eval_model).reshape(1, 1), columns=[['accuracy']])
    with open(output_file, 'a') as f:
        metrics.to_csv(f, header=True)
def nn(self, input_file, output_file, weights_file, total_epochs, learning_rate):
    simple_example = pd.read_csv(input_file, sep=',')
    social_features = simple_example[['follower_nbr', 'followee_nbr', 'tweets_nbr', 'avg_length_tweets']].values
    true_labels = simple_example[['label']].values
    n = social_features.shape[0]
    m = social_features.shape[1]
    (p_z_i_0, p_z_i_1) = self.init_probabilities(n)
    n_neurons = 3
    steps = 1
    hidden = True
    size_train = int((0.8 * n))
    classifier = self.define_nn(n_neurons, hidden, m, learning_rate)
    (result, eval_model, weights, metrics_names, theta_i) = self.train(classifier, social_features, true_labels, p_z_i_1, total_epochs, steps, size_train)
    np.savetxt(weights_file, weights, delimiter=',')
    result.to_csv(output_file)
    metrics = pd.DataFrame(np.array(eval_model).reshape(1, 1), columns=[['accuracy']])
    with open(output_file, 'a') as f:
        metrics.to_csv(f, header=True)