ium_434788/Zadanie_03_create_dataset.sh

19 lines
715 B
Bash
Raw Normal View History

2021-04-08 19:02:15 +02:00
# 5. Zapisanie zbioru danych [4 pkt] (Pobranie pliku .csv)
curl -OL https://git.wmi.amu.edu.pl/s434788/ium_434788/raw/branch/master/winequality-red.csv
# 5. Zapisanie zbioru danych [4 pkt] (Podzielenie pliku csv na test/dev/train)
head -n 1 winequality-red.csv > header.csv
tail -n +2 winequality-red.csv | shuf > data.shuffled
head -n 266 data.shuffled > wine.data.test
head -n 532 data.shuffled | tail -n 266 > wine.data.dev
tail -n +333 data.shuffled > wine.data.train
cat header.csv wine.data.test > test.csv
cat header.csv wine.data.dev > dev.csv
cat header.csv wine.data.train > train.csv
# 7. Parametry zadania [1 pkt]
head -n $1 data.shuffled > zadanie7.data
cat header.csv zadanie7.data > zadanie7.csv