Пример #1
0
            public void Read(ModelLoadContext ctx, IHost host)
            {
                string sr = ctx.Reader.ReadString();

                columns = Column1x1.ParseMulti(sr);
                scaling = (ScalerStrategy)ctx.Reader.ReadInt32();
            }
Пример #2
0
            public ScalingFactor(IHost host, int colid, ScalerStrategy strategy, List <ColumnStatObs> obs)
            {
                columnId = colid;
                switch (strategy)
                {
                case ScalerStrategy.meanVar:
                    scalingMethod = ComputeMeanVar(host, obs, out mean, out scale);
                    break;

                case ScalerStrategy.minMax:
                    scalingMethod = ComputeMinMax(host, obs, out mean, out scale);
                    break;

                default:
                    throw host.ExceptNotSupp($"Unknown scaling strategy {strategy}.");
                }
            }