machinelearning icon indicating copy to clipboard operation
machinelearning copied to clipboard

Enabling different settings for the TextLoader on train and test data might lead to incorrect metrics with no error

Open GalOshri opened this issue 8 years ago • 2 comments

The train and test data can be read with different TextLoaders, which makes it easy to introduce bugs. If there is a difference in the settings, the metrics are likely to be wrong but there are no errors. Example:

string trainDataPath= "sentiment_data.tsv";
pipeline.Add(new TextLoader<SentimentData>(trainDataPath, useHeader: true));

// Later in the file, after completing the pipeline and training the model
string testDataPath = "sentiment_test.tsv";
var testData = new TextLoader<SentimentData>(testDataPath, userHeader: true, sep: ',');

var evaluator = new BinaryClassificationEvaluator();
BinaryClassificationMetrics metrics = evaluator.Evaluate(model, testData);

Evaluating on the test data will result in incorrect metrics as the test file will be parsed incorrectly. However, the experiment runs successfully with no errors, so this might be difficult to detect.

GalOshri avatar May 04 '18 19:05 GalOshri

Blocked by #216 and #119

zeahmed avatar May 23 '18 19:05 zeahmed

DRI RESPONSE: this is about legacy API, which we no longer support, no reason to continue to look into this one

abgoswam avatar Oct 15 '18 22:10 abgoswam