rlga

rlga performs robust linear grouping analysis

Syntax

Description

example

out =rlga(X, k, alpha) rlga with all default options.

example

out =rlga(X, k, alpha, Name, Value) rlga with niter = 500 and biter = 1000.

Examples

expand all

  • rlga with all default options.
  • rng(123); this leads to ROSS = 5.1298;

    X=load('X.txt');
    out=rlga(X,3,0.05);

  • rlga with niter = 500 and biter = 1000.
  • X=load('X.txt');
    out=rlga(X,4,0.05,'niter',500,'biter',1000);

    Related Examples

    expand all

  • Generate mixture of regression using MixSimReg, with an average overlapping at centroids = 0.
  • 01. Use all default options.

    rng(372,'twister');
    p=3;
    k=2;
    Q=MixSimreg(k,p,'BarOmega',0.001);
    n=500;
    [y,X,id]=simdatasetreg(n,Q.Pi,Q.Beta,Q.S,Q.Xdistrib);
    % run rlga
    out=rlga([y,X(:,2:end)],k,0.01);
    RLGA Algorithm k =2 biter =8 niter =10
    Finished.
    
    Click here for the graphical output of this example (link to Ro.S.A. website)

    Input Arguments

    expand all

    X — input data matrix. Matrix.

    Input data as matrix of size n-by-p

    Data Types: single| double

    k — number of clusters. Scalar.

    Scalar which specifies the number of clusters.

    Data Types: single| double

    alpha — a numeric value between 0 and 0.5. Scalar.

    For the robust estimate of RLGA, specifying the percentage of points to be trimmed.

    alpha must be a number in the interval [0 0.5].

    Data Types: single| double

    Name-Value Pair Arguments

    Specify optional comma-separated pairs of Name,Value arguments. Name is the argument name and Value is the corresponding value. Name must appear inside single quotes (' '). You can specify several name and value pair arguments in any order as Name1,Value1,...,NameN,ValueN.

    Example: 'biter',1 , 'niter',1 , 'showall','true' , 'stand','true' , 'silent','true' , 'plots',1

    biter —number of different starting hyperplanes.scalar.

    An integer for the number of different starting hyperplanes to try.

    Example: 'biter',1

    Data Types: double

    niter —Number of iterations.scalar.

    An integer for the number of iterations to attempt for convergence.

    Example: 'niter',1

    Data Types: double

    showall —Level of display.logical.

    If true then display all the outcomes, not just the best one.

    Example: 'showall','true'

    Data Types: char

    stand —Data standardization.boolean.

    If true the X matrix is standardized using the standard deviation before fitting. Logical.

    Example: 'stand','true'

    Data Types: char

    silent —Text output.logical.

    If true, produces no text output during processing. The default value is false.

    Example: 'silent','true'

    Data Types: char

    plots —plot on the screen.scalar.

    If plots=1 a plot is showed on the screen with the final allocation (and if size(X,2)==2 with the lines associated to the groups).

    Example: 'plots',1

    Data Types: double

    Output Arguments

    expand all

    out — description Structure

    Structure which contains the following fields

    Value Description
    cluster

    vector containing the cluster memberships.

    ROSS

    the Residual Orthogonal Sum of Squares for the solution.

    converged

    logical. True if at least one solution has converged.

    nconverg

    the number of converged solutions (out of biter starts).

    hpcoeff

    best hyerplane

    X

    the (scaled if selected) dataset.

    scaled

    logical. Is the data set scaled?

    k

    the number of clusters to be found.

    alpha

    the trimming percentage.

    biter

    the biter setting used.

    niter

    the niter setting used.

    class

    'rlga'.

    References

    Garcia-Escudero, L. A., Gordaliza, A., San Martin, R., Van Aelst, S. and Zamar, R. (2009), Robust linear clustering, "Journal of the Royal Statistical Society:

    Series B", Vol. 71, pp. 301-318.

    [doi: 10.1111/j.1467-9868.2008.00682.x]

    See Also

    This page has been automatically generated by our routine publishFS