Beispiel #1
0
        public CompositeDataReader(IDataReader <TSource> reader, TransformerChain <TLastTransformer> transformerChain = null)
        {
            Contracts.CheckValue(reader, nameof(reader));
            Contracts.CheckValueOrNull(transformerChain);

            Reader      = reader;
            Transformer = transformerChain ?? new TransformerChain <TLastTransformer>();
        }
 public CategoricalTransform(ValueToKeyMappingEstimator term, IEstimator <ITransformer> toVector, IDataView input)
 {
     if (toVector != null)
     {
         _transformer = term.Append(toVector).Fit(input);
     }
     else
     {
         _transformer = new TransformerChain <ITransformer>(term.Fit(input));
     }
 }
        public CategoricalTransform(TermEstimator term, IEstimator <ITransformer> toVector, IDataView input)
        {
            var chain = term.Append(toVector);

            _transformer = chain.Fit(input);
        }
        internal CategoricalHashTransform(HashingEstimator hash, IEstimator <ITransformer> keyToVector, IDataView input)
        {
            var chain = hash.Append(keyToVector);

            _transformer = chain.Fit(input);
        }