Revize 9fc5fa93
Přidáno uživatelem Roman Kalivoda před více než 3 roky(ů)
Server/ServerApp/Program.cs | ||
---|---|---|
1 | 1 |
using ServerApp.Parser.Parsers; |
2 |
using ServerApp.Predictor; |
|
2 | 3 |
using System; |
4 |
using System.Collections.Generic; |
|
3 | 5 |
|
4 | 6 |
namespace ServerApp |
5 | 7 |
{ |
... | ... | |
11 | 13 |
|
12 | 14 |
p.Parse(); |
13 | 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 |
|
|
14 | 29 |
Console.ReadLine(); |
15 | 30 |
} |
16 | 31 |
} |
Také k dispozici: Unified diff
Draft Predictor
re #8598 @2h