normalize_to_prob: 비음행렬의 값을 확률로 변환.

View source: R/feature-utils.R

normalize_to_probR Documentation

비음행렬의 값을 확률로 변환.

Description

행렬의 각 행이 합계 1의 값을 갖도록 값을 변환.

Usage

normalize_to_prob(p, small_p = NULL)

Arguments

p

실수형 행렬. 모든 값은 0 이상이어야 한다.

small_p

값 변환 전 행렬 p의 모든 원소값에 더할 작은 양의 실수.

Value

행렬.

Examples

x <- matrix(runif(15), nrow = 5)
normalize_to_prob(x)
normalize_to_prob(x, small_p = 0)


youngroklee-ml/dmtr documentation built on June 12, 2022, 6:24 p.m.