jiesutd / NCRFpp

NCRF++, a Neural Sequence Labeling Toolkit. Easy use to any sequence labeling tasks (e.g. NER, POS, Segmentation). It includes character LSTM/CNN, word LSTM/CNN and softmax/CRF components.
Apache License 2.0
1.89k stars 446 forks source link

cutomization #159

Closed myeghaneh closed 3 years ago

myeghaneh commented 3 years ago

I have used your repo , it works well, I have kind of this result

Epoch: 199/200
Shuffle: first input word list: [139, 1728, 22, 61, 1190, 12, 6, 46, 49, 17, 3, 35, 20, 1875, 120, 86, 20, 880, 15, 20, 3, 2273, 400, 33, 1050, 6, 88, 121, 30, 151, 2274, 24, 25, 61, 1190, 29, 64, 171, 1741, 400, 1690, 20, 836, 121, 224, 61, 121, 415, 3, 35, 30, 29, 35, 988, 64, 171, 665, 38, 178, 481, 20, 995, 24]
     Instance: 500; Time: 22.22s; loss: 1533.9004; acc: 31761/34041=0.9330
     Instance: 1000; Time: 21.79s; loss: 1259.3610; acc: 63330/67303=0.9410
     Instance: 1200; Time: 8.83s; loss: 423.5699; acc: 75675/80343=0.9419
Epoch: 199 training finished. Time: 52.84s, speed: 22.71st/s,  total loss: 3216.831298828125
totalloss: 3216.831298828125
Right token =  13316  All token =  20436  acc =  0.651595224114308
Dev: time: 2.52s, speed: 119.90st/s; acc: 0.6516, p: 0.4104, r: 0.4134, f: 0.4119
Right token =  3446  All token =  5209  acc =  0.6615473219427913
Test: time: 0.65s, speed: 134.01st/s; acc: 0.6615, p: 0.4623, r: 0.4792, f: 0.4706

firstly how can I have the best result? e.g based on r: 0.4792 or... in training secondly how can I do hyperparameter optimization, confusion matrix and...

do you have a notebook using your repo?

is there any way to go inside your model and customize that?

many thnaks

jiesutd commented 3 years ago

You can customize and tune the hyperparameters through the config file. Here is the details: https://github.com/jiesutd/NCRFpp/blob/master/readme/Configuration.md