Ejemplo n.º 1
0
 public ScalerCursor(RowCursor cursor, ScalerTransform parent, Func <int, bool> predicate)
 {
     _inputCursor    = cursor;
     _parent         = parent;
     _scalingFactors = parent._scalingFactors;
     if (_scalingFactors == null)
     {
         throw parent._host.ExceptValue("The transform was never trained. Predictions cannot be computed.");
     }
 }
Ejemplo n.º 2
0
 public ScalerCursor(DataViewRowCursor cursor, ScalerTransform parent, IEnumerable <DataViewSchema.Column> columnsNeeded)
 {
     _inputCursor    = cursor;
     _parent         = parent;
     _scalingFactors = parent._scalingFactors;
     if (_scalingFactors == null)
     {
         throw parent._host.ExceptValue("The transform was never trained. Predictions cannot be computed.");
     }
     _columnsNeeded = columnsNeeded;
 }
        public static CommonOutputs.TransformOutput Scaler(IHostEnvironment env, ScalerTransform_ArgumentsEntryPoint input)
        {
            Contracts.CheckValue(env, nameof(env));
            env.CheckValue(input, nameof(input));

            var h    = EntryPointUtils.CheckArgsAndCreateHost(env, EP_Scaler.Name, input);
            var view = new ScalerTransform(h, input, input.Data);

            return(new CommonOutputs.TransformOutput()
            {
                Model = new TransformModel(h, view, input.Data),
                OutputData = view
            });
        }