Answers.Body: <p><em><strong>&quot;is it okay to use another machine learning technology such as K-Means clustering to label the data?&quot;</strong></em></p>
  <p>In computer vision there's an entire branch called <a href="https://www.sciencedirect.com/science/article/abs/pii/S0031320311002391" rel="nofollow noreferrer">automatic image annotation</a> dedicated to this topic. And after a 2 sec search online I found a <a href="https://medium.com/@b.terryjack/unsupervised-learning-to-aid-labelling-for-supervised-learning-253fe2d8e06b" rel="nofollow noreferrer">tutorial</a> that suggest precisely what you want to try. So yes, on the paper it's ok to try, the real question though should be:</p>
  <p><em><strong>Will it work?</strong></em></p>
  <p>And the unfortunate answer is: no. Or to be less harsh: only with toy datasets, not real ones.</p>
  <p>Moreover take a step back and think about the possible outcomes of the approach and their implications. If you train a k-mean clustering on your data you have 2 possible scenarios:</p>
  <ul>
  <li>it works, then you you have an unsupervised model that does the job, why bothering training a supervise model that at best will perform as good as the one you already have?</li>
  <li>it doesn't work, you made your life harder and you're at the same point where you started.</li>
  </ul>
  <p><em><strong>what else can I do to label the data?</strong></em></p>
  <p>Even though it's not the answer you want to hear:</p>
  <p>Labeling is like removing a plaster from a wounded cut, you spend hours thinking how to do it without suffering to just realize at the end that the best way is to just do it.</p>
  <p>Answers to the most predictable counter argument, <strong>the data are too many</strong>:</p>
  <ul>
  <li>Rely on online crowdsourcing platforms: it seems that you already have rules to use as an annotation guideline. But it costs money.</li>
  <li>Label just a part of the data, train, and repeat till you get a good model. You can also leverage <a href="https://jacobgil.github.io/deeplearning/activelearning" rel="nofollow noreferrer">active learning</a> to optimize and make the labeling process smarter.</li>
  <li>Dig the web till you find an annotated dataset.</li>
  <li>Move to unsupervised learning, but for the training itself. At the very least you'll rely on theories and model designed precisely for unlabelled data without having to train several models with a cascade of performance drops.</li>
  </ul>
  <p>As a final note, there are several reasons to just start labeling the data yourself, the main one being that you'll have control over the quality of the annotations. Many people underestimate or don't even know about the importance of inter annotators agreement metrics like <a href="https://en.wikipedia.org/wiki/Cohen%27s_kappa" rel="nofollow noreferrer">Cohen's Kappa</a> that estimate not only the quality of a dataset but also how hard for a human the task you want to automatize is. Which is extremely relevant, cause if for humans the best agreement score is 80% instead of 100% then there's no way you'll obtain more than that from a model, due to the personal biases introduced by the annotators in the data. And by knowing that, you'll be happy about your 0.8 f-score without wasting hours thinking what you did wrong and why the model is not performing better.
  Hope this will be be somehow helpful and good luck with your data!</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-11-04T17:45:47.227Z
Answers.LastActivityDate: 2021-11-04T17:45:47.227Z
Answers.UserDisplayName: Edoardo Guerriero
Body: <p>I have unlabeled credit card transaction data that has the following columns:</p>
  <pre><code>Transaction_ID     Frequency       Amount    Fees
     192831             21            829       23
     382912             14            920       24
     483921            839           24059      87
  </code></pre>
  <p>Eventually, I'd like to build a deep learning model(e.g. LSTM) that can tell me whether a transaction(row) has a &quot;high&quot;, &quot;moderate&quot;, or &quot;low&quot; risk. However, since the data is unlabeled, I believe I need to label the data first before I feed the data into the deep learning model.</p>
  <p>For example, transactions that have small frequency and amount values like the first two rows need to be labeled as &quot;low (0)&quot; while transactions that have large frequency and amount like the last row should be labeled as &quot;high (2)&quot;. If both frequency and amount have moderate values, the row will be labeled as &quot;moderate(1)&quot;.</p>
  <p>I wonder if it is okay to use other machine learning techniques such as K-Means clustering to label the data before I feed the data into the deep learning model. Is it okay to use one Machine Learning algorithm (K-means) to label the data and feed the same labeled data into another Deep Learning model (LSTM)? Or is it a bad practice? For example, if the first model (K-means) is biased, will that bias(error) be carried over from the first model to the second model (LSTM)?</p>
  <p>If it is a bad practice to use two different ML technologies, what else can I do to label the data?</p>
  
