aswi2021tri-musketyri-gitlab/Server/ServerApp/Program.cs @ d39750f3
1 |
using Connection; |
---|---|
2 |
using ServerApp.Parser.Parsers; |
3 |
using ServerApp.Predictor; |
4 |
using System; |
5 |
using System.Collections.Generic; |
6 |
|
7 |
namespace ServerApp |
8 |
{
|
9 |
class Program |
10 |
{
|
11 |
static void Main(string[] args) |
12 |
{
|
13 |
DataParser p = new DataParser("data/"); |
14 |
|
15 |
p.Parse(new DateTime(), new DateTime()); |
16 |
|
17 |
Console.ReadLine(); |
18 |
|
19 |
|
20 |
// test scenario - data download:
|
21 |
//DataDownloader dd = new DataDownloader();
|
22 |
// List<string> savedFiles = new List<string>();
|
23 |
// savedFiles.AddRange(dd.DownloadData(DataType.JIS, DataFormat.CSV, 2017, 2021, 0, 13));
|
24 |
// savedFiles.AddRange(dd.DownloadData(DataType.POCASI, DataFormat.CSV, 2017, 2021, 0, 13));
|
25 |
// savedFiles.AddRange(dd.DownloadData(DataType.STROJE, DataFormat.CSV, 2017, 2021, 0, 13));
|
26 |
|
27 |
|
28 |
// Console.WriteLine("Saved files: ");
|
29 |
// foreach(string s in savedFiles)
|
30 |
//{
|
31 |
// Console.WriteLine(s);
|
32 |
//}
|
33 |
|
34 |
/*
|
35 |
|
36 |
// test - connection:
|
37 |
AsynchronousSocketListener asl = new AsynchronousSocketListener();
|
38 |
asl.StartListening();
|
39 |
|
40 |
|
41 |
NaiveBayesClassifier naiveBayesClassifier = new NaiveBayesClassifier();
|
42 |
IEnumerable<ModelInput> modelInput = naiveBayesClassifier.ExtractModelInput(p.weatherList, p.jisList);
|
43 |
naiveBayesClassifier.Fit(modelInput);
|
44 |
List<ModelInput> dataList = new List<ModelInput>()
|
45 |
{
|
46 |
new ModelInput()
|
47 |
{
|
48 |
Temp = -40,
|
49 |
}
|
50 |
};
|
51 |
var result = naiveBayesClassifier.Predict(dataList);
|
52 |
|
53 |
Console.WriteLine($"Predictions: ");
|
54 |
foreach(var item in result)
|
55 |
{
|
56 |
Console.WriteLine(item.ToString());
|
57 |
}
|
58 |
|
59 |
Console.ReadLine();
|
60 |
*/
|
61 |
}
|
62 |
}
|
63 |
}
|