I installed Chainer, a PFI Deep Learning library.
Basically as per QUICK START at http://chainer.org/
pip install chainer
Installation is complete. Super easy.
The environment I installed is Mac OS X Mavericks 10.9.5
https://github.com/pfnet/chainer/tree/master/examples/sentiment
When you execute download.sh, the data for analysis will be downloaded. Contains learning data, test data, and development data. This format.
(3 (2 (2 The) (2 Rock)) (4 (3 (2 is) (4 (2 destined) (2 (2 (2 (2 (2 to) (2 (2 be) (2 (2 the) (2 (2 21st) (2 (2 (2 Century) (2 's)) (2 (3 new) (2 (2 ``) (2 Conan)))))))) (2 '')) (2 and)) (3 (2 that) (3 (2 he) (3 (2 's) (3 (2 going) (3 (2 to) (4 (3 (2 make) (3 (3 (2 a) (3 splash)) (2 (2 even) (3 greater)))) (2 (2 than) (2 (2 (2 (2 (1 (2 Arnold) (2 Schwarzenegger)) (2 ,)) (2 (2 Jean-Claud) (2 (2 Van) (2 Damme)))) (2 or)) (2 (2 Steven) (2 Segal))))))))))))) (2 .)))
python train_sentiment.py
Start learning at.
The learning result looks like this (halfway result)
Epoch: 0 loss: 272091.89 15.52 iters/sec, 550.39 sec
Epoch: 1 loss: 231616.00 16.56 iters/sec, 516.08 sec
Epoch: 2 loss: 214706.52 19.19 iters/sec, 445.15 sec
Epoch: 3 loss: 203173.80 14.26 iters/sec, 599.03 sec
Epoch: 4 loss: 193821.91 19.16 iters/sec, 445.83 sec
Train data evaluation: Node accuracy: 77.93 %% (248,265/318,582) Root accuracy: 39.56 %% (3,380/8,544) Develop data evaluation: Node accuracy: 74.72 %% (30,968/41,447) Root accuracy: 34.15 %% (376/1,101)
It seems to work for the time being, so let's try it with your own data.
Recommended Posts