# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393
#' Sigmoid function
#'
#' @param a A Numeric Vector. original distance
#' @param n n for Sigmoid function.
#' @param k k for Sigmoid function.
#' @export
Sigmoid <- function(a, n, k) {
.Call(`_LinQView_Sigmoid`, a, n, k)
}
#' EucNorm function
#'
#' @param a A Numeric Vector.
#' @export
EucNorm <- function(a) {
.Call(`_LinQView_EucNorm`, a)
}
#' Scale distance using a sigmoid function. The main purpose is to reduce the effects of small distances (those distances are most likely from random noise of ADT signals)
#'
#' @param data data matrix of ADT.
#' @param n n for Sigmoid function.
#' @param k k for Sigmoid function.
#' @export
scaleDistCpp <- function(data, n, k) {
.Call(`_LinQView_scaleDistCpp`, data, n, k)
}
#' Scale distance using a sigmoid function. The main purpose is to reduce the effects of small distances (those distances are most likely from random noise of ADT signals)
#' This is an updated function. This function will distingrish distances between negative and positive from those within negative/positive groups. Only distances within negative/positive groups will be scaled.
#' This function may take longer time than normal one...
#'
#' @param data data matrix of ADT.
#' @param n n for Sigmoid function.
#' @param k k for Sigmoid function.
#' @param c c is a vector that contains constant value that seaprate negative and positive for each ADT feature. By default, c = 1,1,...,1
#' @export
scaleDistUpdateCpp <- function(data, n, k, c) {
.Call(`_LinQView_scaleDistUpdateCpp`, data, n, k, c)
}
#' objective function for gradient descnet method
#'
#' @param alpha current value of parameter alpha.
#' @param X distance vector.
#' @param Y distance vector.
#' @export
objectiveFunctionCpp <- function(alpha, X, Y) {
.Call(`_LinQView_objectiveFunctionCpp`, alpha, X, Y)
}
#' gradient function for gradient descnet method
#'
#' @param alpha current value of parameter alpha.
#' @param X distance vector.
#' @param Y distance vector.
#' @export
gradientFunctionCpp <- function(alpha, X, Y) {
.Call(`_LinQView_gradientFunctionCpp`, alpha, X, Y)
}
#' gradient descnet method
#'
#' @param X distance vector.
#' @param Y distance vector.
#' @param alpha initial value of parameter alpha.
#' @param learning_rate learning rate of GD method
#' @param low_threshold the low threshold of GD
#' @param max_iter maximum iterations
#' @export
gradientDescentCpp <- function(X, Y, alpha, learning_rate, low_threshold, max_iter) {
.Call(`_LinQView_gradientDescentCpp`, X, Y, alpha, learning_rate, low_threshold, max_iter)
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.