Skip to content

Commit ff9f461

Browse files
committed
cleanup.
1 parent b486f1e commit ff9f461

File tree

2 files changed

+50
-42
lines changed

2 files changed

+50
-42
lines changed
+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
using Microsoft.ML.Runtime;
2+
using Microsoft.ML.Runtime.Data;
3+
using System;
4+
using System.Collections.Generic;
5+
using System.Text;
6+
7+
namespace Microsoft.ML.TimeSeries
8+
{
9+
/// <summary>
10+
/// Interface for forecasting models.
11+
/// </summary>
12+
/// <typeparam name="T">The type of values that are forecasted.</typeparam>
13+
public interface ICanForecast<out T>
14+
{
15+
/// <summary>
16+
/// Train a forecasting model from an <see cref="IDataView"/>.
17+
/// </summary>
18+
/// <param name="dataView">Reference to the <see cref="IDataView"/></param>
19+
/// <param name="inputColumnName">Name of the input column to train the forecasing model.</param>
20+
void Train(IDataView dataView, string inputColumnName);
21+
22+
/// <summary>
23+
/// Update a forecasting model with the new observations in the form of an <see cref="IDataView"/>.
24+
/// </summary>
25+
/// <param name="dataView">Reference to the observations as an <see cref="IDataView"/></param>
26+
/// <param name="inputColumnName">Name of the input column to update from.</param>
27+
void Update(IDataView dataView, string inputColumnName);
28+
29+
/// <summary>
30+
/// Perform forecasting until a particular <paramref name="horizon"/>.
31+
/// </summary>
32+
/// <param name="horizon">Number of values to forecast.</param>
33+
/// <returns></returns>
34+
T[] Forecast(int horizon);
35+
36+
/// <summary>
37+
/// Serialize the forecasting model to disk to preserve the state of forecasting model.
38+
/// </summary>
39+
/// <param name="env">Reference to <see cref="IHostEnvironment"/>, typically <see cref="MLContext"/></param>
40+
/// <param name="filePath">Name of the filepath to serialize the model to.</param>
41+
void Checkpoint(IHostEnvironment env, string filePath);
42+
43+
/// <summary>
44+
/// Deserialize the forecasting model from disk.
45+
/// </summary>
46+
/// <param name="env">Reference to <see cref="IHostEnvironment"/>, typically <see cref="MLContext"/></param>
47+
/// <param name="filePath">Name of the filepath to deserialize the model from.</param>
48+
ICanForecast<T> LoadFrom(IHostEnvironment env, string filePath);
49+
}
50+
}

src/Microsoft.ML.TimeSeries/PredictionFunction.cs

-42
Original file line numberDiff line numberDiff line change
@@ -11,48 +11,6 @@
1111

1212
namespace Microsoft.ML.Transforms.TimeSeries
1313
{
14-
/// <summary>
15-
/// Interface for forecasting models.
16-
/// </summary>
17-
/// <typeparam name="T">The type of values that are forecasted.</typeparam>
18-
public interface ICanForecast<out T>
19-
{
20-
/// <summary>
21-
/// Train a forecasting model from an <see cref="IDataView"/>.
22-
/// </summary>
23-
/// <param name="dataView">Reference to the <see cref="IDataView"/></param>
24-
/// <param name="inputColumnName">Name of the input column to train the forecasing model.</param>
25-
void Train(IDataView dataView, string inputColumnName);
26-
27-
/// <summary>
28-
/// Update a forecasting model with the new observations in the form of an <see cref="IDataView"/>.
29-
/// </summary>
30-
/// <param name="dataView">Reference to the observations as an <see cref="IDataView"/></param>
31-
/// <param name="inputColumnName">Name of the input column to update from.</param>
32-
void Update(IDataView dataView, string inputColumnName);
33-
34-
/// <summary>
35-
/// Perform forecasting until a particular <paramref name="horizon"/>.
36-
/// </summary>
37-
/// <param name="horizon">Number of values to forecast.</param>
38-
/// <returns></returns>
39-
T[] Forecast(int horizon);
40-
41-
/// <summary>
42-
/// Serialize the forecasting model to disk to preserve the state of forecasting model.
43-
/// </summary>
44-
/// <param name="env">Reference to <see cref="IHostEnvironment"/>, typically <see cref="MLContext"/></param>
45-
/// <param name="filePath">Name of the filepath to serialize the model to.</param>
46-
void Checkpoint(IHostEnvironment env, string filePath);
47-
48-
/// <summary>
49-
/// Deserialize the forecasting model from disk.
50-
/// </summary>
51-
/// <param name="env">Reference to <see cref="IHostEnvironment"/>, typically <see cref="MLContext"/></param>
52-
/// <param name="filePath">Name of the filepath to deserialize the model from.</param>
53-
ICanForecast<T> LoadFrom(IHostEnvironment env, string filePath);
54-
}
55-
5614
internal interface IStatefulRowToRowMapper : IRowToRowMapper
5715
{
5816
}

0 commit comments

Comments
 (0)