Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaxEnt, how to load a saved classifier ? #489

Open
proj59598 opened this issue Feb 23, 2019 · 1 comment
Open

MaxEnt, how to load a saved classifier ? #489

proj59598 opened this issue Feb 23, 2019 · 1 comment

Comments

@proj59598
Copy link

How can i load a Maxent classifier stored using "save" ?

const classifier = new MaxEntClassifier(featureSet, sample);
classifier.save(, function(err, classifier) {})

do i have to instantiate a classifier again to load with "new" ?
I don't see a static function available on MaxEntClassifier.
I am loading from a different file in a different process, so don't have access to the previous instance of classifier.

I am looking for something similar to the 1 below for log. regression
require('natural').LogisticRegressionClassifier.load(,
null,
function(err, classifier) {})

@Hugo-ter-Doest
Copy link
Collaborator

Please have a look at https://github.com/NaturalNode/natural/blob/master/io_spec/MaxEntClassifier_spec.js
for an example of recreating a classifier. You have to pass in an Element class in order to recreate the features.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants