diff options
| author | tslil <tslil@posteo.de> | 2021-01-06 22:34:01 -0500 |
|---|---|---|
| committer | tslil <tslil@posteo.de> | 2026-08-28 19:37:41 +0100 |
| commit | 71106f2a643b8cdc55eb52d6159894fef3cd3aec (patch) | |
| tree | 5f980580fc9c9ed54d194841fc2a28ef186b696f /extract.sh | |
| parent | c2227f2c115ee536ffa22b32866d3a68437dba73 (diff) | |
Small tweaks
Diffstat (limited to 'extract.sh')
| -rwxr-xr-x | extract.sh | 17 |
1 files changed, 10 insertions, 7 deletions
@@ -17,6 +17,7 @@ extract() { echo Extracing games of size "$size"... sqlite3 "$db_file" "$(query $1 $size)" | shuf > "playtak-$size" done + cd .. } process() { @@ -27,16 +28,19 @@ process() { tail -n21 "data/check-$i" echo Stripping overflows and illegal games... grep -Fvxf "data/check-$i" "data/playtak-$i" > "data/good-playtak-$i" - echo -n "Generating training data... " - ./pptdb "$i" "data/good-playtak-$i" generate - echo "Shuffling data..." - shuf "data/training-$i.csv" > "data/shuf-$i.csv" - mv "data/shuf-$i.csv" "data/training-$i.csv" + # echo -n "Generating training data... " + # ./pptdb "$i" "data/good-playtak-$i" generate + # echo "Shuffling data..." + # shuf "data/training-$i.csv" > "data/shuf-$i.csv" + # mv "data/shuf-$i.csv" "data/training-$i.csv" echo done } -# extract notation,result +if [ ! -f "data/playtak-5" ]; then + extract notation,result +fi + if [ ! -f "pptdb" ]; then echo Preparing pptdb make pptdb @@ -44,6 +48,5 @@ fi # process -make pptdb shuf -n10000 data/good-playtak-5 > data/smalltak-5 && ./pptdb 5 data/smalltak-5 generate && \ head -n1 data/training-5.csv > t && tail -n+2 data/training-5.csv > data/train5.csv && shuf data/train5.csv >> t && mv t data/train5.csv |
