Answers.Body: <p>In case there is no systematic difference between the samples with or without the clinical data (i.e. one set is microarray and the other is RNA-seq), I would use all of the samples. And if the cluster labels obtained with &quot;clustering 50 samples&quot; and those obtained with &quot;clustering 100 samples&quot; does not differ too much, then doing either of two would not have much effect anyway. If you would like to compare cluster labels in that way and assuming you would want to test a number of <code>k</code>s, it would be better to compare each combination of <code>k</code>s and number of samples.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-01T16:54:42.793Z
Answers.Text: Hi @Haci The thing that bothers me is it isn't clear with K-means is within supervised or unsupervised learning. In my experience it can be used for either. These are quite different calculations. At a guess it is unsupervised because in supervised learning all the samples would be used without any question.
Answers.UserDisplayName: M__
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-01T14:57:52.570Z
Answers.LastActivityDate: 2020-12-01T14:57:52.570Z
Answers.UserDisplayName: haci
Body: <p>I have expression data for 100 samples and clinical data for 50 among them. I want to carryout k-means clustering using expression data and then do a survival analysis (Kaplan-Meier analysis) using the labels obtained from k-means.</p>
  <p>Can I used the expression data of all 100 samples to carryout clustering or should I use only 50 samples for clustering?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-12-01T14:25:48.003Z
Comments.Text: Hi @user98059 I understand your question perfectly at a analytical level, but I think it would be preferable to edit it and provide a biological explanation regarding survival analysis.I'm not sure it will attract many responses. ... anyway. In summary, I would go for 100. It also depends on whether K-means is inside or outside ML methods.
Comments.UserDisplayName: M__
Tags: <clustering>
Title: Picking number of samples for clustering
ThreadText: # Picking number of samples for clustering
  
  (Asked by: username_0 on 2020-12-01)
  
  I have expression data for 100 samples and clinical data for 50 among them. I want to carryout k-means clustering using expression data and then do a survival analysis (Kaplan-Meier analysis) using the labels obtained from k-means.
  
  Can I used the expression data of all 100 samples to carryout clustering or should I use only 50 samples for clustering?
  
  **Tags:** clustering
  
  > **Comments:**
  > **username_1**: Hi @username_0 I understand your question perfectly at a analytical level, but I think it would be preferable to edit it and provide a biological explanation regarding survival analysis.I'm not sure it will attract many responses. ... anyway. In summary, I would go for 100. It also depends on whether K-means is inside or outside ML methods.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2020-12-01. Score: 1 | Accepted answer
  
  In case there is no systematic difference between the samples with or without the clinical data (i.e. one set is microarray and the other is RNA-seq), I would use all of the samples. And if the cluster labels obtained with "clustering 50 samples" and those obtained with "clustering 100 samples" does not differ too much, then doing either of two would not have much effect anyway. If you would like to compare cluster labels in that way and assuming you would want to test a number of `k`s, it would be better to compare each combination of `k`s and number of samples.
  
  > **Comments:**
  > **username_1**: Hi @username_2 The thing that bothers me is it isn't clear with K-means is within supervised or unsupervised learning. In my experience it can be used for either. These are quite different calculations. At a guess it is unsupervised because in supervised learning all the samples would be used without any question.  
  
  ---
  
  