pyod
pyod copied to clipboard
Issues with plotting the DecisionBoundaryDisplay
When using the sklearn's Isolation forest model, I can use the DecisionBoundaryDisplay function to plot for all 3 different response methods, e.g. 'predict' and 'decision_function', without any issues. Example is given here.
This is how I initialize the models.
from sklearn.ensemble import IsolationForest
iforest_model = IsolationForest(
n_estimators=100,
contamination=0.005,
random_state=24,
)
iforest_model.fit(x_train)
disp = DecisionBoundaryDisplay.from_estimator(
estimator=iforest_model,
X=x_df_to_plot,
response_method='decision_function',
alpha=0.5,
)
However, if I use the IForest from PYOD and try to do the same, I get the error below
from pyod.models.iforest import IForest
iforest_model = IForest(
n_estimators=100,
contamination=0.005,
random_state=24,
)
Is a different object returned entirely from IForest compared to sklearn's version? How would I plot the same plot in PYOD?