internal void SaveThis(ModelSaveContext ctx) { Host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(); Host.Assert(InitialWindowSize == 0); Host.Assert(2 <= SeasonalWindowSize); Host.Assert(0 <= DiscountFactor && DiscountFactor <= 1); Host.Assert(Enum.IsDefined(typeof(ErrorFunction), ErrorFunction)); Host.Assert(Model != null); // *** Binary format *** // <base> // int: _seasonalWindowSize // float: _discountFactor // byte: _errorFunction // bool: _isAdaptive // State: StateRef // AdaptiveSingularSpectrumSequenceModeler: _model base.SaveModel(ctx); ctx.Writer.Write(SeasonalWindowSize); ctx.Writer.Write(DiscountFactor); ctx.Writer.Write((byte)ErrorFunction); ctx.Writer.Write(IsAdaptive); StateRef.Save(ctx.Writer); ctx.SaveModel(Model, "SSA"); }
internal void SaveThis(ModelSaveContext ctx) { ctx.CheckAtModel(); base.SaveModel(ctx); // *** Binary format *** // <base> // State: StateRef StateRef.Save(ctx.Writer); }
internal void SaveThis(ModelSaveContext ctx) { ctx.CheckAtModel(); Host.Assert(InitialWindowSize == 0); base.SaveModel(ctx); // *** Binary format *** // <base> // State: StateRef StateRef.Save(ctx.Writer); }
private protected override void SaveModel(ModelSaveContext ctx) { ctx.CheckAtModel(); Host.Assert(InitialWindowSize == 0); base.SaveModel(ctx); // *** Binary format *** // <base> // State: StateRef StateRef.Save(ctx.Writer); }
internal void SaveThis(ModelSaveContext ctx) { Host.CheckValue(ctx, nameof(ctx)); ctx.CheckAtModel(); Host.Assert(InitialWindowSize == 0); Host.Assert(Model != null); // *** Binary format *** // <base> // bool: _isAdaptive // int32: Horizon // State: StateRef // AdaptiveSingularSpectrumSequenceModeler: _model base.SaveModel(ctx); ctx.Writer.Write(IsAdaptive); ctx.Writer.Write(Horizon); ctx.Writer.Write(ConfidenceLevel); StateRef.Save(ctx.Writer); ctx.SaveModel(Model, "SSA"); }