Large Commit
This commit is contained in:
parent
86488cd92c
commit
efcf66a3bc
19
Zajęcia4/Dockerfile
Normal file
19
Zajęcia4/Dockerfile
Normal file
@ -0,0 +1,19 @@
|
||||
# Nasz obraz będzie dzidziczył z obrazu Ubuntu w wersji latest
|
||||
FROM ubuntu:latest
|
||||
|
||||
# Instalujemy niezbędne zależności. Zwróć uwagę na flagę "-y" (assume yes)
|
||||
RUN apt update && apt install -y git
|
||||
RUN apt install -y python3-pip
|
||||
RUN apt install -y curl
|
||||
RUN pip3 install --user kaggle
|
||||
RUN pip3 install --user seaborn
|
||||
RUN pip3 install --user sklearn
|
||||
RUN pip3 install --user pandas
|
||||
RUN pip3 install --user matplotlib
|
||||
|
||||
# Stwórzmy w kontenerze (jeśli nie istnieje) katalog /app i przejdźmy do niego (wszystkie kolejne polecenia RUN, CMD, ENTRYPOINT, COPY i ADD będą w nim wykonywane)
|
||||
WORKDIR /app
|
||||
|
||||
# Skopiujmy nasz skrypt do katalogu /app w kontenerze
|
||||
COPY ./test.sh ./
|
||||
COPY ./IUM_1_434788.ipynb ./
|
3306
Zajęcia4/IUM_1_434788.ipynb
Normal file
3306
Zajęcia4/IUM_1_434788.ipynb
Normal file
File diff suppressed because one or more lines are too long
31
Zajęcia4/Python_file.py
Normal file
31
Zajęcia4/Python_file.py
Normal file
@ -0,0 +1,31 @@
|
||||
import wget
|
||||
url = 'https://git.wmi.amu.edu.pl/s434788/ium_434788/raw/branch/master/winequality-red.csv'
|
||||
filename = wget.download(url)
|
||||
|
||||
import pandas as pd
|
||||
wine=pd.read_csv('winequality-red.csv')
|
||||
wine
|
||||
|
||||
from sklearn.model_selection import train_test_split
|
||||
|
||||
wine_train, wine_test = train_test_split(wine, test_size=360,train_size=959, random_state=1)
|
||||
|
||||
wine_test["quality"].value_counts()
|
||||
|
||||
wine_train["quality"].value_counts()
|
||||
|
||||
wine
|
||||
|
||||
wine["quality"].value_counts()
|
||||
|
||||
wine.describe(include='all')
|
||||
|
||||
wine["quality"]=((wine["quality"]-wine["quality"].min())/(wine["quality"].max()-wine["quality"].min()))*20
|
||||
|
||||
wine["quality"].value_counts()
|
||||
|
||||
wine.isnull().sum()
|
||||
|
||||
wine.dropna(inplace=True)
|
||||
|
||||
wine
|
19
Zajęcia4/test.sh
Normal file
19
Zajęcia4/test.sh
Normal file
@ -0,0 +1,19 @@
|
||||
# 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 > Final_file.csv
|
1600
Zajęcia4/winequality-red.csv
Normal file
1600
Zajęcia4/winequality-red.csv
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user