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

Error loading Model #2

Open
iAndrea opened this issue Mar 2, 2018 · 2 comments
Open

Error loading Model #2

iAndrea opened this issue Mar 2, 2018 · 2 comments

Comments

@iAndrea
Copy link

iAndrea commented Mar 2, 2018

When i have to create a model for the first time there are no problem.
After the creation, i use the tool with the --model option (also with malware and benign apk parameters), but after: SVMModels = load(Model)
Gives me an error in: BestModel= SVMModels.best_estimator

Ok, i modify it as: BestModel= SVMModels.best_estimator_ and it works great, but the next predict doesn't work: y_pred = SVMModels.predict(x_test)

Should i retrain the model after loading, before predict? If yes, why you didn't do it...
schermata 2018-03-02 alle 21 43 47

@zwj2017-NK
Copy link

Although the program includes model file and can load it, can't work in the process of predict. You need save "FeatureVectorizer" variable during training your model. When you want to predict test data, loading the matrix variable into memory is necessary for the next stage, then,using your model and the matrix variable can be effective.

@MadDroid-2020
Copy link

Although the program includes model file and can load it, can't work in the process of predict. You need save "FeatureVectorizer" variable during training your model. When you want to predict test data, loading the matrix variable into memory is necessary for the next stage, then,using your model and the matrix variable can be effective.

Hi, can you elaborate on how to use the saved model and how to save and load "FeatureVectorizer" variable on new test apks? Many thanks in advance.

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

No branches or pull requests

3 participants