1 |
ebe96ca4
|
Roman Kalivoda
|
//
|
2 |
|
|
// Author: Roman Kalivoda
|
3 |
|
|
//
|
4 |
|
|
|
5 |
|
|
using System.Collections.Generic;
|
6 |
d358b79e
|
Roman Kalivoda
|
using ServerApp.Connection.XMLProtocolHandler;
|
7 |
ebe96ca4
|
Roman Kalivoda
|
|
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 |
662b2404
|
Roman Kalivoda
|
/// <returns>A list with all existing predictors.</returns>
|
18 |
ebe96ca4
|
Roman Kalivoda
|
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 |
ce0940b5
|
Roman Kalivoda
|
void Load(string locationKey = null, string path = null);
|
32 |
ebe96ca4
|
Roman Kalivoda
|
|
33 |
|
|
/// <summary>
|
34 |
d358b79e
|
Roman Kalivoda
|
/// Predicts turnout level at given time supposing given weather conditions.
|
35 |
ebe96ca4
|
Roman Kalivoda
|
/// </summary>
|
36 |
d358b79e
|
Roman Kalivoda
|
/// <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 |
ebe96ca4
|
Roman Kalivoda
|
}
|
40 |
|
|
}
|