Skip to content

Creation of components through MLContext and cleanup (text related transforms) #2393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 14 commits into from
Feb 6, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/Microsoft.ML.StaticPipe/LdaStaticExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ public override IEstimator<ITransformer> Reconcile(IHostEnvironment env,
IReadOnlyDictionary<PipelineColumn, string> outputNames,
IReadOnlyCollection<string> usedNames)
{
var infos = new LatentDirichletAllocationTransformer.ColumnInfo[toOutput.Length];
var infos = new LatentDirichletAllocationEstimator.ColumnInfo[toOutput.Length];
Action<LatentDirichletAllocationTransformer> onFit = null;
for (int i = 0; i < toOutput.Length; ++i)
{
var tcol = (ILdaCol)toOutput[i];

infos[i] = new LatentDirichletAllocationTransformer.ColumnInfo(outputNames[toOutput[i]],
infos[i] = new LatentDirichletAllocationEstimator.ColumnInfo(outputNames[toOutput[i]],
inputNames[tcol.Input],
tcol.Config.NumTopic,
tcol.Config.AlphaSum,
Expand Down
4 changes: 2 additions & 2 deletions src/Microsoft.ML.Transforms/EntryPoints/TextAnalytics.cs
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,13 @@ public static CommonOutputs.TransformOutput CharTokenize(IHostEnvironment env, T
Desc = LatentDirichletAllocationTransformer.Summary,
UserName = LatentDirichletAllocationTransformer.UserName,
ShortName = LatentDirichletAllocationTransformer.ShortName)]
public static CommonOutputs.TransformOutput LightLda(IHostEnvironment env, LatentDirichletAllocationTransformer.Arguments input)
public static CommonOutputs.TransformOutput LightLda(IHostEnvironment env, LatentDirichletAllocationTransformer.Options input)
{
Contracts.CheckValue(env, nameof(env));
env.CheckValue(input, nameof(input));

var h = EntryPointUtils.CheckArgsAndCreateHost(env, "LightLda", input);
var cols = input.Columns.Select(colPair => new LatentDirichletAllocationTransformer.ColumnInfo(colPair, input)).ToArray();
var cols = input.Columns.Select(colPair => new LatentDirichletAllocationEstimator.ColumnInfo(colPair, input)).ToArray();
var est = new LatentDirichletAllocationEstimator(h, cols);
var view = est.Fit(input.Data).Transform(input.Data);

Expand Down
Loading