## FittedRecipe.to_yaml()


Serialize to a diffable YAML string. See [mlfeatures.to_yaml](to_yaml.md#mlfeatures.to_yaml).


Usage

``` python
FittedRecipe.to_yaml()
```


Choose YAML over JSON when people will read or review the file, since the block layout diffs more cleanly. It needs the optional `pyyaml` package.


## Returns


`str`  
The YAML text. Load it again with [FittedRecipe.from_yaml](FittedRecipe.from_yaml.md#mlfeatures.FittedRecipe.from_yaml).


## Raises


`ImportError`  
If the optional `pyyaml` package is not installed.

`TypeError`  
As for [FittedRecipe.to_dict](FittedRecipe.to_dict.md#mlfeatures.FittedRecipe.to_dict).


## Warns


`UserWarning`  
As for [FittedRecipe.to_dict](FittedRecipe.to_dict.md#mlfeatures.FittedRecipe.to_dict).
