Projekt

Obecné

Profil

Stáhnout (1.26 KB) Statistiky
| Větev: | Tag: | Revize:
1
//
2
// Author: Roman Kalivoda
3
//
4

    
5
using System;
6
using System.Collections.Generic;
7
using System.Linq;
8
using System.Text;
9
using System.Threading.Tasks;
10
using Microsoft.ML;
11
using Microsoft.ML.Data;
12

    
13

    
14
namespace ServerApp.Predictor
15
{
16
    /// <summary>
17
    /// A predictor interface.
18
    /// </summary>
19
    public interface IPredictor
20
    {
21
        /// <summary>
22
        /// Trains the predictor with the given training data input.
23
        /// </summary>
24
        /// <param name="trainInput">A collection of <c>ModelInput</c> instances. The objects contain both feature vector inputs and corresponding labels.</param>
25
        void Fit(IEnumerable<ModelInput> trainInput);
26

    
27
        /// <summary>
28
        /// Predicts class to the given feature vector.
29
        /// </summary>
30
        /// <param name="input">A feature vector in <c>ModelInput</c> instance.</param>
31
        /// <returns>A predicted label.</returns>
32
        string Predict(ModelInput input);
33

    
34
        /// <summary>
35
        /// Evaluates the model on <paramref name="modelInputs"/> and prints metrics to console.
36
        /// </summary>
37
        /// <param name="modelInputs">Input data used to evaluate the predictor.</param>
38
        void Evaluate(IEnumerable<ModelInput> modelInputs);
39

    
40
        // TODO define Save method
41
    }
42
}
(3-3/7)