1
0
mirror of https://github.com/newnius/YAO-optimizer.git synced 2025-12-16 01:16:44 +00:00
This commit is contained in:
2020-06-30 18:09:10 +08:00
parent 3f97840d36
commit 33fb7f8c50
2 changed files with 64 additions and 16 deletions

30
compare.sh Executable file
View File

@@ -0,0 +1,30 @@
#!/usr/bin/env bash
FILE=./dataset.csv
if ! [[ -f "$FILE" ]]; then
echo "$FILE not exist."
exit 1
fi
awk 'FNR>1' ${FILE} | shuf > ./data/train.csv
head -n 1 ${FILE} > ./tmp.csv
head -n 1 ${FILE} > ./data/test.csv
cat ./data/train.csv >> ./tmp.csv
tail -n 50 tmp.csv >> ./data/test.csv
for step in {51..501..50}
do
echo "step=${step}"
tail -n ${step} tmp.csv > ./data/train.csv
algorithm=lr python3 rf.py
algorithm=rf python3 rf.py
algorithm=tree python3 rf.py
algorithm=ada python3 rf.py
algorithm=gbdt python3 rf.py
done
rm ./data/train.csv
rm ./data/test.csv
rm tmp.csv