initialization: Random initialization of the segmentation

View source: R/initialization.R

initializationR Documentation

Random initialization of the segmentation

Description

This function randomy initializes the segmentation.

Usage

initialization(K, n)

Arguments

K

The number of segments to start with (maximum number of segments there'll be in the end).

n

The number of observations to draw.

Value

A vector of length n containing a factor with K levels (from 1 to K) drawn with replacement.

Author(s)

Adrien Ehrhardt


glmtree documentation built on May 29, 2024, 9:37 a.m.