---
name: "mlpack_kernel_HyperbolicTangentKernel"
section: "3"
platform: "linux"
package: "mlpack-doc"
version: "1.0.10-1"
release: "Debian 8 (Jessie)"
platforms: ["linux"]
url: "https://new.carta.tech/mlpack_kernel_HyperbolicTangentKernel"
---

# mlpack\_kernel\_HyperbolicTangentKernel(3)

Hyperbolic tangent kernel.

## NAME

mlpack::kernel::HyperbolicTangentKernel -

Hyperbolic tangent kernel.

## SYNOPSIS

### Public Member Functions

**HyperbolicTangentKernel** ()\
 *This constructor sets the default scale to 1.0 and offset to 0.0.*  **HyperbolicTangentKernel** (double **scale**, double **offset**)\
 *Construct the hyperbolic tangent kernel with custom scale factor and offset.*  template\<typename VecType \> double **Evaluate** (const VecType &a, const VecType &b)\
 *Evaluate the hyperbolic tangent kernel.*  double **Offset** () const \
 *Get offset for the kernel.*  double & **Offset** ()\
 *Modify offset for the kernel.*  double **Scale** () const \
 *Get scale factor.*  double & **Scale** ()\
 *Modify scale factor.*  std::string **ToString** () const \
 *Convert object to string.*

### Private Attributes

double **offset**\
 double **scale**\

## Detailed Description

Hyperbolic tangent kernel.

For any two vectors $ x $, $ y $ and a given scale $ s $ and offset $ t $

Definition at line 38 of file hyperbolic\_tangent\_kernel.hpp.

## Constructor & Destructor Documentation

### mlpack::kernel::HyperbolicTangentKernel::HyperbolicTangentKernel ()` [inline]`

This constructor sets the default scale to 1.0 and offset to 0.0.

Definition at line 44 of file hyperbolic\_tangent\_kernel.hpp.

### mlpack::kernel::HyperbolicTangentKernel::HyperbolicTangentKernel (doublescale, doubleoffset)` [inline]`

Construct the hyperbolic tangent kernel with custom scale factor and offset.

**Parameters:**

*scale* Scaling factor for \<x, y\>. \
 *offset* Kernel offset.

Definition at line 54 of file hyperbolic\_tangent\_kernel.hpp.

## Member Function Documentation

### template\<typename VecType \> double mlpack::kernel::HyperbolicTangentKernel::Evaluate (const VecType &a, const VecType &b)` [inline]`

Evaluate the hyperbolic tangent kernel. This evaluation uses Armadillo's dot() function.

**Template Parameters:**

*VecType* Type of vector (should be arma::vec or arma::spvec).

**Parameters:**

*a* First vector. \
 *b* Second vector.

**Returns:**

K(a, b).

Definition at line 68 of file hyperbolic\_tangent\_kernel.hpp.

References offset, and scale.

### double mlpack::kernel::HyperbolicTangentKernel::Offset () const` [inline]`

Get offset for the kernel.

Definition at line 79 of file hyperbolic\_tangent\_kernel.hpp.

References offset.

### double& mlpack::kernel::HyperbolicTangentKernel::Offset ()` [inline]`

Modify offset for the kernel.

Definition at line 81 of file hyperbolic\_tangent\_kernel.hpp.

References offset.

### double mlpack::kernel::HyperbolicTangentKernel::Scale () const` [inline]`

Get scale factor.

Definition at line 74 of file hyperbolic\_tangent\_kernel.hpp.

References scale.

### double& mlpack::kernel::HyperbolicTangentKernel::Scale ()` [inline]`

Modify scale factor.

Definition at line 76 of file hyperbolic\_tangent\_kernel.hpp.

References scale.

### std::string mlpack::kernel::HyperbolicTangentKernel::ToString () const` [inline]`

Convert object to string.

Definition at line 84 of file hyperbolic\_tangent\_kernel.hpp.

References offset, and scale.

## Member Data Documentation

### double mlpack::kernel::HyperbolicTangentKernel::offset` [private]`

Definition at line 95 of file hyperbolic\_tangent\_kernel.hpp.

Referenced by Evaluate(), Offset(), and ToString().

### double mlpack::kernel::HyperbolicTangentKernel::scale` [private]`

Definition at line 94 of file hyperbolic\_tangent\_kernel.hpp.

Referenced by Evaluate(), Scale(), and ToString().

## Author

Generated automatically by Doxygen for MLPACK from the source code.
