1
|
using ServerApp.Parser.Parsers;
|
2
|
using ServerApp.Predictor;
|
3
|
using System;
|
4
|
using System.Collections.Generic;
|
5
|
|
6
|
namespace ServerApp
|
7
|
{
|
8
|
class Program
|
9
|
{
|
10
|
static void Main(string[] args)
|
11
|
{
|
12
|
DataParser p = new DataParser();
|
13
|
|
14
|
p.Parse();
|
15
|
|
16
|
NaiveBayesClassifier naiveBayesClassifier = new NaiveBayesClassifier();
|
17
|
IEnumerable<ModelInput> modelInput = naiveBayesClassifier.ExtractModelInput(p.weatherList, p.jisList);
|
18
|
naiveBayesClassifier.Fit(modelInput);
|
19
|
var testData = new ModelInput()
|
20
|
{
|
21
|
Col1 = -40,
|
22
|
};
|
23
|
List<ModelInput> dataList = new List<ModelInput>();
|
24
|
dataList.Add(testData);
|
25
|
var result = naiveBayesClassifier.Predict(dataList);
|
26
|
|
27
|
Console.WriteLine($"Prediction: {result.Prediction}");
|
28
|
|
29
|
Console.ReadLine();
|
30
|
}
|
31
|
}
|
32
|
}
|