## FittedRecipe


A trained pipeline: applies statistics learned at fit time to new data.


Usage

``` python
FittedRecipe(
    steps,
    roles=None,
    lineage=None,
    schema=None,
)
```


A [FittedRecipe](FittedRecipe.md#mlfeatures.FittedRecipe) is what [Recipe.fit()](Recipe.fit.md#mlfeatures.Recipe.fit) returns. It contains all the information it needs to be able to apply the transformations to new data:


``` python
recipe = (
    Recipe(data=credit, target="Status")
    .add(StepNormalize(s.numeric_features()))
    .add(StepDummy(s.nominal_features()))
)
fitted = recipe.fit(credit)
```


The `repr` shows the columns each step resolved to:


``` python
fitted
```


    Recipe (trained)
      Inputs: 23 columns (22 features, 1 target)
      Steps:
        step_normalize(Seniority, Time, Age, Expenses, Income, Assets, Debt, Amount, Price)                                                                                                                                           [trained]
        step_dummy(Home, Marital, Records, Job → Home_other, Home_owner, Home_parents, Home_priv, Home_rent, Marital_married, Marital_separated, Marital_single, Marital_widow, Records_yes, Job_freelance, Job_others, Job_partime)  [trained]


Use [transform()](Step.transform.md#mlfeatures.Step.transform) to apply the recipe to new data and [summary()](Recipe.summary.md#mlfeatures.Recipe.summary) to inspect the resulting columns. A trained recipe can be saved and restored with [to_json()](to_json.md#mlfeatures.to_json) and [from_json()](from_json.md#mlfeatures.from_json) (or the `dict` and YAML equivalents).


## Attributes


`steps`  
The trained steps, in the order they run.

`roles`  
The role assignments after fitting, including any columns the steps added.

`lineage`  
How each output column was derived from the input columns, as a [Lineage](Lineage.md#mlfeatures.Lineage), or `None` if the recipe was built without one.

`schema`  
The [Schema](Schema.md#mlfeatures.Schema) of the training data, which [transform()](Step.transform.md#mlfeatures.Step.transform) checks new data against, or `None` if the recipe was built without one.
