zadanie 8

This commit is contained in:
s434695 2021-03-28 22:32:17 +02:00
parent f0227cc53d
commit 495eed614f
3 changed files with 46 additions and 14 deletions

27
dataset_stats/Jenkinsfile vendored Normal file
View File

@ -0,0 +1,27 @@
pipeline {
agent any
parameters {
buildSelector(defaultSelector:
lastSuccessful(),
description: 'Which build to use for copying artifacts',
name: 'BUILD_SELECTOR')
}
stages {
stage("copyArtifacts"){
steps {
copyArtifacts fingerprintArtifacts: true,
projectName: 's434695-create-dataset',
selector: buildParameter('BUILD_SELECTOR')
sh "chmod +x ./stats.sh"
sh "./stats.sh"
archiveArtifacts "stats.txt"
}
}
}
stage('archiveArtifacts') {
steps {
archiveArtifacts 'stats.txt'
}
}
}

5
dataset_stats/stats.sh Normal file
View File

@ -0,0 +1,5 @@
wc -l healthcare-dataset-stroke-data.csv >> stats.txt
wc -l test.csv >> stats.txt
wc -l dev.csv >> stats.txt
wc -l train.csv >> stats.txt
wc -l obcietedane.csv >> stats.txt

View File

@ -1,19 +1,19 @@
#Pobranie pliku .csv
curl -OL https://git.wmi.amu.edu.pl/s434695/ium_434695/raw/branch/master/vgsales.csv
#Pobranie pliku .csv
curl -OL https://git.wmi.amu.edu.pl/s434695/ium_434695/raw/branch/master/vgsales.csv
#Podzielenie pliku csv na test/dev/train
head -n 1 vgsales.csv > header.csv
tail -n +2 vgsales.csv | shuf > data.shuffled
#Podzielenie pliku csv na test/dev/train
head -n 1 vgsales.csv > header.csv
tail -n +2 vgsales.csv | shuf > data.shuffled
head -n 3320 data.shuffled > games.data.test
head -n 6640 data.shuffled | tail -n 3320 > games.data.dev
tail -n +6641 data.shuffled > games.data.train
head -n 3320 data.shuffled > games.data.test
head -n 6640 data.shuffled | tail -n 3320 > games.data.dev
tail -n +6641 data.shuffled > games.data.train
cat header.csv games.data.test > test.csv
cat header.csv games.data.dev > dev.csv
cat header.csv games.data.train > train.csv
cat header.csv games.data.test > test.csv
cat header.csv games.data.dev > dev.csv
cat header.csv games.data.train > train.csv
#Obcinanie danych
head -n $1 data.shuffled > obcietedane.data
cat header.csv obcietedane.data > obcietedane.csv
#Obcinanie danych
head -n $1 data.shuffled > obcietedane.data
cat header.csv obcietedane.data > obcietedane.csv