Projekt

Obecné

Profil

Stáhnout (1.56 KB) Statistiky
| Větev: | Tag: | Revize:
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.Connection.XMLProtocolHandler;
10
using ServerApp.Parser.OutputInfo;
11

    
12
namespace ServerApp.Predictor
13
{
14
    /// <summary>
15
    /// Interface for PredictionController class. Defines basic interface methods to access the "model" package.
16
    /// </summary>
17
    public interface IPredictionController
18
    {
19
        /// <summary>
20
        /// </summary>
21
        /// <returns>A list with all existing predictors.</returns>
22
        List<string> GetPredictors();
23

    
24
        /// <summary>
25
        /// Trains all predictors. The training data are taken from given path location.
26
        /// </summary>
27
        /// <param name="locationKey">A string identifier of the location for which to train a predictor.</param>
28
        void Train(string locationKey = null);
29

    
30
        /// <summary>
31
        /// Loads trained predictors from files in <c>path</c>.
32
        /// </summary>
33
        /// <param name="locationKey">A string identifier of the location for which to load a predictor.</param>
34
        /// <param name="path">A path to folder with trained prediction model.</param>
35
        void Load(string locationKey = null,string path = null);
36

    
37
        /// <summary>
38
        /// Predicts turnout level at given time supposing given weather conditions.
39
        /// </summary>
40
        /// <param name="request">A request with time and weather information.</param>
41
        /// <returns>A server response filled with predictions.</returns>
42
        Response Predict(Request request);
43
    }
44
}
(2-2/7)