2 writes to Dimension
Microsoft.ML.PCA (2)
PcaTransformer.cs (2)
110Dimension = dim; 127Dimension = ctx.Reader.ReadInt32();
21 references to Dimension
Microsoft.ML.PCA (21)
PcaTransformer.cs (21)
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); 134Eigenvectors[i] = ctx.Reader.ReadFloatArray(Dimension); 154Contracts.Assert(0 < Rank && Rank <= Dimension); 155ctx.Writer.Write(Dimension); 160ctx.Writer.WriteSinglesNoCount(Eigenvectors[i].AsSpan(0, Dimension)); 310oversampledRank[iinfo] = Math.Min(transformInfos[iinfo].Rank + columns[iinfo].Oversampling, transformInfos[iinfo].Dimension); 313double colMemoryUsageEstimate = 2.0 * transformInfos[iinfo].Dimension * oversampledRank[iinfo] * sizeof(float) / 1e9; 328y[iinfo][i] = new float[transformInfos[iinfo].Dimension]; 329omega[iinfo][i] = new float[transformInfos[iinfo].Dimension]; 330for (int j = 0; j < transformInfos[iinfo].Dimension; j++) 337mean[iinfo] = new float[transformInfos[iinfo].Dimension]; 383transformInfos[iinfo].Eigenvectors = PostProcess(b[iinfo], smallEigenvalues, smallEigenvectors, transformInfos[iinfo].Dimension, oversampledRank[iinfo]); 553if (colSchemaInfo.InputType.GetVectorSize() != _parent._transformInfos[i].Dimension) 556new VectorDataViewType(NumberDataViewType.Single, _parent._transformInfos[i].Dimension).ToString(), colSchemaInfo.InputType.ToString()); 589ectx.Check(src.Length == transformInfo.Dimension); 638new VectorDataViewType(NumberDataViewType.Single, transformInfo.Dimension); 640float[] principalComponents = new float[transformInfo.Rank * transformInfo.Dimension]; 643Array.Copy(transformInfo.Eigenvectors[i], 0, principalComponents, i * transformInfo.Dimension, transformInfo.Dimension); 645long[] pcaDims = { transformInfo.Rank, transformInfo.Dimension };