I have created a model using scikit learn algorithm.
rf = RandomForestClassifier(n_estimators = 10,random_state=seed)
rf.fit(X_train,Y_train)
shift_id=2099.0
user_id=1402.0
status=['S']
shift_organisation_id=15.0
shift_department_id=20.0
open_positions=71.0
city=['taunton']
role_id=3.0
specialty_id=16.0
years_of_experience=10.0
nurse_zip=2780.0
shifts_zip=2021.0
status = status_encoder.transform(status)
city = city_encoder.transform(city)
X = np.array([shift_id, user_id, status, shift_organisation_id, shift_department_id, open_positions, city, role_id, specialty_id, years_of_experience, nurse_zip, shifts_zip])
location_id = rf.predict(X.reshape(1,-1))
print(location_id)
which gives result like this
[25]
What I understand is 25 is the best prediction value for this model. But I want to get top best 3 values as a result. How can I get it?
In that case prediction result would be like
[23,45,25]