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