<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace NeuralNetwork.Classes
{
    public class Network
    {
        #region -- Properties --
        public double LearnRate { get; set; }
        public double Momentum { get; set; }
        public List<Neuron> InputLayer { get; set; }
        public List<Neuron> HiddenLayer { get; set; }
        public List<Neuron> OutputLayer { get; set; }
        private static readonly Random Random = new Random();
        #endregion

        #region -- Constructor --
        public Network(int inputSize, int hiddenSize, int outputSize, double? learnRate = null, double? momentum = null)
        {
            LearnRate = learnRate ?? .9;
            Momentum = momentum ?? .06;
            InputLayer = new List<Neuron>();
            HiddenLayer = new List<Neuron>();
            OutputLayer = new List<Neuron>();

            for (var i = 0; i < inputSize; i++)
                InputLayer.Add(new Neuron());

            for (var i = 0; i < hiddenSize; i++)
                HiddenLayer.Add(new Neuron(InputLayer));

            for (var i = 0; i < outputSize; i++)
                OutputLayer.Add(new Neuron(HiddenLayer));<commit_msg>Modified default momentum and learning rate.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;

namespace NeuralNetwork.Classes
{
    public class Network
    {
        #region -- Properties --
        public double LearnRate { get; set; }
        public double Momentum { get; set; }
        public List<Neuron> InputLayer { get; set; }
        public List<Neuron> HiddenLayer { get; set; }
        public List<Neuron> OutputLayer { get; set; }
        private static readonly Random Random = new Random();
        #endregion

        #region -- Constructor --
        public Network(int inputSize, int hiddenSize, int outputSize, double? learnRate = null, double? momentum = null)
        {
            LearnRate = learnRate ?? .4;
            Momentum = momentum ?? .9;
            InputLayer = new List<Neuron>();
            HiddenLayer = new List<Neuron>();
            OutputLayer = new List<Neuron>();

            for (var i = 0; i < inputSize; i++)
                InputLayer.Add(new Neuron());

            for (var i = 0; i < hiddenSize; i++)
                HiddenLayer.Add(new Neuron(InputLayer));

            for (var i = 0; i < outputSize; i++)
                OutputLayer.Add(new Neuron(HiddenLayer));
{'fraction_non_alphanumeric': 0.1097165991902834, 'fraction_numerical': 0.004453441295546558, 'mean_word_length': 2.084893882646692, 'pattern_counts': {'":': 0, '<': 21, '<?xml version=': 0, '>': 15, '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': '2881550', 'n_tokens_mistral': 695, 'n_tokens_neox': 649, 'n_words': 210}