Skip to content
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

Fixed the syntax of cited example. #2

Merged
merged 1 commit into from
May 4, 2018
Merged
Changes from all commits
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
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,10 @@ To build ML.NET from source go to [developers guide](https://github.com/dotnet/m

Simple snippet to train a model for sentiment classification (See the complete sample [here](https://github.com/dotnet/machinelearning/blob/master/test/Microsoft.ML.Tests/Scenarios/Scenario3_SentimentPrediction.cs)):
```C#
var pipeline = new LearningPipeline()
.Add(new TextLoader<SentimentData>(dataPath, separator: ",")
.Add(new TextFeaturizer("Features", "SentimentText")
.Add(new FastTreeBinaryClassifier()
Add(new PredictedLabelColumnOriginalValueConverter(PredictedLabelColumn = "PredictedLabel"});
var pipeline = new LearningPipeline();
Copy link
Contributor

@glebuk glebuk May 4, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Opened issue #7 to add the functionality to support simplified syntax. #Pending

pipeline.Add(new TextLoader<SentimentData>(dataPath, separator: ","));
pipeline.Add(new TextFeaturizer("Features", "SentimentText"));
pipeline.Add(new FastTreeBinaryClassifier());
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Maybe add a newline after this, too, to break it up a bit?

var model = pipeline.Train<SentimentData, SentimentPrediction>();
```

Expand Down