3 writes to _host
Microsoft.ML.TimeSeries (3)
AdaptiveSingularSpectrumSequenceModeler.cs (3)
234
_host
= env.Register(LoaderSignature);
297
_host
= model._host.Register(LoaderSignature);
341
_host
= env.Register(LoaderSignature);
54 references to _host
Microsoft.ML.TimeSeries (54)
AdaptiveSingularSpectrumSequenceModeler.cs (54)
235
_host
.CheckParam(windowSize >= 2, nameof(windowSize), "The window size should be at least 2."); // ...because otherwise we have nothing to autoregress on
236
_host
.CheckParam(seriesLength > windowSize, nameof(seriesLength), "The series length should be greater than the window size.");
237
_host
.Check(trainSize > 2 * windowSize, "The input size for training should be greater than twice the window size.");
238
_host
.CheckParam(0 <= discountFactor && discountFactor <= 1, nameof(discountFactor), "The discount factor should be in [0,1].");
239
_host
.CheckParam(maxGrowth == null || maxGrowth.Value.TimeSpan > 0, nameof(GrowthRatio.TimeSpan), "The time span must be strictly positive.");
240
_host
.CheckParam(maxGrowth == null || maxGrowth.Value.Growth >= 0, nameof(GrowthRatio.Growth), "The growth must be non-negative.");
245
_host
.CheckParam(1 <= _maxRank && _maxRank < windowSize, nameof(maxRank),
257
_host
.CheckParam(1 <= _rank && _rank < windowSize, nameof(rank), "The rank should be in [1, windowSize).");
297
_host = model.
_host
.Register(LoaderSignature);
298
_host
.Assert(model._windowSize >= 2);
299
_host
.Assert(model._seriesLength > model._windowSize);
300
_host
.Assert(model._trainSize > 2 * model._windowSize);
301
_host
.Assert(0 <= model._discountFactor && model._discountFactor <= 1);
302
_host
.Assert(1 <= model._rank && model._rank < model._windowSize);
367
_host
.CheckDecode(_seriesLength > 2);
370
_host
.CheckDecode(_windowSize >= 2);
371
_host
.CheckDecode(_seriesLength > _windowSize);
374
_host
.CheckDecode(_trainSize > 2 * _windowSize);
377
_host
.CheckDecode(1 <= _rank && _rank < _windowSize);
380
_host
.CheckDecode(0 <= _discountFactor && _discountFactor <= 1);
388
_host
.CheckDecode(Utils.Size(_alpha) == _windowSize - 1);
393
_host
.CheckDecode(Utils.Size(_state) == _windowSize - 1);
401
_host
.CheckDecode(_observationNoiseVariance >= 0);
404
_host
.CheckDecode(_autoregressionNoiseVariance >= 0);
412
_host
.CheckDecode(1 <= _maxRank && _maxRank <= _windowSize - 1);
428
_host
.CheckDecode(_maxTrendRatio >= 0);
433
_host
.CheckDecode(Utils.Size(tempArray) == _rank * _windowSize);
443
_buffer = TimeSeriesUtils.DeserializeFixedSizeQueueSingle(ctx.Reader,
_host
);
450
_host
.CheckValue(ctx, nameof(ctx));
454
_host
.Assert(_windowSize >= 2);
455
_host
.Assert(_seriesLength > _windowSize);
456
_host
.Assert(_trainSize > 2 * _windowSize);
457
_host
.Assert(0 <= _discountFactor && _discountFactor <= 1);
458
_host
.Assert(1 <= _rank && _rank < _windowSize);
459
_host
.Assert(Utils.Size(_alpha) == _windowSize - 1);
460
_host
.Assert(_observationNoiseVariance >= 0);
461
_host
.Assert(_autoregressionNoiseVariance >= 0);
462
_host
.Assert(1 <= _maxRank && _maxRank <= _windowSize - 1);
463
_host
.Assert(_maxTrendRatio >= 0);
1168
_host
.CheckParam(data != null, nameof(data), "The input series for training cannot be null.");
1169
_host
.CheckParam(data.Count >= _trainSize, nameof(data), "The input series for training does not have enough points for training.");
1188
using (var ch =
_host
.Start("Train"))
1209
_host
.CheckValue(data, nameof(data));
1210
_host
.CheckParam(data.Schema.Feature.HasValue, nameof(data), "Must have features column.");
1213
throw
_host
.ExceptSchemaMismatch(nameof(data), "feature", featureCol.Name, "Single", featureCol.Type.ToString());
1238
using (var ch =
_host
.Start("Train"))
1253
_host
.Assert(Utils.Size(dataArray) > 0);
1263
TrajectoryMatrix tMat = new TrajectoryMatrix(
_host
, dataArray, _windowSize, originalSeriesLength);
1313
using (var ch =
_host
.Start("Train"))
1357
using (var ch =
_host
.Start("Train"))
1420
_host
.CheckParam(horizon >= 1, nameof(horizon), "The horizon parameter should be greater than 0.");
1425
_host
.CheckParam(result is SsaForecastResult, nameof(result), str);
1554
_host
.CheckParam(dataView != null, nameof(dataView), "The input series for updating cannot be null.");
1558
throw
_host
.ExceptUserArg(nameof(data.Schema.Feature.Value.Name), "The time series input column has " +