How to determine the optimal range for the important variables I am working in a manufacturing plant to identify the drivers causing some defects in the tyre. Based on randomForest, now I have 4-5 important variables which have been the real drivers for causing defects.
The next question to solve here is, how to detrmine the range of operation for these important tags. i.e. at which range should I control lets say the moisture so that I get minimal effect.
I read somewherre about optimisation and simulation but not sure how to implement it here. I had built a classification model to determine the bad/good tyre.
 A: What you want to do is a partial-dependency plots (PDP) for the "important" variables $X_{A,...,E}$ used within the model  $M$ . These plots will give you the ability to see how the mean response of the mode $M$ is changing as a function of the $X_A$, $X_B$ and so on. R has a great package called pdp that can do exactly that using caret's train objects. A detailed introduction to pdp has been published in R Journal article: pdp: An R Package for Constructing Partial Dependence Plots. By looking at the relevant PDPs we are able to identify ranges where the model $M$ has particular behaviour. Note that for classification task as the one mentioned you will be probably best served by looking at how the final probability is effected as it will be more straightforward to explain (eg. "values of $X_A$ above 4 lead on average to a 70% probability of producing a bad tyre", etc.) 
Nice reference on the matter are: Friedman (2001) Greedy function approximation: A gradient boosting machine (this is the first general reference introducing partial dependency plots) and Goldstein et al. (2014) Peeking Inside the Black Box: Visualizing Statistical Learning With Plots of Individual Conditional Expectation (this generalises PDP to individual subjects). 
