## kernels.fit_ml_development_grid()


Fit a random forest or gradient boosting to a cumulative grid's cells.


Usage

``` python
kernels.fit_ml_development_grid(
    grid,
    spec,
)
```


`grid` is the dict [kernels.cohort_grid_frame](kernels.cohort_grid_frame.md#ibnr.kernels.cohort_grid_frame) builds (cumulative amounts, one run-off triangle), checked by `kernels.grid.check_grid`. `spec` is an [MLDevelopmentSpec](kernels.MLDevelopmentSpec.md#ibnr.kernels.MLDevelopmentSpec).

Refused, each with [ibnr.errors.Refusal](methods.Refusal.md#ibnr.methods.Refusal): fewer than 2 training rows (`not_identified`); under `zero_cells="missing"` with `unsupported_factor="raise"`, an age whose cells are all zero (`no_link_ratio`); a fitted value that is not a finite number, from amounts near the largest double (`result_not_finite`); a still-developing origin with losses whose fitted cumulative at its latest age is zero or less, so its factor to ultimate is undefined, and a negative ultimate (both `negative_projection`). Those are checked in that order. Before them all, a triangle whose cells are all zero is refused as [tweedie_glm](methods.tweedie_glm.md#ibnr.methods.tweedie_glm) refuses it (`not_identified`, "cells has no losses to fit"). scikit-learn not installed raises `ImportError`.
