public ColumnInfo(string input, string output, CategoricalTransform.OutputKind outputKind = Defaults.OutKind, int maxNumTerms = TermEstimator.Defaults.MaxNumTerms, TermTransform.SortOrder sort = TermEstimator.Defaults.Sort, string[] term = null) : base(input, output, maxNumTerms, sort, term, true) { OutputKind = outputKind; }
public ColumnInfo(string input, string output, OneHotEncodingTransformer.OutputKind outputKind = Defaults.OutKind, int maxNumTerms = ValueToKeyMappingEstimator.Defaults.MaxNumTerms, TermTransform.SortOrder sort = ValueToKeyMappingEstimator.Defaults.Sort, string[] term = null) : base(input, output, maxNumTerms, sort, term, true) { OutputKind = outputKind; }
/// <summary> /// Convenience constructor for public facing API. /// </summary> /// <param name="env">Host Environment.</param> /// <param name="inputColumn">Name of the column to be transformed.</param> /// <param name="outputColumn">Name of the output column. If this is null '<paramref name="inputColumn"/>' will be used.</param> /// <param name="maxNumTerms">Maximum number of terms to keep per column when auto-training.</param> /// <param name="sort">How items should be ordered when vectorized. By default, they will be in the order encountered. /// If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a').</param> public TermEstimator(IHostEnvironment env, string inputColumn, string outputColumn = null, int maxNumTerms = Defaults.MaxNumTerms, TermTransform.SortOrder sort = Defaults.Sort) : this(env, new TermTransform.ColumnInfo(inputColumn, outputColumn ?? inputColumn, maxNumTerms, sort)) { }
public TermEstimator(IHostEnvironment env, string name, string source = null, int maxNumTerms = TermTransform.Defaults.MaxNumTerms, TermTransform.SortOrder sort = TermTransform.Defaults.Sort) : this(env, new TermTransform.ColumnInfo(name, source ?? name, maxNumTerms, sort)) { }
/// <summary> /// Initializes a new instance of <see cref="ValueToKeyMappingEstimator"/>. /// </summary> /// <param name="catalog">The categorical transform's catalog.</param> /// <param name="inputColumn">Name of the column to be transformed.</param> /// <param name="outputColumn">Name of the output column. If this is null '<paramref name="inputColumn"/>' will be used.</param> /// <param name="maxNumTerms">Maximum number of keys to keep per column when auto-training.</param> /// <param name="sort">How items should be ordered when vectorized. By default, they will be in the order encountered. /// If by value items are sorted according to their default comparison, for example, text sorting will be case sensitive (for example, 'A' then 'Z' then 'a').</param> public static ValueToKeyMappingEstimator MapValueToKey(this TransformsCatalog.CategoricalTransforms catalog, string inputColumn, string outputColumn = null, int maxNumTerms = ValueToKeyMappingEstimator.Defaults.MaxNumTerms, TermTransform.SortOrder sort = ValueToKeyMappingEstimator.Defaults.Sort) => new ValueToKeyMappingEstimator(CatalogUtils.GetEnvironment(catalog), inputColumn, outputColumn, maxNumTerms, sort);