Closed
Description
System information
- OS version/distro: Win10
- .NET Version (eg., dotnet --info): 4.7.1
Issue
-
What did you do?
I want to convert a text classification sample from ML 0.4 to ML 0.11 -
What happened?
I cannot find equivalent parameters for TextFeaturizer, there are no CharFeatureExtractor and WordFeatureExtractor NgramExtractors in 0.11 Transforms.Text.FeaturizeText arguments -
What did you expect?
Source code / logs
0.4 version
new TextFeaturizer("Features", "TextColumn")
{
KeepDiacritics = false,
KeepPunctuations = false,
OutputTokens = true,
Language = TextFeaturizingEstimatorLanguage.English,
VectorNormalizer = TextFeaturizingEstimatorTextNormKind.L2,
TextCase = TextNormalizingEstimatorCaseNormalizationMode.Lower,
CharFeatureExtractor = new NGramNgramExtractor() {NgramLength = 3, AllLengths = false},
WordFeatureExtractor = new NGramNgramExtractor() {NgramLength = 3, AllLengths = true}
},
0.11 version
var transform mlContext.Transforms.Text.FeaturizeText(outputColumnName: "TextColumnFeaturized",
options: new TextFeaturizingEstimator.Options()
{
KeepDiacritics = false,
KeepPunctuations = false,
OutputTokens = true,
TextLanguage = TextFeaturizingEstimator.Language.English,
VectorNormalizer = TextFeaturizingEstimator.TextNormKind.L2,
TextCase = TextNormalizingEstimator.CaseNormalizationMode.Lower,
UseWordExtractor = true,
UseCharExtractor = true
}, inputColumnNames: new []{ "TextColumn" });
I see that CharFeatureExtractor and WordFeatureExtractor parameters are gone, and instead two we have boolean properties, UseWordExtractor and UseCharExtractor.
The models trained using the above code and the same train data perform differently, namly the 0.4 version has a better classsification performace.
How do I configure a pipeline to achieve the same results as in 0.4 version?
Thank you!
Metadata
Metadata
Assignees
Labels
No labels