Closed NishaatK closed 5 years ago
The error is because the test set obtained from features_extraction.py has 22 features, whereas the model you created has 30 features. For better understanding why this has happened, can you please provide me some information about -
Thank you for your response. The error is resolved.
On Tue, 2 Apr 2019, 12:03 pm Rohit Naik <notifications@github.com wrote:
The error is because the test set obtained from features_extraction.py has 22 features, whereas the model you created has 30 features. For better understanding why this has happened, can you please provide me some information about -
- You said you have created random_forest.pkl using train.py. What all modifications have you made to train.py?
- Any other changes you have made in the package?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/rohitnaik246/Malicious-Web-Content-Detection-Using-Machine-Learning/issues/7#issuecomment-478863418, or mute the thread https://github.com/notifications/unsubscribe-auth/Au17VOvJYjp9djHYmwSC-IjyPHXQuWEbks5vcvmcgaJpZM4cUPMz .
Great. Glad I could help!
Hi @rohitnaik246 , I'm referring your project. I've created random_forest.pkl using train.py but getting error in test.py: ValueError: Number of features of the model must match the input. Model n_features is 30 and input n_features is 22 I'm using Python 2.7 and Windows 7(32 bit). How to resolve it?