Revize 66c3e0df
Přidáno uživatelem Roman Kalivoda před více než 3 roky(ů)
Server/ServerApp/Program.cs | ||
---|---|---|
16 | 16 |
NaiveBayesClassifier naiveBayesClassifier = new NaiveBayesClassifier(); |
17 | 17 |
IEnumerable<ModelInput> modelInput = naiveBayesClassifier.ExtractModelInput(p.weatherList, p.jisList); |
18 | 18 |
naiveBayesClassifier.Fit(modelInput); |
19 |
var testData = new ModelInput()
|
|
19 |
List<ModelInput> dataList = new List<ModelInput>()
|
|
20 | 20 |
{ |
21 |
Col1 = -40, |
|
21 |
new ModelInput() |
|
22 |
{ |
|
23 |
Temp = -40, |
|
24 |
} |
|
22 | 25 |
}; |
23 |
List<ModelInput> dataList = new List<ModelInput>(); |
|
24 |
dataList.Add(testData); |
|
25 | 26 |
var result = naiveBayesClassifier.Predict(dataList); |
26 | 27 |
|
27 |
Console.WriteLine($"Prediction: {result.Prediction}"); |
|
28 |
Console.WriteLine($"Predictions: "); |
|
29 |
foreach(var item in result) |
|
30 |
{ |
|
31 |
Console.WriteLine(item.ToString()); |
|
32 |
} |
|
28 | 33 |
|
29 | 34 |
Console.ReadLine(); |
30 | 35 |
} |
Také k dispozici: Unified diff
re #8598
Update Server/ServerApp/ServerApp.csproj
fixed corrupted dependencies
working simple classification