Attention: by default, the name of the pickle file is same as the original ".txt" file. But it's highly likely that you will use the same text inputs to predict different things. So it's important to give your pickle file a more reasonable name each time you run the above script. For example, from "longdescriptions.pkl" to "longdescriptions_indu.pkl" to indicate that we are predicting the industry areas and to "longdescriptions_ipo.pkl" to indicate that we are predicting the IPO status. If you don't do this, the later generated pickle files will overwrite the previously generated ones.
'''Model Training/Prediction (classification_MMM_LLL.py)''' : this is where the deep neural network is. The "MMM" represents the model. For example, currently I have "1DConvolution", "2DConvolution" and "LSTM". "LLL" represents the name of the label. Notice that for the same text inputs we can predict for different things using the same model literally. For example, "classification_LSTM_indu.py" is a LSTM model to predict the industray based on the descriptions. And "classification_LSTM_ipo.py" is a LSTM model to predict the IPO status based on the same descriptions. You Again you need to name your files properly! Different tasks will have different hyper-parameter configurations though the model and the inputs can be totally the same. This Python file, no matter what the model is, will always load in a pickle file you generated in the previous step and train the neural network. At the end, the well trained neural network will predict on your testing test examples (the examples you don't see during the training) and print the accuracy. To run this part:
* Step 1 : modify the name of the pickle file with open('longdescription_ipo.pkl', 'rb') as file: * Step 2 : modify the total number of possible labels model.add(Dense(2, activation='softmax')) * Step 3 : run the code python classification_LSTMclassification_LSTM_ipo.py
==Data Preprocessing==