Pseudocode regarding personality detection in input text by exploiting BILSTM. |
Input: Personality dataset “E”, Train Set “TRS”, Test Set “TES” |
Output: Personality label regarding input text: Psychopath vs Nonpsychopath |
Start |
Section 1: Numeric representation of input text |
1. while each input text T E |
2. while word w E |
3. Allocate index to related word |
4. End while |
5. End while |
Hyperparameter Initialization |
6. train set size=90%, test set size=10%, max-features=2000, embed_dim=128, batch_size=32, epochs=7 |
Section 2: Developing Deep Neural Network Model |
7. while each input text T ETRS |
8. Create embedding vector of entire words in T = [t1, t2, t3, t4, … , tm] //Convert text to machine readable feature(word) vector |
9. Apply dropout layer for overfitting reduction |
10. Apply operation of BILSTM using Eq. ((1)-(12), (13) |
11. End while |
Section 3: Evaluating the Model |
12. while each input text T ETES |
13. Developed a Train Model |
Apply softmax operation (using Eq. (13) to classify the input text into Psychopath vs Nonpsychopath |
14. End while |
Terminate |