Reduces the size of large binary data sets by binning them according to their predicted probability [0, 1].

1 | ```
heatmap.compress(y, pred, init.grid)
``` |

`y` |
A vector of observations of the dependent variable (in {0,1}). |

`pred` |
A vector of predicted Pr(y = 1) corresponding to each element of |

`init.grid` |
The number of bins on the interval [0, 1] to use for compression of |

A list with the elements:

`y.out` |
The value of |

`pred.out` |
The (binned) predicted Pr(y = 1) matching each observation. |

`weight.out` |
A weight parameter indicating the proportion of observations in the bin; sums to one. |

`pred.total.out` |
A vector of unique Pr(y = 1) bin values. |

`n.out` |
The number of observations (non-empty bins) after the data are collapsed. |

`retained.obs` |
A vector of indices for non-empty candidate bins (for internal use by |

Justin Esarey <justin@justinesarey.com>

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.