Search code examples
pycaret

how to get X_train,X_test,y_train, y_test from Pycaret?


can we get the X_train, y_train,X_test,y_test from a tuned model in pycaret? I want the splits so that I can plot a few graphs which are not supported by plot_model in pycaret


Solution

  • You can use get_config(variable: str) function.

    Example:

    get_config('X_test')
    

    Please, check out documentation here: https://pycaret.readthedocs.io/en/stable/api/classification.html