Beispiel #1
0
 /// <summary>
 /// Returns the <see cref="SchemaShape"/> of the schema which will be produced by the transformer.
 /// Used for schema propagation and verification in a pipeline.
 /// </summary>
 public SchemaShape GetOutputSchema(SchemaShape inputSchema)
 {
     if (_toSomething != null)
     {
         return(_term.Append(_toSomething).GetOutputSchema(inputSchema));
     }
     else
     {
         return(_term.GetOutputSchema(inputSchema));
     }
 }
Beispiel #2
0
 internal OneHotEncodingTransformer(ValueToKeyMappingEstimator term, IEstimator <ITransformer> toVector, IDataView input)
 {
     if (toVector != null)
     {
         _transformer = term.Append(toVector).Fit(input);
     }
     else
     {
         _transformer = new TransformerChain <ITransformer>(term.Fit(input));
     }
 }