sport-text-classification/Makefile

35 lines
1.0 KiB
Makefile
Raw Normal View History

2020-04-21 12:54:48 +02:00
SHELL=/bin/bash
.SECONDARY:
# $< - piersza zaleznosc
# $@ - cel
predict: test-A/out.tsv dev-0/out.tsv
test-A/out.tsv: test-A/out.num.tsv num2label.py
./num2label.py < $< > $@
test-A/out.num.tsv: test-A/in.vw.txt train/train.vw.model
vw -t $< -i train/train.vw.model --loss_function logistic --probabilities -p /dev/stdout > $@
test-A/in.vw.txt: test-A/in.tsv
./tsv2vw.py < $< > $@
dev-0/out.tsv: dev-0/out.num.tsv num2label.py
./num2label.py < $< > $@
dev-0/out.num.tsv: dev-0/in.vw.txt train/train.vw.model
vw -t $< -i train/train.vw.model --loss_function logistic --probabilities -p /dev/stdout > $@
dev-0/in.vw.txt: dev-0/in.tsv
./tsv2vw.py < $< > $@
train/train.vw.model: train/train.vw.txt
vw $< -f $@ --passes 50 -b 20 --random_seed 2020 --oaa 8 --loss_function logistic --probabilities -k --cache_file vw-meta-cache
train/train.vw.txt : train/train.tsv.gz tsv2vw.py
zcat $< | ./tsv2vw.py > $@
clean:
rm -rf dev-0/out.tsv dev-0/in.vw.txt train/train.vw.model train/train.vw.txt dev-0/out.num.tsv test-A/out.tsv test-A/out.num.tsv test-A/in.vw.txt