normalize: normalize

View source: R/brnn.R

normalizeR Documentation

normalize

Description

Internal function for normalizing the data. This function makes a linear transformation of the inputs such that the values lie between -1 and 1.

Usage

   normalize(x,base,spread)

Arguments

x

a vector or matrix that needs to be normalized.

base

If x is a vector, base is the minimum of x. If x is a matrix, base is a vector with the minimum for each of the columns of the matrix x.

spread

if x is a vector, spread=max(x)-base. If x is a matrix, spread is a vector calculated for each of the columns of x.

Details

z=2*(x-base)/spread - 1

Value

A vector or matrix with the resulting normalized values.


brnn documentation built on Nov. 10, 2023, 9:08 a.m.

Related to normalize in brnn...