BMerz
June 19, 2020, 3:32pm
1
Hello,
since last update of the mail app I have following warning in my nextcloud log:
“not enough messages to train a classifier”
It is shown ~ every hour.
Is something wrong with the installation? Should this be really a warning?
Thanks!
Nextcloud version: 18.0.6
Mail-App version: 1.4.0
Good point. I guess it should be a info or debug statement. The code in question is at mail/lib/Service/Classification/ImportanceClassifier.php at 7d695701631060bf1d929d9e15de99e4b6e2fb68 · nextcloud/mail · GitHub . Mind submitting your first pull request to our repo?
Cheers
BMerz
June 20, 2020, 3:44pm
3
Yes, I can submit a pull request. Is there a small HowTo? Do I need to have access rights?
I think this line should also be changed:
* How many of the most recent messages are excluded from training?
*/
$validationThreshold = max(
5,
(int)(count($dataSet) * 0.1)
);
$validationSet = array_slice($dataSet, 0, $validationThreshold);
$trainingSet = array_slice($dataSet, $validationThreshold);
$logger->debug('data set split into ' . count($trainingSet) . ' training and ' . count($validationSet) . ' validation sets');
if (empty($validationSet) || empty($trainingSet)) {
$logger->warning('not enough messages to train a classifier');
$perf->end();
return;
}
$validationEstimator = $this->trainClassifier($trainingSet);
try {
$classifier = $this->validateClassifier(
$validationEstimator,
$trainingSet,
$validationSet,
$logger
2 Likes
Good catch! Indeed both lines should be changed.
I have the some error every hour. Thanks for proceeding the request!
h3rb3rt
September 25, 2020, 7:40am
7
Is there a link to the github issue ?
Or any details explanation why this happens, I am quite certain that my mail app should have enough data for the classifiers
thanks
BMerz
September 25, 2020, 7:10pm
8
Here you can find the pull request:
nextcloud:master
← BMerz:master
opened 04:15PM - 22 Jun 20 UTC
1 Like