@@ -127,6 +127,29 @@ print.tailor <- function(x, ...) {
127
127
invisible (x )
128
128
}
129
129
130
+ # ' Fit and predict from tailors
131
+ # '
132
+ # ' @description
133
+ # ' These functions apply `fit()` and `predict()` methods for each adjustment
134
+ # ' added to a tailor, in the order in which they were applied.
135
+ # '
136
+ # ' Users do not need to interface with these methods directly when tailors
137
+ # ' are situated inside model workflows with [workflows::add_tailor()].
138
+ # '
139
+ # ' @section Data Usage:
140
+ # '
141
+ # ' For adjustments that don't require estimating parameters, training with
142
+ # ' `fit()` simply evaluates tidyselect expressions and logs column names.
143
+ # ' For others, as in [adjust_numeric_calibration()], adjustments actually
144
+ # ' learn from data; in that case, separate subsets of data ought to be used
145
+ # ' for training the tailor and evaluating its performance on predictions.
146
+ # ' See the Data Usage section in [workflows::add_tailor()] for more information
147
+ # ' on how tidymodels makes that split; when situated in a model workflow,
148
+ # ' tailors will automatically be trained on the appropriate subset of data.
149
+ # '
150
+ # ' @param .data,new_data A data frame containing predictions from a model.
151
+ # ' @inheritParams tailor
152
+ # '
130
153
# ' @export
131
154
fit.tailor <- function (object , .data , outcome , estimate , probabilities = c(),
132
155
... ) {
@@ -170,6 +193,7 @@ fit.tailor <- function(object, .data, outcome, estimate, probabilities = c(),
170
193
object
171
194
}
172
195
196
+ # ' @rdname fit.tailor
173
197
# ' @export
174
198
predict.tailor <- function (object , new_data , ... ) {
175
199
# validate levels/classes
0 commit comments