2 writes to Rank
Microsoft.ML.PCA (2)
PcaTransformer.cs (2)
111Rank = rank; 128Rank = ctx.Reader.ReadInt32();
25 references to Rank
Microsoft.ML.PCA (25)
PcaTransformer.cs (25)
106public DataViewType OutputType => new VectorDataViewType(NumberDataViewType.Single, Rank); 112Contracts.CheckParam(0 < Rank && Rank <= Dimension, nameof(Rank), "Rank must be positive, and at most the dimension of untransformed data"); 129Contracts.CheckDecode(0 < Rank && Rank <= Dimension); 131Eigenvectors = new float[Rank][]; 132for (int i = 0; i < Rank; i++) 139Contracts.CheckDecode(MeanProjected == null || (MeanProjected.Length == Rank && FloatUtils.IsFinite(MeanProjected))); 154Contracts.Assert(0 < Rank && Rank <= Dimension); 156ctx.Writer.Write(Rank); 157for (int i = 0; i < Rank; i++) 162Contracts.Assert(MeanProjected == null || (MeanProjected.Length == Rank && FloatUtils.IsFinite(MeanProjected))); 175MeanProjected = new float[Rank]; 176for (var i = 0; i < Rank; ++i) 310oversampledRank[iinfo] = Math.Min(transformInfos[iinfo].Rank + columns[iinfo].Oversampling, transformInfos[iinfo].Dimension); 591var editor = VBufferEditor.Create(ref dst, transformInfo.Rank); 592for (int i = 0; i < transformInfo.Rank; i++) 640float[] principalComponents = new float[transformInfo.Rank * transformInfo.Dimension]; 641for (int i = 0; i < transformInfo.Rank; i++) 645long[] pcaDims = { transformInfo.Rank, transformInfo.Dimension }; 648float[] zeroMean = new float[transformInfo.Rank]; 651Array.Copy(transformInfo.MeanProjected, zeroMean, transformInfo.Rank); 654long[] meanDims = { transformInfo.Rank };