Download Analyzing and Visualizing Disaster Phases from
Transcript
Usage: MakeTestData [output file] [classlabel file] [original vectors] [original
dictionary] [training dictionary] [do normalization]
output file
Test dataset in SVM-Light format.
classlabel file
The file containing class labels for the test dataset. Usually
the test dataset does not need a label. But a classlabel file
with arbitrary labels for each of the vectors is still required
original vectors
Specifies the file containing data vectors of the test dataset.
original dictionary
Specifies the file containing the dictionary of the test
dataset.
training dictionary
Specifies the file containing the dictionary of the training
set.
do normalization
Re-normalize or not. 1=normalize, 0=don’t normalize. Check this
when normalization is applied during vectorization.
Figure 2-3: MakeTestData usage manual
If the parameters are not provided correctly, the program will show a prompt and try to read them from
stdin one by one.
Note that the output file cannot be directly used for test. Weka requires the class labels to be an enum. This
can be done by loading the SVM-Light format test set into Weka, saving as arff format, and changing the
class labels to an enum struct. For example
@attribute class {1,2,3,4}
Input format
Classlabel file
The format of the classlabel file is the same as middleware MakeTrainingData.
Original vectors
The file containing the original vectors shares the same format as middleware MakeTrainingData. It can be
extracted in the same way from the Weka arff file.
Dictionary files
The first row of the dictionary file is the number of tokens. Following it are the tokens in the dictionary, one
for each row.
10