Creates a 3D surface or contour plot showing how the target variable depends on two predictors.
plot_surface_3d(
data,
x_var,
y_var,
z_var,
type = c("contour", "filled_contour", "persp"),
n_grid = 30,
method = "loess"
)A plot (base graphics for persp, ggplot for contour).
Data frame.
First predictor variable.
Second predictor variable.
Response variable (target).
Plot type: "contour", "filled_contour", or "persp".
Grid resolution for surface estimation.
Surface fitting method: "loess", "gam", or "linear".