Learn R Programming

chickn (version 1.2.3)

Gradient_cpp: Gradient and objective function

Description

Global objective function and gradient computations with respect to cluster centroid vectors and their weights.

Usage

Gradient_cpp(x, SK, W, K)

Arguments

x

is a data vector. Its first K*n components are cluster centroids and its last K components are the centroid weights.

SK

is a data sketch vector.

W

is a frequency matrix.

K

is a number of cluster centroids.

Value

  • gradient is a gradient vector

  • objective is an objective function value \(\|SK - \sum_{k=1}^K \alpha_k Sketch(c_k, W)\|\)