How to make a classifier work the opposite way?

if I have a dataset of (x,y) and target f, how do I learn a model based on that dataset that allows me to insert value of f and get the optimal conditions (x,y) that correspond to it ? thanks in advance.

Topic classifier optimization dataset python

Category Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.