Answers.Body: <p>Since you want your prediction to be a percentage, i.e. between 0 and 1, it makes sense to have a sigmoid on the single output node. Even if some of your inputs are categorical, your problem sounds like a logistic regression problem. A softmax function only makes sense if you have more than 2 outputs to predict, which is not the case here.</p>
  <p>It's not clear what you mean by &quot;assigning values to each different group within that parameter&quot;. If you have a dataset like:</p>
  <pre><code>- Age: 23
  - NativeLanguage: English
  - EducationLevel: Bachelor
  =&gt; ExamSuccessRate: 0.9
  - Age: 50
  - NativeLanguage: French
  - EducationLevel: None
  =&gt; ExamSuccessRate: 0.3
  </code></pre>
  <p>Then it makes sense to transform categorical variables like <code>NativeLanguage</code> to boolean variables via one-hot encoding, i.e. <code>NativeEnglish</code>: 0 or 1, <code>NativeFrench</code>: 0 or 1.</p>
  <p>For variables like <code>EducationLevel</code> it probably makes sense to transform them to integer variables, since there is a progression between various levels of education:</p>
  <pre><code>EducationLevel: None -&gt; 0
  EducationLevel: MiddleSchool -&gt; 1
  EducationLevel: HighSchool -&gt; 2
  EducationLevel: Bachelor -&gt; 3
  EducationLevel: Master -&gt; 4
  EducationLevel: Doctorate -&gt; 5
  </code></pre>
  <p>Final note: try a logistic regression as a baseline before using a neural network.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-21T16:45:35.070Z
Answers.Text: Thanks for the suggestion. I did mean something similar to one-hot encoding by that statement so you are right on your assessment. We will try Regression for now then, thanks!!
Answers.UserDisplayName: J. Bringas
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-02-21T09:13:46.910Z
Answers.LastActivityDate: 2024-02-21T09:13:46.910Z
Answers.UserDisplayName: c p
Body: <p>I am working on a project that uses a categorical and non categorical dataset to predict a Success/Fail rate. Each entry/data point has multiple categorical and numerical parameters tied to a rate.</p>
  <p>We tried using a single output node to get an estimation on this rate, but even if we were to force values between 0-1 using sigmoid or softmax, looks like there are some gaps to this.</p>
  <p>We are not trying to regression since many parameters in our dataset are categorical(not sure if one-hot encoder works here, or assigning values to each different group within that parameter), and softmax seems out of place since there are not classes here so to speak.</p>
  <p>Any suggestion is appreciated. Thanks.</p>
  
Tags: <neural-networks><categorical-data><one-hot-encoding>
Title: Using a neural network to predict a single discrete number
UserDisplayName: J. Bringas
ThreadText: # Using a neural network to predict a single discrete number
  
  (Asked by: username_0 on 2024-02-19)
  
  I am working on a project that uses a categorical and non categorical dataset to predict a Success/Fail rate. Each entry/data point has multiple categorical and numerical parameters tied to a rate.
  
  We tried using a single output node to get an estimation on this rate, but even if we were to force values between 0-1 using sigmoid or softmax, looks like there are some gaps to this.
  
  We are not trying to regression since many parameters in our dataset are categorical(not sure if one-hot encoder works here, or assigning values to each different group within that parameter), and softmax seems out of place since there are not classes here so to speak.
  
  Any suggestion is appreciated. Thanks.
  
  **Tags:** neural-networks, categorical-data, one-hot-encoding
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-02-21. Score: 0
  
  Since you want your prediction to be a percentage, i.e. between 0 and 1, it makes sense to have a sigmoid on the single output node. Even if some of your inputs are categorical, your problem sounds like a logistic regression problem. A softmax function only makes sense if you have more than 2 outputs to predict, which is not the case here.
  
  It's not clear what you mean by "assigning values to each different group within that parameter". If you have a dataset like:
  
  ```
  - Age: 23
  - NativeLanguage: English
  - EducationLevel: Bachelor
  => ExamSuccessRate: 0.9
  - Age: 50
  - NativeLanguage: French
  - EducationLevel: None
  => ExamSuccessRate: 0.3
  
  ```
  
  Then it makes sense to transform categorical variables like `NativeLanguage` to boolean variables via one-hot encoding, i.e. `NativeEnglish`: 0 or 1, `NativeFrench`: 0 or 1.
  
  For variables like `EducationLevel` it probably makes sense to transform them to integer variables, since there is a progression between various levels of education:
  
  ```
  EducationLevel: None -> 0
  EducationLevel: MiddleSchool -> 1
  EducationLevel: HighSchool -> 2
  EducationLevel: Bachelor -> 3
  EducationLevel: Master -> 4
  EducationLevel: Doctorate -> 5
  
  ```
  
  Final note: try a logistic regression as a baseline before using a neural network.
  
  > **Comments:**
  > **username_0**: Thanks for the suggestion. I did mean something similar to one-hot encoding by that statement so you are right on your assessment. We will try Regression for now then, thanks!!  
  
  ---
  
  