Sample fails with "The size of input lines is not consistent"
See original GitHub issueI’m trying out the sample shown here. However, whenever I try to train the model I get an error: “The size of input lines is not consistent”. This is using the exact files that are specified in the tutorial so I’m not sure where I’m going wrong - any ideas?
#r "netstandard"
#load @"C:\Users\Isaac\Source\Repos\scratchpad\.paket\load\netstandard2.0\ML\ml.group.fsx"
open Microsoft.ML
open Microsoft.ML.Runtime.Api
open Microsoft.ML.Transforms
open Microsoft.ML.Trainers
let dataPath = @"data\imdb_labelled.txt"
let testDataPath = @"data\yelp_labelled.txt"
type SentimentData =
{ [<Column(ordinal = "0")>] SentimentText : string
[<Column(ordinal = "1", name = "Label")>] Sentiment : float }
[<CLIMutable>]
type SentimentPrediction =
{ [<ColumnName "PredictedLabel">] Sentiment : bool }
let pipeline = LearningPipeline()
pipeline.Add(TextLoader<SentimentData>(dataPath, useHeader = false, separator = "tab"))
pipeline.Add(TextFeaturizer("Features", "SentimentText"))
pipeline.Add(FastTreeBinaryClassifier(NumLeaves = 5, NumTrees = 5, MinDocumentsInLeafs = 2))
/// Pop!
let model = pipeline.Train<SentimentData, SentimentPrediction>()
Issue Analytics
- State:
- Created 5 years ago
- Comments:19 (11 by maintainers)
Top Results From Across the Web
Found input variables with inconsistent numbers of ...
I've converted all of the labels into int64 numerical data and loaded into X and Y as a numpy array, but I am...
Read more >Found input variables with inconsistent numbers of ...
That's why you get an inconsistent number of samples error. You can navigate this by. predicting on X_test prediction = model.predict(X_test).
Read more >C38: Using CSS width, max-width and flexbox to fit labels ...
This technique ensures labels and inputs do not break out of their layout area, including in one-column layouts where it would cause horizontal...
Read more >Why the number input is the worst input
If you are building a form that requires conditional validations or calculations, it is hard to understate just how big of a problem...
Read more >line-height - CSS: Cascading Style Sheets - MDN Web Docs
The line-height CSS property sets the height of a line box. It's commonly used to set the distance between lines of text.
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Check out https://docs.microsoft.com/en-us/nuget/create-packages/supporting-multiple-target-frameworks#architecture-specific-folders for the docs on the
runtimes
folder:After doing #600 I think there is no F#-specific issue remaining here, see https://github.com/dotnet/machinelearning/issues/180 for the record issue