drebin icon indicating copy to clipboard operation
drebin copied to clipboard

Error loading Model

Open iAndrea opened this issue 6 years ago • 2 comments

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

iAndrea avatar Mar 02 '18 20:03 iAndrea

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.

zwj2017-NK avatar Jun 26 '18 07:06 zwj2017-NK

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.

MadDroid-2020 avatar Nov 30 '19 08:11 MadDroid-2020