| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849 |
- using NeuralNetworkPCL;
- using System;
- using System.IO;
- using System.Linq;
- namespace NeuralNetworkProgram
- {
- class MainProgram : IHM
- {
- static void Main(string[] args)
- {
- MainProgram prog = new MainProgram();
- prog.Run();
- }
- private void Run()
- {
- // Problème du OU Exclusif (XOR)
- /*String[] content = ReadFile("xor.txt", true);
- NeuralSystem system = new NeuralSystem(2, 2, 1, content, 1.0, this);*/
- // Problème Abalone
- String[] content = ReadFile("abalone_norm.txt", false); // Le fichier est ajouté au projet comme contenu, et avec la propriété "copier si plus récent"
- NeuralSystem system = new NeuralSystem(10, 4, 1, content, 0.8, this);
- system.LearningRate(0.1);
- system.Run();
- while (true) ;
- }
- private String[] ReadFile(String _filename, bool _removeFirstLine)
- {
- String[] content = File.ReadAllLines(@_filename);
- if (_removeFirstLine)
- {
- content = content.Skip(1).ToArray();
- }
- return content;
- }
- public void PrintMsg(string _msg)
- {
- Console.Out.WriteLine(_msg);
- }
- }
- }
|