I have created a model that predicts the name of a flower based on its features using LinearSVC
in sklearn
and saved the model using pickle
.
for example my target variables are lily
and rose
- so given the features the model has the capability to return either lily
or rose
as the flower name.
At a later stage i want to rename lily
to lilly
as i felt that is a better name.
I know of two methods to achieve this.
One is to retrain the model by renaming the target variables of lily
to lilly
in my traning data, which means my model in future will return lilly
and `rose
The other is to keep the model as it is and then after prediction use a mapping dictionary {'lily' : 'lilly','rose': 'rose'}
to get the renamed value.
Is there any other way to tweek the existing model which is saved after pickling so that the model returns lily
as lilly
from now on?
thanks for helping