Learn R Programming

glmtree (version 0.3.1)

initialization: Random initialization of the segmentation

Description

This function randomy initializes the segmentation.

Usage

initialization(K, n)

Value

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

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.

Author

Adrien Ehrhardt