1
|
//
|
2
|
// Author: Roman Kalivoda
|
3
|
//
|
4
|
|
5
|
using System;
|
6
|
using System.Collections.Generic;
|
7
|
using System.IO;
|
8
|
using Microsoft.ML;
|
9
|
using ServerApp.Parser.OutputInfo;
|
10
|
|
11
|
namespace ServerApp.Predictor
|
12
|
{
|
13
|
/// <summary>
|
14
|
/// Interface for PredictionController class. Defines basic interface methods to access the "model" package.
|
15
|
/// </summary>
|
16
|
public interface IPredictionController
|
17
|
{
|
18
|
/// <summary>
|
19
|
/// </summary>
|
20
|
/// <returns>A dictionary with all existing predictors.</returns>
|
21
|
List<string> GetPredictors();
|
22
|
|
23
|
/// <summary>
|
24
|
/// Trains all predictors. The training data are taken from given path location.
|
25
|
/// </summary>
|
26
|
/// <param name="locationKey">A string identifier of the location for which to train a predictor.</param>
|
27
|
void Train(string locationKey = null);
|
28
|
|
29
|
/// <summary>
|
30
|
/// Loads trained predictors from files in <c>path</c>.
|
31
|
/// </summary>
|
32
|
/// <param name="locationKey">A string identifier of the location for which to load a predictor.</param>
|
33
|
/// <param name="path">A path to folder with trained prediction model.</param>
|
34
|
void Load(string locationKey = null,string path = null);
|
35
|
|
36
|
/// <summary>
|
37
|
/// Predicts turnout level at given location at given time supposing given weather conditions.
|
38
|
/// </summary>
|
39
|
/// <param name="locationKey">String identifier of the location.</param>
|
40
|
/// <param name="weather">Weather conditions.</param>
|
41
|
/// <param name="dateTime">Date and time.</param>
|
42
|
/// <returns></returns>
|
43
|
IDataView Predict(string locationKey, WeatherInfo weather, DateTime dateTime);
|
44
|
}
|
45
|
}
|