예제 #1
0
        /// <summary>
        /// Create a list of <see cref="SweepableEstimator"/> for featurizing text.
        /// </summary>
        /// <param name="outputColumnName">output column name.</param>
        /// <param name="inputColumnName">input column name.</param>
        internal SweepableEstimator[] TextFeaturizer(string outputColumnName, string inputColumnName)
        {
            var option = new FeaturizeTextOption
            {
                InputColumnName  = inputColumnName,
                OutputColumnName = outputColumnName,
            };

            return(new[] { SweepableEstimatorFactory.CreateFeaturizeText(option) });
        }
예제 #2
0
        public void CreateMultiModelPipelineFromSweepableEstimatorPipelineAndMultiClassifiers()
        {
            var context  = new MLContext();
            var pipeline = context.Transforms.Concatenate("output", "input")
                           .Append(SweepableEstimatorFactory.CreateFeaturizeText(new FeaturizeTextOption()))
                           .Append(context.Auto().MultiClassification());

            var json = JsonSerializer.Serialize(pipeline, this._jsonSerializerOptions);

            Approvals.Verify(json);
        }