> ## Documentation Index
> Fetch the complete documentation index at: https://docs.bijection.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Class: SelectionAnalysis<FieldPath, Grouped, Windowed, Signal>

> A selection of sample records awaiting its analysis.

[server](https://docs.bijection.com/api/modules/server).SelectionAnalysis

A selection of sample records awaiting its analysis.

## Type parameters

| Name | Type |
| :- | :- |
| `FieldPath` | extends `string` |
| `Grouped` | extends `boolean` = `false` |
| `Windowed` | extends `boolean` = `false` |
| `Signal` | extends `boolean` = `false` |

## Methods

### groupBy

▸ **groupBy**\<`Path`>(`field`): [`SelectionAnalysis`](https://docs.bijection.com/api/classes/server.SelectionAnalysis)\<`FieldPath`, `true`, `Windowed`, `Signal`>

Group samples by the value of one record field. Groups are the
selection's samples; they never invent members without samples.

#### Type parameters

| Name | Type |
| :- | :- |
| `Path` | extends `FieldPath` |

#### Parameters

| Name | Type |
| :- | :- |
| `field` | `Signal` extends `true` ? `never` : `Path` |

#### Returns

[`SelectionAnalysis`](https://docs.bijection.com/api/classes/server.SelectionAnalysis)\<`FieldPath`, `true`, `Windowed`, `Signal`>

***

### window

▸ **window**(`spec`): [`SelectionAnalysis`](https://docs.bijection.com/api/classes/server.SelectionAnalysis)\<`FieldPath`, `Grouped`, `true`, `Signal`>

Window event time.

#### Parameters

| Name | Type |
| :- | :- |
| `spec` | [`WindowSpec`](https://docs.bijection.com/api/modules/server#windowspec) |

#### Returns

[`SelectionAnalysis`](https://docs.bijection.com/api/classes/server.SelectionAnalysis)\<`FieldPath`, `Grouped`, `true`, `Signal`>

***

### signal

▸ **signal**(`policy`): [`SelectionAnalysis`](https://docs.bijection.com/api/classes/server.SelectionAnalysis)\<`FieldPath`, `Grouped`, `Windowed`, `true`>

Interpret one series' samples as a signal over the selection's bounded
event-time interval. The selection's index range must fix the series.

#### Parameters

| Name | Type |
| :- | :- |
| `policy` | `Grouped` extends `true` ? `never` : [`SignalPolicy`](https://docs.bijection.com/api/modules/server#signalpolicy)\<`FieldPath`> |

#### Returns

[`SelectionAnalysis`](https://docs.bijection.com/api/classes/server.SelectionAnalysis)\<`FieldPath`, `Grouped`, `Windowed`, `true`>

***

### aggregate

▸ **aggregate**\<`Aggregates`>(`aggregates`): [`Analysis`](https://docs.bijection.com/api/classes/server.Analysis)\<`Grouped` extends `true` ? [`AnalysisRow`](https://docs.bijection.com/api/modules/server#analysisrow)\<[`AnswersOf`](https://docs.bijection.com/api/modules/server#answersof)\<`Aggregates`>, `Grouped`, `Windowed`>\[] : `Windowed` extends `true` ? [`AnalysisRow`](https://docs.bijection.com/api/modules/server#analysisrow)\<[`AnswersOf`](https://docs.bijection.com/api/modules/server#answersof)\<`Aggregates`>, `Grouped`, `Windowed`>\[] : [`AnswersOf`](https://docs.bijection.com/api/modules/server#answersof)\<`Aggregates`>>

Name the analysis's aggregates.

#### Type parameters

| Name | Type |
| :- | :- |
| `Aggregates` | extends `Record`\<`string`, [`Aggregate`](https://docs.bijection.com/api/modules/server#aggregate)\<`unknown`>> |

#### Parameters

| Name | Type |
| :- | :- |
| `aggregates` | `Aggregates` |

#### Returns

[`Analysis`](https://docs.bijection.com/api/classes/server.Analysis)\<`Grouped` extends `true` ? [`AnalysisRow`](https://docs.bijection.com/api/modules/server#analysisrow)\<[`AnswersOf`](https://docs.bijection.com/api/modules/server#answersof)\<`Aggregates`>, `Grouped`, `Windowed`>\[] : `Windowed` extends `true` ? [`AnalysisRow`](https://docs.bijection.com/api/modules/server#analysisrow)\<[`AnswersOf`](https://docs.bijection.com/api/modules/server#answersof)\<`Aggregates`>, `Grouped`, `Windowed`>\[] : [`AnswersOf`](https://docs.bijection.com/api/modules/server#answersof)\<`Aggregates`>>


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.