2023-03-25 12:06:35 +01:00
|
|
|
|
{
|
|
|
|
|
"cells": [
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": 1,
|
2023-03-25 13:44:12 +01:00
|
|
|
|
"id": "7fada8a6",
|
2023-03-25 12:06:35 +01:00
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"text": [
|
|
|
|
|
"--2023-03-25 11:54:34-- https://archive.ics.uci.edu/ml/machine-learning-databases/car/car.data\n",
|
|
|
|
|
"Resolving archive.ics.uci.edu (archive.ics.uci.edu)... 128.195.10.252\n",
|
|
|
|
|
"Connecting to archive.ics.uci.edu (archive.ics.uci.edu)|128.195.10.252|:443... connected.\n",
|
|
|
|
|
"HTTP request sent, awaiting response... 206 Partial Content\n",
|
|
|
|
|
"Length: 51867 (51K), 1 remaining [application/x-httpd-php]\n",
|
|
|
|
|
"Saving to: ‘car.data’\n",
|
|
|
|
|
"\n",
|
|
|
|
|
"car.data 100%[+++++++++++++++++++>] 50,65K --.-KB/s in 0s \n",
|
|
|
|
|
"\n",
|
|
|
|
|
"2023-03-25 11:54:35 (16,8 KB/s) - ‘car.data’ saved [51867/51867]\n",
|
|
|
|
|
"\n"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
|
|
|
|
"!wget -c https://archive.ics.uci.edu/ml/machine-learning-databases/car/car.data"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": 2,
|
2023-03-25 13:44:12 +01:00
|
|
|
|
"id": "3d3dc9c4",
|
2023-03-25 12:06:35 +01:00
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"text": [
|
|
|
|
|
"1728 car.data\r\n"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
|
|
|
|
"!wc -l car.data"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
|
|
|
|
"execution_count": 3,
|
2023-03-25 13:44:12 +01:00
|
|
|
|
"id": "e4e1c9c4",
|
2023-03-25 12:06:35 +01:00
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"text": [
|
|
|
|
|
"vhigh,vhigh,2,2,small,low,unacc\n",
|
|
|
|
|
"vhigh,vhigh,2,2,small,med,unacc\n",
|
|
|
|
|
"vhigh,vhigh,2,2,small,high,unacc\n",
|
|
|
|
|
"vhigh,vhigh,2,2,med,low,unacc\n",
|
|
|
|
|
"vhigh,vhigh,2,2,med,med,unacc\n",
|
|
|
|
|
"vhigh,vhigh,2,2,med,high,unacc\n",
|
|
|
|
|
" 576 high\n",
|
|
|
|
|
" 576 low\n",
|
|
|
|
|
" 576 med\n"
|
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
|
|
|
|
"!head -n 6 car.data\n",
|
|
|
|
|
"!cut -f 6 -d \",\" car.data | sort | uniq -c"
|
|
|
|
|
]
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
"cell_type": "code",
|
2023-03-25 13:44:12 +01:00
|
|
|
|
"execution_count": 11,
|
|
|
|
|
"id": "198bb7b6",
|
2023-03-25 12:06:35 +01:00
|
|
|
|
"metadata": {},
|
|
|
|
|
"outputs": [
|
|
|
|
|
{
|
|
|
|
|
"name": "stdout",
|
|
|
|
|
"output_type": "stream",
|
|
|
|
|
"text": [
|
2023-03-25 13:44:12 +01:00
|
|
|
|
" 1728 car.data\r\n",
|
|
|
|
|
" 288 car.data.dev\r\n",
|
|
|
|
|
" 288 car.data.test\r\n",
|
|
|
|
|
" 1152 car.data.train\r\n",
|
|
|
|
|
" 3456 total\r\n"
|
2023-03-25 12:06:35 +01:00
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"source": [
|
|
|
|
|
"!head -n 288 car.data > car.data.test\n",
|
|
|
|
|
"!head -n 576 car.data | tail -n 288 > car.data.dev\n",
|
2023-03-25 13:44:12 +01:00
|
|
|
|
"!tail -n +577 car.data > car.data.train\n",
|
2023-03-25 12:06:35 +01:00
|
|
|
|
"#sprawdzanie podziału ze względu na bezpieczeństwo samochodu\n",
|
2023-03-25 13:44:12 +01:00
|
|
|
|
"!wc -l car.data*"
|
2023-03-25 12:06:35 +01:00
|
|
|
|
]
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
"metadata": {
|
|
|
|
|
"kernelspec": {
|
|
|
|
|
"display_name": "Python 3 (ipykernel)",
|
|
|
|
|
"language": "python",
|
|
|
|
|
"name": "python3"
|
|
|
|
|
},
|
|
|
|
|
"language_info": {
|
|
|
|
|
"codemirror_mode": {
|
|
|
|
|
"name": "ipython",
|
|
|
|
|
"version": 3
|
|
|
|
|
},
|
|
|
|
|
"file_extension": ".py",
|
|
|
|
|
"mimetype": "text/x-python",
|
|
|
|
|
"name": "python",
|
|
|
|
|
"nbconvert_exporter": "python",
|
|
|
|
|
"pygments_lexer": "ipython3",
|
|
|
|
|
"version": "3.10.6"
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
"nbformat": 4,
|
|
|
|
|
"nbformat_minor": 5
|
|
|
|
|
}
|