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-07-01 10:42:55 +08:00
parent 03f8fac400
commit 4fe3b29cda
4 changed files with 129 additions and 117 deletions

View File

@@ -10,19 +10,33 @@ 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
head -n -50 ./data/train.csv >> ./tmp.csv
tail -n 50 ./data/train.csv >> ./data/test.csv
cnt=`wc ${FILE} | awk '{print $1}'`
step=50
maxn=$((cnt / step * step + 1))
for step in {51..501..50}
do
step=51
while [[ ${step} -le ${maxn} ]]; 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
echo 'lr:'
display_diff=0 algorithm=lr python3 rf.py
echo 'rf:'
display_diff=0 algorithm=rf python3 rf.py
echo 'dt:'
display_diff=0 algorithm=dt python3 rf.py
echo 'ada:'
display_diff=0 algorithm=ada python3 rf.py
echo 'gbdt:'
display_diff=0 algorithm=gbdt python3 rf.py
echo -e "\n"
step=$(($step + 50))
done
rm ./data/train.csv