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
Hey, the constructor in FeatureBasedNB should allow this:
public function __construct($priors = [], $condprob = [])
{
$this->priors = $priors;
$this->condprob = $condprob;
$this->unknown = [];
}
this way we would be able to cache / store trained properties and then inject them before classifying. Now one has to train the model each time calling the classify or getScore on classifier.
The text was updated successfully, but these errors were encountered:
The concept was to simply serialize and unserialize the model, but you may be right and perhaps it should be added. I 'll look into that when I have some time. For now you can just serialize and unserialize the model so that you don't have to train again.
Hey no problem, i am using it right now in my own project. I will make pull request later today :), serialization does not always work, depending on the caching system used.
Hey, the constructor in FeatureBasedNB should allow this:
public function __construct($priors = [], $condprob = [])
{
$this->priors = $priors;
$this->condprob = $condprob;
$this->unknown = [];
}
this way we would be able to cache / store trained properties and then inject them before classifying. Now one has to train the model each time calling the classify or getScore on classifier.
The text was updated successfully, but these errors were encountered: