If `x` is a data.frame object, computes conditional tree from partkit::ctree(). If `x` is a partynode object specifying the customized tree, fit `x` on `data_test`. If `x` is a party (or constparty) object specifying the precomputed tree, simply coerce `x` to have class constparty.

get_fit(x, ...)

# S3 method for default
get_fit(x, ...)

# S3 method for partynode
get_fit(x, data_test, target_lab, ...)

# S3 method for party
get_fit(x, data_test, target_lab, task, ...)

# S3 method for data.frame
get_fit(x, data_test, target_lab, ...)



Dataframe or a `party` or `partynode` object representing a custom tree. If a dataframe is supplied, conditional inference tree is computed. If a custom tree is supplied, it must follow the partykit syntax: https://cran.r-project.org/web/packages/partykit/vignettes/partykit.pdf


Further arguments passed to each method.


Tidy test dataset. Required if `x` is a `partynode` object. If NULL, heatmap displays (training) data `x`.


Name of the column in data that contains target/label information.


Character string indicating the type of problem, either 'classification' (categorical outcome) or 'regression' (continuous outcome).


Fitted object as a list with prepped `data_test` if available.