## Methods

decisionFunction(x)

fit(X, y)

predict(x)

## new ThresholdModel([arg])

Threshold Model

### Example

    // TODO

### Parameters

Name | Type | Optional | Description
--- | --- | --- | ---

arg

Object

Yes

The constructor parameters.

Values in `arg` have the following properties:

Name | Type | Optional | Description
--- | --- | --- | ---
target | string | Yes | Target type. Possible options are `"recall"` and `"precision"`.
level | TODO | Yes | TODO

## Methods

### decisionFunction(x) → (number or module:la.Vector)

Apply all models to the given vector and returns the distance to the class boundary.

#### Example

    // TODO

#### Parameter

Name | Type | Optional | Description
--- | --- | --- | ---
x | (number or module:la.Vector) |  | The prediction score for each class.

Returns

  `(number or module:la.Vector)`B
  1. value of the translated prediction based on the threshold, if `x` is `number`,
  2. module:la.Vector of translated prediction based on the threshold, if `x` is module:la.Vector.

### fit(X, y)

Fits the model.

#### Example

    // TODO

#### Parameters

Name | Type | Optional | Description
--- | --- | --- | ---
X | module:la.Vector |  | Prediction for each instance (output of descisionFunction).
y | number |  | The target labels (1 or -1).

### predict(x) → (number or module:la.Vector)

Returns the most likely category.

#### Example

    // TODO

#### Parameter

Name | Type | Optional | Description
--- | --- | --- | ---
x | (number or module:la.Vector) |  | The prediction score for each class.

Returns

  `(number or module:la.Vector)`B
  1. value of the positive label IDs, if `x` is `number`,
  2. module:la.Vector of the positive label IDs, if `x` is module:la.Vector.