# Constraint optimization when target value is categorical

I am trying to build prescriptive model for feature parameter optimization. My dataset have both continuous and categorical features (x1, x2,x4,x4) and my target (y) is {0, 1} . I have build random forest classifier.
as prescriptive model , my input is record with label 1 . I would like use to constraint optimization for input feature parameter tuning (search parameters) such that new feature parameters results in target prediction to be 0, in other words desired output changes from 1 to 0. example old features :

x1, x2, x3, x4 , y
10 , 0 , 22.5, 3, 1


New features:

x1, x2, x3, x4 , y
10.5 , 1 , 22.5, 3, 0


Since my target is categorical , which is best algorithm for constraint optimization and how do I decide objective function?