---
name: "linclass"
section: "1"
platform: "linux"
package: "libocas-tools"
version: "0.93-1"
release: "Debian 7 (Wheezy)"
platforms: ["linux"]
url: "https://new.carta.tech/linclass"
---

# linclass(1)

predict labels by a linear classification rule

## NAME

linclass - predict labels by a linear classification rule

## SYNOPSIS

**linclass** \[*options*\] *example\_file* *model\_file*

## DESCRIPTION

**linclass** is a program that predicts labels by a linear classification rule.

*example\_file* is a file with testing examples in SVM^light format, and *model\_file* is the file which contains either a binary (two-class) rule **f(x)=w'\*x+w0** or a multi-class rule **f(x)=W'\*x**. These are produced [**svmocas**(1)](/svmocas/1.md) and [**msvmocas**(1)](/msvmocas/1.md), respectively.

## OPTIONS

A summary of options is included below.

- **-h**

  Show summary of options.

- **-v *(0\|1)***

  Set the verbosity level (default: **1**)

- **-e**

  Print the classification error computed from predicted labels and labels contained in *example\_file*.

- **-o *out\_file***

  Save predictions to the file *out\_file*.

- **-t *(0\|1)***

  Output type:

  ```
  0 ... predicted labels (default)

  1 ... discriminant values
  ```

## EXAMPLES

Train the multi-class SVM classifier from example file *fiply\_trn.light*, using [**svmocas**(1)](/svmocas/1.md) with the regularization constant C=10, verbosity switched off, and save model to *svmocas.model*:

```
 svmocas -c 10 -b 1 -v 0 riply_trn.light svmocas.model
```

Compute the testing error of the classifier stored in *svmocas.model* using testing examples from *riply\_tst.light* and save the predicted labels to *riply\_tst.pred*:

```
 linclass -e -o riply_tst.pred riply_tst.light svmocas.model
```

## SEE ALSO

[**svmocas**(1)](/svmocas/1.md), [**msvmocas**(1)](/msvmocas/1.md).

## AUTHORS

linclass was written by Vojtech Franc \<xfrancv@cmp.felk.cvut.cz\> and Soeren Sonnenburg \<Soeren.Sonnenburg@tu-berlin.de\>.

This manual page was written by Christian Kastner \<debian@kvr.at\>, for the Debian project (and may be used by others).
