Answers.Body: <p>I would maintain traditional unsupervised learning is a very good method here (PCA and/or tSNE). The number 1 question is which column is the observation (label)? That depends on the aim of the study. The absence of a &quot;target&quot; column is the thing that separate unsupervised learning from supervised learning.</p>
  <p>The &quot;observation&quot; (label), i.e. the column that provides the name, BUT doesn't take part in the calculation, will either be a gene or an isolate/species/taxonomic-group and the aim is to see which genes or isolates cluster together. The implication is that the MFE (MLE?) is the observation (label) ... can be I guess. Again its about the aim of the study.</p>
  <p>The trick with unsupervised learning is to get as many &quot;features&quot; (columns of data) for each &quot;observation&quot; (probably gene name or taxonomic group). MLE (MFE?) energy (entropy?) has a value, but there are other values (which I forget but other entropy values), those can be included. Dumbie variables are used for e.g. sequence data, but if there are counts will work and experimental data measurements can be included. There are a few rules:</p>
  <ol>
  <li>When you have a cateogorical variable as a column in a dataframe it must be designated as such, pandas will allow this. Similarly if you have continuous variable, MLE that must be designated as a float and counts will be designated as integers. You don't want a float to appear as a categorical variable, that will be disastrous. You need to set the data type of each column (see below).</li>
  <li>In PCA a reasonable number of components must comprise a large amount (sum) of the variance, e.g. &gt;70%.</li>
  <li>You can only see realistically two components at any one time on a graph, just plot them out, e.g. PC1 versus PC2, then PC1 vs PC3. Look at which give nice clusters. Don't just look at PC1 and PC2 and believe thats the only answer (which is what everyone does).</li>
  </ol>
  <p><strong>Point 1</strong> is important if the PCA or tSNE may not permit mixed data types (I can't remember), but if so it will complain.</p>
  <p><strong>Point 2</strong> If the sum of the first three principle components exceed 70% of the variance - thats very, very good. If its alot of then you might  consider performing tSNE on the PCs to tighten the result.</p>
  <p>Thats about it, what you are looking for is clusters that give some indication about the way the data is behaving. This can be the end point of the analysis or it can be the hypothesis for further testing.</p>
  <p>Very clear distinct cluster which make biological sense is a good result with unsupervised learning. Obviously the issue is that the clusters are not significant, but if they look good and make sense that's the key to the analysis.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-08-16T23:07:05.657Z
Answers.LastActivityDate: 2023-08-17T01:48:58.357Z
Answers.LastEditDate: 2023-08-17T01:48:58.357Z
Answers.UserDisplayName: M__
Body: <p>To put it super simply: I have RNA sequences, their optimal secondary structures, and the MFE values of those structures. I'm trying to computationally identity what structural elements and/or sequence motifs tend to be present in RNAs with lower MFEs.</p>
  <p>Was thinking about using unsupervised learning for this, but is this the wrong approach?</p>
  <p><a href="https://bioinformatics.stackexchange.com/questions/21419/applying-pca-or-tsne-on-non-numerical-data">Past version of this question</a></p>
  
Tags: <rna>
Title: What algorithm should I use to find what RNA sequence/structural elements lead to different labelled MFE values?
ThreadText: # What algorithm should I use to find what RNA sequence/structural elements lead to different labelled MFE values?
  
  (Asked by: username_0 on 2023-08-10)
  
  To put it super simply: I have RNA sequences, their optimal secondary structures, and the MFE values of those structures. I'm trying to computationally identity what structural elements and/or sequence motifs tend to be present in RNAs with lower MFEs.
  
  Was thinking about using unsupervised learning for this, but is this the wrong approach?
  
  [Past version of this question](https://bioinformatics.stackexchange.com/questions/21419/applying-pca-or-tsne-on-non-numerical-data)
  
  **Tags:** rna
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2023-08-16. Score: 0
  
  I would maintain traditional unsupervised learning is a very good method here (PCA and/or tSNE). The number 1 question is which column is the observation (label)? That depends on the aim of the study. The absence of a "target" column is the thing that separate unsupervised learning from supervised learning.
  
  The "observation" (label), i.e. the column that provides the name, BUT doesn't take part in the calculation, will either be a gene or an isolate/species/taxonomic-group and the aim is to see which genes or isolates cluster together. The implication is that the MFE (MLE?) is the observation (label) ... can be I guess. Again its about the aim of the study.
  
  The trick with unsupervised learning is to get as many "features" (columns of data) for each "observation" (probably gene name or taxonomic group). MLE (MFE?) energy (entropy?) has a value, but there are other values (which I forget but other entropy values), those can be included. Dumbie variables are used for e.g. sequence data, but if there are counts will work and experimental data measurements can be included. There are a few rules:
  
  1. When you have a cateogorical variable as a column in a dataframe it must be designated as such, pandas will allow this. Similarly if you have continuous variable, MLE that must be designated as a float and counts will be designated as integers. You don't want a float to appear as a categorical variable, that will be disastrous. You need to set the data type of each column (see below).
  2. In PCA a reasonable number of components must comprise a large amount (sum) of the variance, e.g. >70%.
  3. You can only see realistically two components at any one time on a graph, just plot them out, e.g. PC1 versus PC2, then PC1 vs PC3. Look at which give nice clusters. Don't just look at PC1 and PC2 and believe thats the only answer (which is what everyone does).
  
  **Point 1** is important if the PCA or tSNE may not permit mixed data types (I can't remember), but if so it will complain.
  
  **Point 2** If the sum of the first three principle components exceed 70% of the variance - thats very, very good. If its alot of then you might consider performing tSNE on the PCs to tighten the result.
  
  Thats about it, what you are looking for is clusters that give some indication about the way the data is behaving. This can be the end point of the analysis or it can be the hypothesis for further testing.
  
  Very clear distinct cluster which make biological sense is a good result with unsupervised learning. Obviously the issue is that the clusters are not significant, but if they look good and make sense that's the key to the analysis.
  
  
  ---
  
  