You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hello!
How can i split the training Code correctly using "partial",
My modified code does not work with partial parts.
Fatal error: Out of memory (allocated 31283216384)......WordCountVectorizer.php on line 247
$words=12000;//2000 worked without spliting
$min=0.0005;
$max=1;
$x=0;
$trainParts=35;
.....
$descs = new Labeled($descs, $labels);
....
$transformer_2 = new WordCountVectorizer($words,$min, $max, new NGram(1, 2));
....
$descs->apply($transformer_2);
$json_data = new Labeled($json_data, $labels);
....
$folds = $pointHitsArr->fold($trainParts);
$estimator = new PersistentModel(new GaussianNB(),new Filesystem('NaiveBayes.rbx', true));
$estimator->train($folds[$x]);$x++;
while($x<$trainParts){
$estimator->partial($folds[$x]);
$x++;
}
Beta Was this translation helpful? Give feedback.
All reactions