# Collapse a large data set for heatmap.fit

### Description

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

### Usage

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

### Arguments

`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 |

### Value

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 |

### Author(s)

Justin Esarey <justin@justinesarey.com>