We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 2d752b3 commit 9e16af7Copy full SHA for 9e16af7
1 file changed
examples/TopicModeling/Program.cs
@@ -9,7 +9,7 @@ class LdaInput
9
10
class LdaOutput
11
{
12
- public float[] Features { get; set; }
+ public float[]? Features { get; set; }
13
}
14
15
class Program
@@ -86,6 +86,6 @@ private static float[][] GenerateEmbeddings(string[] texts)
86
.Append(mlContext.Transforms.Text.LatentDirichletAllocation("Features", "Tokens", numberOfTopics: 20));
87
var model = pipeline.Fit(dataView);
88
var engine = mlContext.Model.CreatePredictionEngine<LdaInput, LdaOutput>(model);
89
- return input.Select((v) => engine.Predict(v).Features).ToArray();
+ return input.Select((v) => engine.Predict(v).Features!).ToArray();
90
91
0 commit comments