Coder Social home page Coder Social logo

kvalid's Issues

output of k-means and SSE does not match final number of clusters chosen

I am testing the KValid with the following dataset: https://www.kaggle.com/datasets/crawford/gene-expression

My settings:
image
the output:

KValid
======

=== Clustering validation, using: Elbow method (SSE) ===

For k = 3
SSE: 307911.9827729013

For k = 4
SSE: 284224.5253161817

For k = 5
SSE: 265002.0829083235

For k = 6
SSE: 271168.4306434722

For k = 7
SSE: 255451.7226422783

For k = 8
SSE: 248347.4649960015

For k = 9
SSE: 245387.35604437318

For k = 10
SSE: 240754.6914872431

so based on the k should be 5:
but what I see at the end, is 3 clsuters

=== Model and evaluation on training set ===

Clustered Instances

0      520 ( 65%)
1      145 ( 18%)
2      136 ( 17%)


Class attribute: Class
Classes to Clusters:

   0   1   2  <-- assigned to cluster
   0   0 136 | PRAD
 141   0   0 | LUAD
 300   0   0 | BRCA
   1 145   0 | KIRC
  78   0   0 | COAD

Cluster 0 <-- BRCA
Cluster 1 <-- KIRC
Cluster 2 <-- PRAD

Incorrectly clustered instances :	220.0	 27.4657 %

Elbow plot also shows optimal number of clusters to be 5.

Also,

When I set cascade=false: no graph shows up! but optimal number of clusters is determined approprietly:

=== Model and evaluation on training set ===

Clustered Instances

0      187 ( 23%)
1      145 ( 18%)
2      136 ( 17%)
3       74 (  9%)
4      259 ( 32%)


Class attribute: Class
Classes to Clusters:

   0   1   2   3   4  <-- assigned to cluster
   0   0 136   0   0 | PRAD
 141   0   0   0   0 | LUAD
  41   0   0   0 259 | BRCA
   1 145   0   0   0 | KIRC
   4   0   0  74   0 | COAD

Cluster 0 <-- LUAD
Cluster 1 <-- KIRC
Cluster 2 <-- PRAD
Cluster 3 <-- COAD
Cluster 4 <-- BRCA

Incorrectly clustered instances :	46.0	  5.7428 %

How to see teh Elbow Plot?

sorry can't firgure out how to get the elbow plot you are showing after I run the cluster?
here is a setting I chose:
image

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.