Tags: <deep-learning><data-labelling><multiclass-classification>
Title: How to label unsupervised data for deep learning multi-classification
UserDisplayName: Sarah Grimes
ThreadText: # How to label unsupervised data for deep learning multi-classification
  
  (Asked by: username_0 on 2021-11-04)
  
  I have unlabeled credit card transaction data that has the following columns:
  
  ```
  Transaction_ID     Frequency       Amount    Fees
     192831             21            829       23
     382912             14            920       24
     483921            839           24059      87
  
  ```
  
  Eventually, I'd like to build a deep learning model(e.g. LSTM) that can tell me whether a transaction(row) has a "high", "moderate", or "low" risk. However, since the data is unlabeled, I believe I need to label the data first before I feed the data into the deep learning model.
  
  For example, transactions that have small frequency and amount values like the first two rows need to be labeled as "low (0)" while transactions that have large frequency and amount like the last row should be labeled as "high (2)". If both frequency and amount have moderate values, the row will be labeled as "moderate(1)".
  
  I wonder if it is okay to use other machine learning techniques such as K-Means clustering to label the data before I feed the data into the deep learning model. Is it okay to use one Machine Learning algorithm (K-means) to label the data and feed the same labeled data into another Deep Learning model (LSTM)? Or is it a bad practice? For example, if the first model (K-means) is biased, will that bias(error) be carried over from the first model to the second model (LSTM)?
  
  If it is a bad practice to use two different ML technologies, what else can I do to label the data?
  
  **Tags:** deep-learning, data-labelling, multiclass-classification
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2021-11-04. Score: 1
  
  ***"is it okay to use another machine learning technology such as K-Means clustering to label the data?"***
  
  In computer vision there's an entire branch called [automatic image annotation](https://www.sciencedirect.com/science/article/abs/pii/S0031320311002391) dedicated to this topic. And after a 2 sec search online I found a [tutorial](https://medium.com/@b.terryjack/unsupervised-learning-to-aid-labelling-for-supervised-learning-253fe2d8e06b) that suggest precisely what you want to try. So yes, on the paper it's ok to try, the real question though should be:
  
  ***Will it work?***
  
  And the unfortunate answer is: no. Or to be less harsh: only with toy datasets, not real ones.
  
  Moreover take a step back and think about the possible outcomes of the approach and their implications. If you train a k-mean clustering on your data you have 2 possible scenarios:
  
  * it works, then you you have an unsupervised model that does the job, why bothering training a supervise model that at best will perform as good as the one you already have?
  * it doesn't work, you made your life harder and you're at the same point where you started.
  
  ***what else can I do to label the data?***
  
  Even though it's not the answer you want to hear:
  
  Labeling is like removing a plaster from a wounded cut, you spend hours thinking how to do it without suffering to just realize at the end that the best way is to just do it.
  
  Answers to the most predictable counter argument, **the data are too many**:
  
  * Rely on online crowdsourcing platforms: it seems that you already have rules to use as an annotation guideline. But it costs money.
  * Label just a part of the data, train, and repeat till you get a good model. You can also leverage [active learning](https://jacobgil.github.io/deeplearning/activelearning) to optimize and make the labeling process smarter.
  * Dig the web till you find an annotated dataset.
  * Move to unsupervised learning, but for the training itself. At the very least you'll rely on theories and model designed precisely for unlabelled data without having to train several models with a cascade of performance drops.
  
  As a final note, there are several reasons to just start labeling the data yourself, the main one being that you'll have control over the quality of the annotations. Many people underestimate or don't even know about the importance of inter annotators agreement metrics like [Cohen's Kappa](https://en.wikipedia.org/wiki/Cohen%27s_kappa) that estimate not only the quality of a dataset but also how hard for a human the task you want to automatize is. Which is extremely relevant, cause if for humans the best agreement score is 80% instead of 100% then there's no way you'll obtain more than that from a model, due to the personal biases introduced by the annotators in the data. And by knowing that, you'll be happy about your 0.8 f-score without wasting hours thinking what you did wrong and why the model is not performing better.
  Hope this will be be somehow helpful and good luck with your data!
  
  
  ---
  
  