Answers.Body: <p>If you're trying to predict the string pattern, given the numerical feature and assuming your string pattern is fixed sized, you can one-hot encode each letter then combine them (into an array that is no longer one-hot).
  So <code>AABBC</code> would look like:</p>
  <pre><code>[1,0,0,1,0,0,0,1,0,0,1,0,0,0,1] &lt;- Use this for training
  [A,B,C,A,B,C,A,B,C,A,B,C,A,B,C]
  [A,_,_,A,_,_,_,B,_,_,B,_,_,_,C]
  AABBC
  </code></pre>
  <p>where each group of triplets represent a single integer.
  Then you can train a network with cross-entropy.
  This is the problem formulation of multi-task learning where you predict multiple things simultaneously.
  Needless to say, it is classification.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-13T07:43:30.177Z
Answers.Text: Is it a Multi-label Classification problem? Or, is it a multinomial logistic regression problem?
Answers.UserDisplayName: user366312
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-13T10:55:20.553Z
Answers.Text: It is not multinomial logistic regression or multi-label classification, which are the same in their essence, where there are more than 2 classes to predict. It can be said to be multi-multinomial logistic regression. Its proper name is multi-task learning.
Answers.UserDisplayName: meliksahturker
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-15T12:35:59.697Z
Answers.Text: Is multi-task learning synonymous to multi-output learning?
Answers.UserDisplayName: user366312
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-17T02:14:42.607Z
Answers.Text: @user366312 I can't find a definition for multi-output learning anywhere, but maybe you mean multi-instance learning? In which case, no, they are not equivalent. I think what may be confusing you is one small detail - you should split each character classifier into it's own cost function. So on the final layer, you'll have 5 classifiers, each for characters 1,2,3,4 and 5 in the sequence. Then you can encode each classifier 1 hot and use a simple softmax cross-entropy set up.
Answers.UserDisplayName: Recessive
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-17T12:50:48.860Z
Answers.Text: @Recessive, [Scikit-learn 84:Supervised Learning 62: Multiclass & Multioutput](https://youtu.be/-wqM_ODs-8s?list=PLXovS_5EZGh4_ThQVgO2boGf31Dqs5vzm)
Answers.UserDisplayName: user366312
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-13T05:04:59.017Z
Answers.LastActivityDate: 2021-07-14T00:30:45.690Z
Answers.LastEditDate: 2021-07-14T00:30:45.690Z
Answers.UserDisplayName: meliksahturker
Body: <p>Suppose, I have the following data-set:</p>
  <pre><code>... ...
  ... ...
  AABBB  7.027  5.338  5.335  8.122  5.537  6.408
  ABBBA  5.338  5.335  5.659  5.537  5.241  7.043
  BBBAA  5.335  5.659  6.954  5.241  8.470  8.474
  BBAAA  5.659  6.954  5.954  8.470  9.266  9.334
  BAACA  6.954  5.954  6.117  9.266  9.243 12.200
  AABAA  5.954  6.117  6.180  9.243  8.688 11.842
  ACAAA  6.117  6.180  5.393  8.688  5.073  7.722
  ABAAC  6.180  5.393  6.795  5.073  8.719  7.854
  BAACC  5.393  6.795  5.796  8.719  9.196  9.705
  ... ...
  ... ...
  </code></pre>
  <p>Apparently, the feature values represent a string pattern comprising of only three letters <code>A</code>, <code>B</code>, and <code>C</code>.</p>
  <p>I have to design a neural network that would be able to detect these patterns and spit out a binary representation of these strings where the letters should be encoded in <a href="https://en.wikipedia.org/wiki/One-hot" rel="nofollow noreferrer">3-bit binary</a>(one-hot encoding).</p>
  <p>My first question is, What kind of problem is it and why?</p>
  <p>My next question is, How should I approach this problem to solve it?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-13T07:33:54.347Z
Comments.Text: Is the length of the strings consistent? If they aren't use an RNN. Otherwise, use crinix's answer
Comments.UserDisplayName: Recessive
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-13T07:42:33.177Z
Comments.Text: @Recessive, Is it a Multi-label Classification problem? Or, is it a multinomial logistic regression problem?
Comments.UserDisplayName: user366312
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-13T07:42:45.003Z
Comments.Text: @Recessive, the length of the string is fixed to 5.
Comments.UserDisplayName: user366312
Tags: <classification>
Title: How can I approach this problem of producing a 3-bit binary string given a sequence of letters?
UserDisplayName: user366312
ThreadText: # How can I approach this problem of producing a 3-bit binary string given a sequence of letters?
  
  (Asked by: username_0 on 2021-07-13)
  
  Suppose, I have the following data-set:
  
  ```
  ... ...
  ... ...
  AABBB  7.027  5.338  5.335  8.122  5.537  6.408
  ABBBA  5.338  5.335  5.659  5.537  5.241  7.043
  BBBAA  5.335  5.659  6.954  5.241  8.470  8.474
  BBAAA  5.659  6.954  5.954  8.470  9.266  9.334
  BAACA  6.954  5.954  6.117  9.266  9.243 12.200
  AABAA  5.954  6.117  6.180  9.243  8.688 11.842
  ACAAA  6.117  6.180  5.393  8.688  5.073  7.722
  ABAAC  6.180  5.393  6.795  5.073  8.719  7.854
  BAACC  5.393  6.795  5.796  8.719  9.196  9.705
  ... ...
  ... ...
  
  ```
  
  Apparently, the feature values represent a string pattern comprising of only three letters `A`, `B`, and `C`.
  
  I have to design a neural network that would be able to detect these patterns and spit out a binary representation of these strings where the letters should be encoded in [3-bit binary](https://en.wikipedia.org/wiki/One-hot)(one-hot encoding).
  
  My first question is, What kind of problem is it and why?
  
  My next question is, How should I approach this problem to solve it?
  
  **Tags:** classification
  
  > **Comments:**
  > **username_1**: Is the length of the strings consistent? If they aren't use an RNN. Otherwise, use crinix's answer  
  > **username_0**: @username_1, Is it a Multi-label Classification problem? Or, is it a multinomial logistic regression problem?  
  > **username_0**: @username_1, the length of the string is fixed to 5.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-07-13. Score: 2
  
  If you're trying to predict the string pattern, given the numerical feature and assuming your string pattern is fixed sized, you can one-hot encode each letter then combine them (into an array that is no longer one-hot).
  So `AABBC` would look like:
  
  ```
  [1,0,0,1,0,0,0,1,0,0,1,0,0,0,1] <- Use this for training
  [A,B,C,A,B,C,A,B,C,A,B,C,A,B,C]
  [A,_,_,A,_,_,_,B,_,_,B,_,_,_,C]
  AABBC
  
  ```
  
  where each group of triplets represent a single integer.
  Then you can train a network with cross-entropy.
  This is the problem formulation of multi-task learning where you predict multiple things simultaneously.
  Needless to say, it is classification.
  
  > **Comments:**
  > **username_0**: Is it a Multi-label Classification problem? Or, is it a multinomial logistic regression problem?  
  > **username_2**: It is not multinomial logistic regression or multi-label classification, which are the same in their essence, where there are more than 2 classes to predict. It can be said to be multi-multinomial logistic regression. Its proper name is multi-task learning.  
  > **username_0**: Is multi-task learning synonymous to multi-output learning?  
  > **username_1**: @username_0 I can't find a definition for multi-output learning anywhere, but maybe you mean multi-instance learning? In which case, no, they are not equivalent. I think what may be confusing you is one small detail - you should split each character classifier into it's own cost function. So on the final layer, you'll have 5 classifiers, each for characters 1,2,3,4 and 5 in the sequence. Then you can encode each classifier 1 hot and use a simple softmax cross-entropy set up.  
  > **username_0**: @username_1, [Scikit-learn 84:Supervised Learning 62: Multiclass & Multioutput](https://youtu.be/-wqM_ODs-8s?list=PLXovS_5EZGh4_ThQVgO2boGf31Dqs5vzm)  
  
  ---
  
  