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."); 1188using (var ch = _host.Start("Train")) 1209_host.CheckValue(data, nameof(data)); 1210_host.CheckParam(data.Schema.Feature.HasValue, nameof(data), "Must have features column."); 1213throw _host.ExceptSchemaMismatch(nameof(data), "feature", featureCol.Name, "Single", featureCol.Type.ToString()); 1238using (var ch = _host.Start("Train")) 1253_host.Assert(Utils.Size(dataArray) > 0); 1263TrajectoryMatrix tMat = new TrajectoryMatrix(_host, dataArray, _windowSize, originalSeriesLength); 1313using (var ch = _host.Start("Train")) 1357using (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."); 1558throw _host.ExceptUserArg(nameof(data.Schema.Feature.Value.Name), "The time series input column has " +