4 writes to _windowSize
Microsoft.ML.TimeSeries (4)
AdaptiveSingularSpectrumSequenceModeler.cs (4)
264_windowSize = windowSize; 308_windowSize = model._windowSize; 369_windowSize = ctx.Reader.ReadInt32(); 1290_windowSize--;
100 references to _windowSize
Microsoft.ML.TimeSeries (100)
AdaptiveSingularSpectrumSequenceModeler.cs (100)
187public Single LastSmoothedValue { get { return _state[_windowSize - 2]; } } 287_info.WindowSize = _windowSize; 298_host.Assert(model._windowSize >= 2); 299_host.Assert(model._seriesLength > model._windowSize); 300_host.Assert(model._trainSize > 2 * model._windowSize); 302_host.Assert(1 <= model._rank && model._rank < model._windowSize); 308_windowSize = model._windowSize; 322_alpha = new Single[_windowSize - 1]; 323Array.Copy(model._alpha, _alpha, _windowSize - 1); 324_state = new Single[_windowSize - 1]; 325Array.Copy(model._state, _state, _windowSize - 1); 327_x = new CpuAlignedVector(_windowSize, CpuMathUtils.GetVectorAlignment()); 328_xSmooth = new CpuAlignedVector(_windowSize, CpuMathUtils.GetVectorAlignment()); 333_wTrans = new CpuAlignedMatrixRow(_rank, _windowSize, CpuMathUtils.GetVectorAlignment()); 370_host.CheckDecode(_windowSize >= 2); 371_host.CheckDecode(_seriesLength > _windowSize); 374_host.CheckDecode(_trainSize > 2 * _windowSize); 377_host.CheckDecode(1 <= _rank && _rank < _windowSize); 388_host.CheckDecode(Utils.Size(_alpha) == _windowSize - 1); 393_host.CheckDecode(Utils.Size(_state) == _windowSize - 1); 396_state = new Single[_windowSize - 1]; 412_host.CheckDecode(1 <= _maxRank && _maxRank <= _windowSize - 1); 419_info.AutoRegressiveCoefficients = new Single[_windowSize - 1]; 420Array.Copy(_alpha, _info.AutoRegressiveCoefficients, _windowSize - 1); 424_info.WindowSize = _windowSize; 433_host.CheckDecode(Utils.Size(tempArray) == _rank * _windowSize); 434_wTrans = new CpuAlignedMatrixRow(_rank, _windowSize, CpuMathUtils.GetVectorAlignment()); 444_x = new CpuAlignedVector(_windowSize, CpuMathUtils.GetVectorAlignment()); 445_xSmooth = new CpuAlignedVector(_windowSize, CpuMathUtils.GetVectorAlignment()); 454_host.Assert(_windowSize >= 2); 455_host.Assert(_seriesLength > _windowSize); 456_host.Assert(_trainSize > 2 * _windowSize); 458_host.Assert(1 <= _rank && _rank < _windowSize); 459_host.Assert(Utils.Size(_alpha) == _windowSize - 1); 462_host.Assert(1 <= _maxRank && _maxRank <= _windowSize - 1); 488ctx.Writer.Write(_windowSize); 510var tempArray = new Single[_rank * _windowSize]; 732for (int i = 0; i < _windowSize - 2; ++i) 860var coeff = new Double[_windowSize - 1]; 873for (i = 0; i < _windowSize - 1; ++i) 881_info.RootsBeforeStabilization = new Complex[_windowSize - 1]; 882Array.Copy(roots, _info.RootsBeforeStabilization, _windowSize - 1); 886for (i = 0; i < _windowSize - 1; ++i) 893for (i = 0; i < _windowSize - 1; ++i) 897if (roots[i].Magnitude >= 1 && 2 * Math.PI / Math.Abs(roots[i].Phase) > _windowSize) 1001for (i = 0; i < _windowSize - 1; ++i) 1028for (i = 0; i < _windowSize - 1; ++i) 1047for (i = 0; i < _windowSize - 1; ++i) 1060for (i = 0; i < _windowSize - 1; ++i) 1083for (i = 0; i < _windowSize - 1; ++i) 1113_wTrans = new CpuAlignedMatrixRow(_rank, _windowSize, CpuMathUtils.GetVectorAlignment()); 1114Single[] vecs = new Single[_rank * _windowSize]; 1117vecs[(_windowSize + 1) * i] = 1; 1127for (i = 0; i < _windowSize - 1; ++i) 1132for (i = 0; i < _windowSize - len - 1; ++i) 1134for (i = Math.Max(0, len - _windowSize + 1); i < len; ++i) 1135_x[i - len + _windowSize - 1] = _buffer[i]; 1136_x[_windowSize - 1] = input; 1145for (i = 0; i < _windowSize - 2; ++i) 1147_state[i] = ((_windowSize - 2 - i) * _state[i + 1] + _xSmooth[i + 1]) / (_windowSize - 1 - i); 1150_state[_windowSize - 2] = _xSmooth[_windowSize - 1]; 1151_nextPrediction += _state[_windowSize - 2] * _alpha[_windowSize - 2]; 1182_info.WindowSize = _windowSize; 1185if (count <= 2 * _windowSize) 1233_info.WindowSize = _windowSize; 1236if (count <= 2 * _windowSize) 1258var signalLength = _rankSelectionMethod == RankSelectionMethod.Exact ? originalSeriesLength : 2 * _windowSize - 1;//originalSeriesLength; 1263TrajectoryMatrix tMat = new TrajectoryMatrix(_host, dataArray, _windowSize, originalSeriesLength); 1270for (i = 0; i < _windowSize * _maxRank; ++i) 1283for (i = 0; i < _windowSize; ++i) 1285var v = leftSingularVecs[(i + 1) * _windowSize - 1]; 1288if (_windowSize > 2) 1291_maxRank = _windowSize / 2; 1292_alpha = new Single[_windowSize - 1]; 1293_state = new Single[_windowSize - 1]; 1294_x = new CpuAlignedVector(_windowSize, CpuMathUtils.GetVectorAlignment()); 1295_xSmooth = new CpuAlignedVector(_windowSize, CpuMathUtils.GetVectorAlignment()); 1318var temp = (Single)(1f / Math.Sqrt(_windowSize)); 1319for (i = 0; i < _windowSize; ++i) 1335_wTrans = new CpuAlignedMatrixRow(_rank, _windowSize, CpuMathUtils.GetVectorAlignment()); 1343_y[i] = leftSingularVecs[_windowSize * (i + 1) - 1]; 1348for (i = 0; i < _windowSize - 1; ++i) 1381for (i = 0; i < _windowSize - len; ++i) 1383for (i = Math.Max(0, len - _windowSize); i < len; ++i) 1384_x[i - len + _windowSize] = _buffer[i]; 1388for (i = originalSeriesLength - _windowSize; i < originalSeriesLength; ++i) 1389_x[i - originalSeriesLength + _windowSize] = dataArray[i]; 1395for (i = 1; i < _windowSize; ++i) 1404_info.WindowSize = _windowSize; 1405_info.AutoRegressiveCoefficients = new Single[_windowSize - 1]; 1406Array.Copy(_alpha, _info.AutoRegressiveCoefficients, _windowSize - 1); 1441for (j = i; j < _windowSize - 1; ++j, ++k) 1444for (j = Math.Max(0, i - _windowSize + 1); j < i; ++j, ++k) 1452var lastCol = new FixedSizeQueue<Single>(_windowSize - 1); 1454for (i = 0; i < _windowSize - 3; ++i) 1457lastCol.AddLast(_alpha[_windowSize - 2]); 1463for (j = 0; j < _windowSize - 1; ++j)