Ejemplo n.º 1
0
 internal ColumnOptions(VectorWhiteningTransformer.Column item, VectorWhiteningTransformer.Options options)
 {
     Name = item.Name;
     Contracts.CheckValue(Name, nameof(Name));
     InputColumnName = item.Source ?? item.Name;
     Contracts.CheckValue(InputColumnName, nameof(InputColumnName));
     Kind = item.Kind ?? options.Kind;
     Contracts.CheckUserArg(Kind == WhiteningKind.PrincipalComponentAnalysis || Kind == WhiteningKind.ZeroPhaseComponentAnalysis, nameof(item.Kind));
     Epsilon = item.Eps ?? options.Eps;
     Contracts.CheckUserArg(0 <= Epsilon && Epsilon < float.PositiveInfinity, nameof(item.Eps));
     MaximumNumberOfRows = item.MaxRows ?? options.MaxRows;
     Contracts.CheckUserArg(MaximumNumberOfRows > 0, nameof(item.MaxRows));
     SaveInv = item.SaveInverse ?? options.SaveInverse;
     Rank    = item.PcaNum ?? options.PcaNum;
     Contracts.CheckUserArg(Rank >= 0, nameof(item.PcaNum));
 }
 internal ColumnOptions(VectorWhiteningTransformer.Column item, VectorWhiteningTransformer.Options options)
 {
     Name = item.Name;
     Contracts.CheckValue(Name, nameof(Name));
     InputColumnName = item.Source ?? item.Name;
     Contracts.CheckValue(InputColumnName, nameof(InputColumnName));
     Kind = item.Kind ?? options.Kind;
     Contracts.CheckUserArg(Kind == WhiteningKind.Pca || Kind == WhiteningKind.Zca, nameof(item.Kind));
     Epsilon = item.Eps ?? options.Eps;
     Contracts.CheckUserArg(0 <= Epsilon && Epsilon < float.PositiveInfinity, nameof(item.Eps));
     MaxRow = item.MaxRows ?? options.MaxRows;
     Contracts.CheckUserArg(MaxRow > 0, nameof(item.MaxRows));
     SaveInv = item.SaveInverse ?? options.SaveInverse;
     PcaNum  = item.PcaNum ?? options.PcaNum;
     Contracts.CheckUserArg(PcaNum >= 0, nameof(item.PcaNum));
 }