kmeans analysis@cosine

Upload: avishekkgec

Post on 14-Apr-2018

231 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/30/2019 Kmeans Analysis@Cosine

    1/99

    Green(FA)

    ---------------aa=[44.4011784636.6518724523.6184814521.1476078131.0032527334.4522995931.217579858.3837139721.7745759121.2669855613.5705053623.6325691216.0877551429.1859769923.9796302321.5052226323.5542847813.4329344618.7959901418.60548463]

    [r c]=size(aa);for i=1:10opts = statset('Display','final');s=0;[cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform'

    ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts)for j=1:i

    s=s+sumd(j,1);endresult=s/r

    end

    --------------------------------------------------------------------------------

    ------------------------------------------------------------------------------------

    Results:

    aa =

    44.401236.651923.618521.147631.003334.4523

    31.21768.3837

    21.774621.267013.570523.632616.087829.186023.979621.5052

  • 7/30/2019 Kmeans Analysis@Cosine

    2/99

    23.554313.432918.796018.6055

    2 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 0

    cidx =

    11111111111

    111111111

    ctrs =

    1

    sumd =

    0

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.

    > In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

  • 7/30/2019 Kmeans Analysis@Cosine

    3/99

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    211111111111

    11111111

    ctrs =

    1

    1

    sumd =

    00

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444

  • 7/30/2019 Kmeans Analysis@Cosine

    4/99

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    23111111111

    111111111

    ctrs =

    111

    sumd =

    000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

  • 7/30/2019 Kmeans Analysis@Cosine

    5/99

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    23411111

    111111111111

    ctrs =

    1111

    sumd =

    00

    00

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444

  • 7/30/2019 Kmeans Analysis@Cosine

    6/99

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    234

    5111111111111

    1111

    ctrs =

    11111

    sumd =

    00000

  • 7/30/2019 Kmeans Analysis@Cosine

    7/99

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    234561111

    11111111111

    ctrs =

    111111

  • 7/30/2019 Kmeans Analysis@Cosine

    8/99

    sumd =

    000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2345671111111

    1111111

    ctrs =

  • 7/30/2019 Kmeans Analysis@Cosine

    9/99

    1111111

    sumd =

    0000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    23

    4567811111

  • 7/30/2019 Kmeans Analysis@Cosine

    10/99

    11111111

    ctrs =

    11111111

    sumd =

    00000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

  • 7/30/2019 Kmeans Analysis@Cosine

    11/99

    23456789111111111111

    ctrs =

    111111111

    sumd =

    000000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

  • 7/30/2019 Kmeans Analysis@Cosine

    12/99

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    23456789

    1011111111111

    ctrs =

    1111111111

    sumd =

    000000

  • 7/30/2019 Kmeans Analysis@Cosine

    13/99

    0000

    result =

    0

    ................................................................................

    ................................................................................Green(

    PCA)---------

    -------aa=[52.9116327847.3805424638.071167236.6628587749.4852049246.8947596753.0036769833.75061285

    38.5100897938.5535377937.7336000850.6684167841.5172822453.9534016949.2481438350.9596420955.1702932947.4425872649.9012001554.7834738][r c]=size(aa);

    for i=1:10opts = statset('Display','final');s=0;[cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform'

    ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts)for j=1:i

    s=s+sumd(j,1);endresult=s/r

    end

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------

    -

    Results:

    aa =

    52.911647.380538.071236.6629

  • 7/30/2019 Kmeans Analysis@Cosine

    14/99

    49.485246.894853.003733.750638.510138.553537.733650.668441.517353.953449.248150.959655.170347.442649.901254.7835

    2 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 0

    cidx =

    111111111111

    11111111

    ctrs =

    1

    sumd =

    0

    result =

    0

  • 7/30/2019 Kmeans Analysis@Cosine

    15/99

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2111111111111

    1111111

    ctrs =

    11

    sumd =

    00

    result =

  • 7/30/2019 Kmeans Analysis@Cosine

    16/99

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    231111111111

    11111111

    ctrs =

    1

    11

    sumd =

    000

  • 7/30/2019 Kmeans Analysis@Cosine

    17/99

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    234111111

    11111111111

    ctrs =

    1111

    sumd =

  • 7/30/2019 Kmeans Analysis@Cosine

    18/99

    0000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2345

    1111111111111

    111

    ctrs =

    111

  • 7/30/2019 Kmeans Analysis@Cosine

    19/99

    11

    sumd =

    00000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2345611111

    1111111111

  • 7/30/2019 Kmeans Analysis@Cosine

    20/99

    ctrs =

    111111

    sumd =

    000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2

    3456711111

  • 7/30/2019 Kmeans Analysis@Cosine

    21/99

    111111111

    ctrs =

    1111111

    sumd =

    0000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.

    > In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

  • 7/30/2019 Kmeans Analysis@Cosine

    22/99

    23456781111111111111

    ctrs =

    11111111

    sumd =

    0

    0000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444

  • 7/30/2019 Kmeans Analysis@Cosine

    23/99

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    23456789111

    111111111

    ctrs =

    111111111

    sumd =

    000000000

  • 7/30/2019 Kmeans Analysis@Cosine

    24/99

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2345678910

    11111111111

    ctrs =

    11111111

  • 7/30/2019 Kmeans Analysis@Cosine

    25/99

    11

    sumd =

    0000000000

    result =

    0......................................................................................................................................................................

    Low(FA)------------

    --aa=[27.1554273825.159817019.519631129.8667384522.4480612813.867879217.7288407924.438865432.95080236

    26.3054193626.8612040124.7105321526.5826099616.5693216216.1126957][r c]=size(aa);for i=1:10

    opts = statset('Display','final');s=0;[cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform'

    ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts)for j=1:i

    s=s+sumd(j,1);endresult=s/r

    end

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------

    Results:

  • 7/30/2019 Kmeans Analysis@Cosine

    26/99

    aa =

    27.155425.15989.51969.8667

    22.448113.867917.728824.438932.950826.305426.861224.710526.582616.569316.1127

    2 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 0

    cidx =

    1111111111

    11111

    ctrs =

    1

    sumd =

    0

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444

  • 7/30/2019 Kmeans Analysis@Cosine

    27/99

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    211

    111111111111

    ctrs =

    11

    sumd =

    00

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444

  • 7/30/2019 Kmeans Analysis@Cosine

    28/99

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2311111

    11111111

    ctrs =

    1

    11

    sumd =

    000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

  • 7/30/2019 Kmeans Analysis@Cosine

    29/99

    Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    234111111

    111111

    ctrs =

    111

    1

    sumd =

    0000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

  • 7/30/2019 Kmeans Analysis@Cosine

    30/99

    Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    234511111

    111111

    ctrs =

    111

    11

    sumd =

    00000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444

  • 7/30/2019 Kmeans Analysis@Cosine

    31/99

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2345611

    11111111

    ctrs =

    1

    11111

    sumd =

    0000

    00

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444

  • 7/30/2019 Kmeans Analysis@Cosine

    32/99

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    234

    567111111111

    ctrs =

    1111111

    sumd =

    0000000

  • 7/30/2019 Kmeans Analysis@Cosine

    33/99

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2345678111

    11111

    ctrs =

    1111

    1111

    sumd =

    00

  • 7/30/2019 Kmeans Analysis@Cosine

    34/99

    000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    23

    4567891111111

    ctrs =

    111111

  • 7/30/2019 Kmeans Analysis@Cosine

    35/99

    111

    sumd =

    000000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    23456

    78910111111

  • 7/30/2019 Kmeans Analysis@Cosine

    36/99

    ctrs =

    1111111111

    sumd =

    000000

    0000

    result =

    0....................................................................................................................................................................

    Low(PCA)--

    -------------aa=[-4.314183546-1.70233180615.9666583221.278575237.64709581520.944098118.6392756915.2196788211.32996605

    14.4739283121.3944115624.7242036228.8301941632.8469427433.1610163][r c]=size(aa);for i=1:10

    opts = statset('Display','final');s=0;

  • 7/30/2019 Kmeans Analysis@Cosine

    37/99

    [cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform','Replicates',5, 'EmptyAction', 'singleton','Options',opts)

    for j=1:is=s+sumd(j,1);

    endresult=s/r

    end

    -------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Results:

    aa =

    -4.3142-1.702315.966721.27867.6471

    20.944118.639315.2197

    11.330014.473921.394424.724228.830232.846933.1610

    2 iterations, total sum of distances = 42 iterations, total sum of distances = 42 iterations, total sum of distances = 42 iterations, total sum of distances = 42 iterations, total sum of distances = 4

    cidx =

    1111111111

    11111

    ctrs =

    0.7333

  • 7/30/2019 Kmeans Analysis@Cosine

    38/99

    sumd =

    4

    result =

    0.2667

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    3 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    3 iterations, total sum of distances = 02 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    3 iterations, total sum of distances = 0

    cidx =

    112222222

    222222

    ctrs =

    -11

    sumd =

    00

    result =

    0

  • 7/30/2019 Kmeans Analysis@Cosine

    39/99

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2133333333333

    33

    ctrs =

    -1-11

    sumd =

    000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.

  • 7/30/2019 Kmeans Analysis@Cosine

    40/99

    > In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    31

    4222222222222

    ctrs =

    -11-11

    sumd =

    0

    000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.

  • 7/30/2019 Kmeans Analysis@Cosine

    41/99

    > In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    21

    3455555555555

    ctrs =

    -1-1111

    sumd =

    00000

    result =

    0

  • 7/30/2019 Kmeans Analysis@Cosine

    42/99

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2345611111111

    11

    ctrs =

    1-1-1111

    sumd =

    000000

  • 7/30/2019 Kmeans Analysis@Cosine

    43/99

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    263457111

    111111

    ctrs =

    1-11

    11-11

    sumd =

    00

  • 7/30/2019 Kmeans Analysis@Cosine

    44/99

    00000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.

    > In kmeans>batchUpdate at 444In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    234

    567811111111

    ctrs =

    1-1-11111

  • 7/30/2019 Kmeans Analysis@Cosine

    45/99

    1

    sumd =

    00000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.

    > In kmeans>batchUpdate at 444In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444

    In kmeans at 3362 iterations, total sum of distances = 0

    cidx =

    23456789

    1111111

    ctrs =

  • 7/30/2019 Kmeans Analysis@Cosine

    46/99

    1-1-1111111

    sumd =

    000000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    31456789

  • 7/30/2019 Kmeans Analysis@Cosine

    47/99

    10222222

    ctrs =

    -11-11111111

    sumd =

    0000000000

    result =

    0

    ................................................................................

    ................................................................................

    ...

    Medium(FA)--------------

    -

    aa=[7.728856648

    9.1224045847.3463348819.8542874949.4676055919.06144963611.2395965214.3730328715.3894210617.4519511718.13627777

  • 7/30/2019 Kmeans Analysis@Cosine

    48/99

    18.0984830920.255280521.4292979427.47502423][r c]=size(aa);for i=1:10

    opts = statset('Display','final');s=0;[cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform'

    ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts)for j=1:i

    s=s+sumd(j,1);endresult=s/r

    end

    --------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Results:

    aa =

    7.72899.12247.34639.85439.46769.0614

    11.239614.373015.389417.452018.136318.098520.2553

    21.429327.4750

    2 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 0

    cidx =

    11

    1111111111

  • 7/30/2019 Kmeans Analysis@Cosine

    49/99

    111

    ctrs =

    1

    sumd =

    0

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.

    > In kmeans>batchUpdate at 444In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444

    In kmeans at 3362 iterations, total sum of distances = 0

    cidx =

    21111111

    1111111

    ctrs =

  • 7/30/2019 Kmeans Analysis@Cosine

    50/99

    11

    sumd =

    00

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.

    > In kmeans>batchUpdate at 444In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    231111111111

    111

    ctrs =

    111

  • 7/30/2019 Kmeans Analysis@Cosine

    51/99

    sumd =

    000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2

    3411111111111

    1

    ctrs =

    1111

  • 7/30/2019 Kmeans Analysis@Cosine

    52/99

    sumd =

    0000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2

    3451111111111

    1

    ctrs =

    11111

  • 7/30/2019 Kmeans Analysis@Cosine

    53/99

    sumd =

    00000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.

    > In kmeans>batchUpdate at 444In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    234561111111

    111

    ctrs =

    111

  • 7/30/2019 Kmeans Analysis@Cosine

    54/99

    111

    sumd =

    000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.

    > In kmeans>batchUpdate at 444In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444

    In kmeans at 3362 iterations, total sum of distances = 0

    cidx =

    23456711

    1111111

    ctrs =

  • 7/30/2019 Kmeans Analysis@Cosine

    55/99

    1111111

    sumd =

    0000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    23

    4567811111

  • 7/30/2019 Kmeans Analysis@Cosine

    56/99

    111

    ctrs =

    11111111

    sumd =

    00000

    000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.

    > In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2345

  • 7/30/2019 Kmeans Analysis@Cosine

    57/99

    67891111111

    ctrs =

    111111111

    sumd =

    000000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.

  • 7/30/2019 Kmeans Analysis@Cosine

    58/99

    > In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2345678910111111

    ctrs =

    1111111111

    sumd =

    0000000000

    result =

    0

    ................................................................................

    ................................................................................

    ....M

    edium(PCA)

  • 7/30/2019 Kmeans Analysis@Cosine

    59/99

    -----------------aa=[-1.728842053-0.7491044886.3161831165.4626234687.32815519810.9510742912.5489371815.4968562415.7931335817.4904500921.9039395322.6312731626.7753575426.2723956430.50369233][r c]=size(aa);for i=1:10

    opts = statset('Display','final');s=0;[cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform'

    ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts)for j=1:i

    s=s+sumd(j,1);endresult=s/r

    end

    ---------------------------------------------------------------------------------------------------------------------------------------------------------------------

    Results:

    aa =

    -1.7288-0.74916.31625.46267.3282

    10.951112.548915.496915.793117.490521.903922.631326.7754

    26.272430.5037

    2 iterations, total sum of distances = 42 iterations, total sum of distances = 42 iterations, total sum of distances = 42 iterations, total sum of distances = 42 iterations, total sum of distances = 4

    cidx =

  • 7/30/2019 Kmeans Analysis@Cosine

    60/99

    111111111111111

    ctrs =

    0.7333

    sumd =

    4

    result =

    0.2667

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    3 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.

    > In kmeans>batchUpdate at 444In kmeans at 3363 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 0

    cidx =

    2211

    1111111111

  • 7/30/2019 Kmeans Analysis@Cosine

    61/99

    1

    ctrs =

    1-1

    sumd =

    00

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.

    > In kmeans>batchUpdate at 444In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444

    In kmeans at 3362 iterations, total sum of distances = 0

    cidx =

    23111111

    1111111

    ctrs =

  • 7/30/2019 Kmeans Analysis@Cosine

    62/99

    1-1-1

    sumd =

    000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    3142222222

    22222

    ctrs =

    -1

  • 7/30/2019 Kmeans Analysis@Cosine

    63/99

    1-11

    sumd =

    0000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2145333333

    33333

    ctrs =

    -1

  • 7/30/2019 Kmeans Analysis@Cosine

    64/99

    -1111

    sumd =

    00000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.

    > In kmeans>batchUpdate at 444In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444

    In kmeans at 3362 iterations, total sum of distances = 0

    cidx =

    24356111

    1111111

    ctrs =

  • 7/30/2019 Kmeans Analysis@Cosine

    65/99

    1-11-111

    sumd =

    000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.

    > In kmeans>batchUpdate at 444In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2734

    5611111111

  • 7/30/2019 Kmeans Analysis@Cosine

    66/99

    1

    ctrs =

    1-11111-1

    sumd =

    0000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    31456782

  • 7/30/2019 Kmeans Analysis@Cosine

    67/99

    2222222

    ctrs =

    -11-111111

    sumd =

    0

    0000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.

    > In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

  • 7/30/2019 Kmeans Analysis@Cosine

    68/99

    234567891111111

    ctrs =

    1-1-111

    1111

    sumd =

    00000

    0000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.

  • 7/30/2019 Kmeans Analysis@Cosine

    69/99

    > In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    324567891011111

    1

    ctrs =

    1-1-111111

    11

    sumd =

    0000000

    000

    result =

    0................................................................................................................................................................

  • 7/30/2019 Kmeans Analysis@Cosine

    70/99

    ...Heavy(FA)

    ------------aa=[0.8276460062.1148113791.8912927352.7293513452.9695841163.6692762054.3863910524.0611076734.4468176854.973500661];[r c]=size(aa);for i=1:10

    opts = statset('Display','final');s=0;[cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform'

    ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts)for j=1:i

    s=s+sumd(j,1);endresult=s/r

    end

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------------Results:

    2 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 0

    cidx =

    1111111111

    ctrs =

    1

    sumd =

    0

    result =

  • 7/30/2019 Kmeans Analysis@Cosine

    71/99

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2111111111

    ctrs =

    11

    sumd =

    00

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444

  • 7/30/2019 Kmeans Analysis@Cosine

    72/99

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2311111

    111

    ctrs =

    111

    sumd =

    000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.

  • 7/30/2019 Kmeans Analysis@Cosine

    73/99

    > In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2341111111

    ctrs =

    1111

    sumd =

    0000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444

  • 7/30/2019 Kmeans Analysis@Cosine

    74/99

    In kmeans at 3362 iterations, total sum of distances = 0

    cidx =

    2345111111

    ctrs =

    11111

    sumd =

    00000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

  • 7/30/2019 Kmeans Analysis@Cosine

    75/99

    cidx =

    2345611111

    ctrs =

    111111

    sumd =

    000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

  • 7/30/2019 Kmeans Analysis@Cosine

    76/99

    2345671111

    ctrs =

    1111111

    sumd =

    0000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

  • 7/30/2019 Kmeans Analysis@Cosine

    77/99

    cidx =

    2345678111

    ctrs =

    11111111

    sumd =

    00000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444

  • 7/30/2019 Kmeans Analysis@Cosine

    78/99

    In kmeans at 3362 iterations, total sum of distances = 0

    cidx =

    2345678911

    ctrs =

    11111

    1111

    sumd =

    00000

    0000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.

  • 7/30/2019 Kmeans Analysis@Cosine

    79/99

    > In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    23456789101

    ctrs =

    1111111111

    sumd =

    0000000000

    result =

    0

    ................................................................................

    ................................................................................

    ......Heavy(PCA)

    ------------

  • 7/30/2019 Kmeans Analysis@Cosine

    80/99

    aa=[0.8276460062.1148113791.8912927352.7293513452.9695841163.6692762054.3863910524.0611076734.4468176854.973500661];[r c]=size(aa);for i=1:10

    opts = statset('Display','final');s=0;[cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform'

    ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts)for j=1:i

    s=s+sumd(j,1);endresult=s/r

    end

    ----------------------------------------------------------------------------------------------------------------------------------------------------------------

    ----

    Results:

    2 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 0

    cidx =

    1

    111111111

    ctrs =

    1

    sumd =

    0

    result =

  • 7/30/2019 Kmeans Analysis@Cosine

    81/99

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2111111111

    ctrs =

    11

    sumd =

    00

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

  • 7/30/2019 Kmeans Analysis@Cosine

    82/99

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    23111111

    11

    ctrs =

    111

    sumd =

    000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444

  • 7/30/2019 Kmeans Analysis@Cosine

    83/99

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2341111111

    ctrs =

    1

    111

    sumd =

    0000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.

    > In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

  • 7/30/2019 Kmeans Analysis@Cosine

    84/99

    2 iterations, total sum of distances = 0

    cidx =

    2345111111

    ctrs =

    11111

    sumd =

    00000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

  • 7/30/2019 Kmeans Analysis@Cosine

    85/99

    2345611111

    ctrs =

    111111

    sumd =

    000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.

    > In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

  • 7/30/2019 Kmeans Analysis@Cosine

    86/99

    2345671111

    ctrs =

    1111111

    sumd =

    0000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

  • 7/30/2019 Kmeans Analysis@Cosine

    87/99

    2345678111

    ctrs =

    11111111

    sumd =

    00000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.

    > In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

  • 7/30/2019 Kmeans Analysis@Cosine

    88/99

    2 iterations, total sum of distances = 0

    cidx =

    2345678911

    ctrs =

    111111

    111

    sumd =

    000000

    000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444

  • 7/30/2019 Kmeans Analysis@Cosine

    89/99

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    23456789101

    ctrs =

    1

    111111111

    sumd =

    0000000000

    result =

    0

    >> aa=[2.16459426.64985262.454645454.904998442.92465474.108113455.52753043

  • 7/30/2019 Kmeans Analysis@Cosine

    90/99

    3.291353863.697557744.10617723];[r c]=size(aa);for i=1:10

    opts = statset('Display','final');s=0;[cidx, ctrs, sumd] = kmeans(aa, i, 'Distance','cosine','Start','uniform'

    ,'Replicates',5, 'EmptyAction', 'singleton','Options',opts)for j=1:i

    s=s+sumd(j,1);endresult=s/r

    end2 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 02 iterations, total sum of distances = 0

    cidx =

    11

    11111111

    ctrs =

    1

    sumd =

    0

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

  • 7/30/2019 Kmeans Analysis@Cosine

    91/99

    Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2111111111

    ctrs =

    11

    sumd =

    00

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

  • 7/30/2019 Kmeans Analysis@Cosine

    92/99

    cidx =

    2311111111

    ctrs =

    111

    sumd =

    0

    00

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.

    > In kmeans>batchUpdate at 444In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444

    In kmeans at 3362 iterations, total sum of distances = 0

    cidx =

    23411

  • 7/30/2019 Kmeans Analysis@Cosine

    93/99

    11111

    ctrs =

    1111

    sumd =

    0000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2345111111

  • 7/30/2019 Kmeans Analysis@Cosine

    94/99

    ctrs =

    11111

    sumd =

    00000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.

    > In kmeans>batchUpdate at 444In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    234

    5611111

    ctrs =

  • 7/30/2019 Kmeans Analysis@Cosine

    95/99

    111111

    sumd =

    000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.

    > In kmeans>batchUpdate at 444In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 2.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 3.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 4.> In kmeans>batchUpdate at 444

    In kmeans at 3362 iterations, total sum of distances = 0Warning: Empty cluster created at iteration 1 during replicate 5.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0

    cidx =

    2345

    671111

    ctrs =

  • 7/30/2019 Kmeans Analysis@Cosine

    96/99

    1111111

    sumd =

    0000000

    result =

    0

    Warning: Empty cluster created at iteration 1 during replicate 1.> In kmeans>batchUpdate at 444In kmeans at 336

    2 iterations, total sum of distances = 0Warning: Empty c