I have made a Random Forest Classifier model in Python, and now want to make partial dependence plot (PDP). I used scaled data for training and testing the model, and make the PDP like this:
PartialDependenceDisplay.from_estimator(best_clf, X_test_final, best_features). However, the x-axis values are scaled which limits interpretability.
Unscaling the data X_test_final before calling the PartialDependenceDisplay does not work, any suggestions on how I can change the x-axis values from scaled to unscaled? I have scaled my data using StandardScaler().
Unscaling standardised data is trivial. To standardise data you do:
X' = (X - mean(X)) / std(X)so to unscale it, you just doX = (X' * std(X)) + mean(X).If you want to just change the tick labels so that you can interpret the results in the original scale of the data, then you just need to do something like: