Issue
Here's how I load pickle file
f = open('latest_model_v1_2.pkl', 'rb')
mdl = pickle.load(f)
and the mdl
is
logisticRegressionCV(Cs=[0.09090909090909091, 0.18181818181818182,
0.2727272727272727, 0.36363636363636365,
0.45454545454545453, 0.5454545454545454,
0.6363636363636364, 0.7272727272727273,
0.8181818181818182, 0.9090909090909091],
cv=5, max_iter=10000, penalty='l1', solver='liblinear')
I don't know the expected name of variable input thos machine learning model, how to do this?
Solution
To know what parameters are expected in a parquet file, you can use feature_names_in_
variable.
pickled_model = pickle.load(open("path/to/pickle/file.pickle", "rb"))
pickled_model.feature_names_in_
output:
array(['engines', 'passenger_capacity', 'crew', 'review_scores_rating'],
dtype=object)
Answered By - afzalex
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.