Spaces:
Sleeping
Sleeping
Upload 4 files
Browse files- CarPredict.ipynb +1352 -0
- app.py +196 -0
- cars.xls +0 -0
- requirements.txt.txt +4 -0
CarPredict.ipynb
ADDED
@@ -0,0 +1,1352 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cells": [
|
3 |
+
{
|
4 |
+
"cell_type": "markdown",
|
5 |
+
"id": "f191f617-72b5-4aa3-a4a1-08bc01ad0681",
|
6 |
+
"metadata": {},
|
7 |
+
"source": [
|
8 |
+
"## Car Predict ##\n",
|
9 |
+
"* second hand vehicle prices according to features "
|
10 |
+
]
|
11 |
+
},
|
12 |
+
{
|
13 |
+
"cell_type": "code",
|
14 |
+
"execution_count": 11,
|
15 |
+
"id": "e9503d2a-396d-45e3-b59f-45a446b5bbc3",
|
16 |
+
"metadata": {},
|
17 |
+
"outputs": [],
|
18 |
+
"source": [
|
19 |
+
"import pandas as pd\n",
|
20 |
+
"from sklearn.model_selection import train_test_split\n",
|
21 |
+
"from sklearn.linear_model import LinearRegression\n",
|
22 |
+
"from sklearn.metrics import r2_score, mean_squared_error\n",
|
23 |
+
"from sklearn.compose import ColumnTransformer # Sütun Dönüşüm İşlemleri\n",
|
24 |
+
"from sklearn.preprocessing import OneHotEncoder, StandardScaler # kategori - sayısaş dönüşüm ve ölçeklendirme\n",
|
25 |
+
"from sklearn.pipeline import Pipeline # veri işleme hattı"
|
26 |
+
]
|
27 |
+
},
|
28 |
+
{
|
29 |
+
"cell_type": "code",
|
30 |
+
"execution_count": 17,
|
31 |
+
"id": "e76a64dd-33b8-40a6-b9f0-3a0a58b5467a",
|
32 |
+
"metadata": {},
|
33 |
+
"outputs": [
|
34 |
+
{
|
35 |
+
"name": "stdout",
|
36 |
+
"output_type": "stream",
|
37 |
+
"text": [
|
38 |
+
"Requirement already satisfied: xlrd in c:\\users\\erayc\\anaconda3\\lib\\site-packages (2.0.1)\n"
|
39 |
+
]
|
40 |
+
}
|
41 |
+
],
|
42 |
+
"source": [
|
43 |
+
"!pip install xlrd"
|
44 |
+
]
|
45 |
+
},
|
46 |
+
{
|
47 |
+
"cell_type": "code",
|
48 |
+
"execution_count": 19,
|
49 |
+
"id": "b5b062be-ff68-4ed3-810f-d4c9e92b3653",
|
50 |
+
"metadata": {
|
51 |
+
"scrolled": true
|
52 |
+
},
|
53 |
+
"outputs": [
|
54 |
+
{
|
55 |
+
"data": {
|
56 |
+
"text/html": [
|
57 |
+
"<div>\n",
|
58 |
+
"<style scoped>\n",
|
59 |
+
" .dataframe tbody tr th:only-of-type {\n",
|
60 |
+
" vertical-align: middle;\n",
|
61 |
+
" }\n",
|
62 |
+
"\n",
|
63 |
+
" .dataframe tbody tr th {\n",
|
64 |
+
" vertical-align: top;\n",
|
65 |
+
" }\n",
|
66 |
+
"\n",
|
67 |
+
" .dataframe thead th {\n",
|
68 |
+
" text-align: right;\n",
|
69 |
+
" }\n",
|
70 |
+
"</style>\n",
|
71 |
+
"<table border=\"1\" class=\"dataframe\">\n",
|
72 |
+
" <thead>\n",
|
73 |
+
" <tr style=\"text-align: right;\">\n",
|
74 |
+
" <th></th>\n",
|
75 |
+
" <th>Price</th>\n",
|
76 |
+
" <th>Mileage</th>\n",
|
77 |
+
" <th>Make</th>\n",
|
78 |
+
" <th>Model</th>\n",
|
79 |
+
" <th>Trim</th>\n",
|
80 |
+
" <th>Type</th>\n",
|
81 |
+
" <th>Cylinder</th>\n",
|
82 |
+
" <th>Liter</th>\n",
|
83 |
+
" <th>Doors</th>\n",
|
84 |
+
" <th>Cruise</th>\n",
|
85 |
+
" <th>Sound</th>\n",
|
86 |
+
" <th>Leather</th>\n",
|
87 |
+
" </tr>\n",
|
88 |
+
" </thead>\n",
|
89 |
+
" <tbody>\n",
|
90 |
+
" <tr>\n",
|
91 |
+
" <th>0</th>\n",
|
92 |
+
" <td>17314.103129</td>\n",
|
93 |
+
" <td>8221</td>\n",
|
94 |
+
" <td>Buick</td>\n",
|
95 |
+
" <td>Century</td>\n",
|
96 |
+
" <td>Sedan 4D</td>\n",
|
97 |
+
" <td>Sedan</td>\n",
|
98 |
+
" <td>6</td>\n",
|
99 |
+
" <td>3.1</td>\n",
|
100 |
+
" <td>4</td>\n",
|
101 |
+
" <td>1</td>\n",
|
102 |
+
" <td>1</td>\n",
|
103 |
+
" <td>1</td>\n",
|
104 |
+
" </tr>\n",
|
105 |
+
" <tr>\n",
|
106 |
+
" <th>1</th>\n",
|
107 |
+
" <td>17542.036083</td>\n",
|
108 |
+
" <td>9135</td>\n",
|
109 |
+
" <td>Buick</td>\n",
|
110 |
+
" <td>Century</td>\n",
|
111 |
+
" <td>Sedan 4D</td>\n",
|
112 |
+
" <td>Sedan</td>\n",
|
113 |
+
" <td>6</td>\n",
|
114 |
+
" <td>3.1</td>\n",
|
115 |
+
" <td>4</td>\n",
|
116 |
+
" <td>1</td>\n",
|
117 |
+
" <td>1</td>\n",
|
118 |
+
" <td>0</td>\n",
|
119 |
+
" </tr>\n",
|
120 |
+
" <tr>\n",
|
121 |
+
" <th>2</th>\n",
|
122 |
+
" <td>16218.847862</td>\n",
|
123 |
+
" <td>13196</td>\n",
|
124 |
+
" <td>Buick</td>\n",
|
125 |
+
" <td>Century</td>\n",
|
126 |
+
" <td>Sedan 4D</td>\n",
|
127 |
+
" <td>Sedan</td>\n",
|
128 |
+
" <td>6</td>\n",
|
129 |
+
" <td>3.1</td>\n",
|
130 |
+
" <td>4</td>\n",
|
131 |
+
" <td>1</td>\n",
|
132 |
+
" <td>1</td>\n",
|
133 |
+
" <td>0</td>\n",
|
134 |
+
" </tr>\n",
|
135 |
+
" <tr>\n",
|
136 |
+
" <th>3</th>\n",
|
137 |
+
" <td>16336.913140</td>\n",
|
138 |
+
" <td>16342</td>\n",
|
139 |
+
" <td>Buick</td>\n",
|
140 |
+
" <td>Century</td>\n",
|
141 |
+
" <td>Sedan 4D</td>\n",
|
142 |
+
" <td>Sedan</td>\n",
|
143 |
+
" <td>6</td>\n",
|
144 |
+
" <td>3.1</td>\n",
|
145 |
+
" <td>4</td>\n",
|
146 |
+
" <td>1</td>\n",
|
147 |
+
" <td>0</td>\n",
|
148 |
+
" <td>0</td>\n",
|
149 |
+
" </tr>\n",
|
150 |
+
" <tr>\n",
|
151 |
+
" <th>4</th>\n",
|
152 |
+
" <td>16339.170324</td>\n",
|
153 |
+
" <td>19832</td>\n",
|
154 |
+
" <td>Buick</td>\n",
|
155 |
+
" <td>Century</td>\n",
|
156 |
+
" <td>Sedan 4D</td>\n",
|
157 |
+
" <td>Sedan</td>\n",
|
158 |
+
" <td>6</td>\n",
|
159 |
+
" <td>3.1</td>\n",
|
160 |
+
" <td>4</td>\n",
|
161 |
+
" <td>1</td>\n",
|
162 |
+
" <td>0</td>\n",
|
163 |
+
" <td>1</td>\n",
|
164 |
+
" </tr>\n",
|
165 |
+
" <tr>\n",
|
166 |
+
" <th>...</th>\n",
|
167 |
+
" <td>...</td>\n",
|
168 |
+
" <td>...</td>\n",
|
169 |
+
" <td>...</td>\n",
|
170 |
+
" <td>...</td>\n",
|
171 |
+
" <td>...</td>\n",
|
172 |
+
" <td>...</td>\n",
|
173 |
+
" <td>...</td>\n",
|
174 |
+
" <td>...</td>\n",
|
175 |
+
" <td>...</td>\n",
|
176 |
+
" <td>...</td>\n",
|
177 |
+
" <td>...</td>\n",
|
178 |
+
" <td>...</td>\n",
|
179 |
+
" </tr>\n",
|
180 |
+
" <tr>\n",
|
181 |
+
" <th>799</th>\n",
|
182 |
+
" <td>16507.070267</td>\n",
|
183 |
+
" <td>16229</td>\n",
|
184 |
+
" <td>Saturn</td>\n",
|
185 |
+
" <td>L Series</td>\n",
|
186 |
+
" <td>L300 Sedan 4D</td>\n",
|
187 |
+
" <td>Sedan</td>\n",
|
188 |
+
" <td>6</td>\n",
|
189 |
+
" <td>3.0</td>\n",
|
190 |
+
" <td>4</td>\n",
|
191 |
+
" <td>1</td>\n",
|
192 |
+
" <td>0</td>\n",
|
193 |
+
" <td>0</td>\n",
|
194 |
+
" </tr>\n",
|
195 |
+
" <tr>\n",
|
196 |
+
" <th>800</th>\n",
|
197 |
+
" <td>16175.957604</td>\n",
|
198 |
+
" <td>19095</td>\n",
|
199 |
+
" <td>Saturn</td>\n",
|
200 |
+
" <td>L Series</td>\n",
|
201 |
+
" <td>L300 Sedan 4D</td>\n",
|
202 |
+
" <td>Sedan</td>\n",
|
203 |
+
" <td>6</td>\n",
|
204 |
+
" <td>3.0</td>\n",
|
205 |
+
" <td>4</td>\n",
|
206 |
+
" <td>1</td>\n",
|
207 |
+
" <td>1</td>\n",
|
208 |
+
" <td>0</td>\n",
|
209 |
+
" </tr>\n",
|
210 |
+
" <tr>\n",
|
211 |
+
" <th>801</th>\n",
|
212 |
+
" <td>15731.132897</td>\n",
|
213 |
+
" <td>20484</td>\n",
|
214 |
+
" <td>Saturn</td>\n",
|
215 |
+
" <td>L Series</td>\n",
|
216 |
+
" <td>L300 Sedan 4D</td>\n",
|
217 |
+
" <td>Sedan</td>\n",
|
218 |
+
" <td>6</td>\n",
|
219 |
+
" <td>3.0</td>\n",
|
220 |
+
" <td>4</td>\n",
|
221 |
+
" <td>1</td>\n",
|
222 |
+
" <td>1</td>\n",
|
223 |
+
" <td>0</td>\n",
|
224 |
+
" </tr>\n",
|
225 |
+
" <tr>\n",
|
226 |
+
" <th>802</th>\n",
|
227 |
+
" <td>15118.893228</td>\n",
|
228 |
+
" <td>25979</td>\n",
|
229 |
+
" <td>Saturn</td>\n",
|
230 |
+
" <td>L Series</td>\n",
|
231 |
+
" <td>L300 Sedan 4D</td>\n",
|
232 |
+
" <td>Sedan</td>\n",
|
233 |
+
" <td>6</td>\n",
|
234 |
+
" <td>3.0</td>\n",
|
235 |
+
" <td>4</td>\n",
|
236 |
+
" <td>1</td>\n",
|
237 |
+
" <td>1</td>\n",
|
238 |
+
" <td>0</td>\n",
|
239 |
+
" </tr>\n",
|
240 |
+
" <tr>\n",
|
241 |
+
" <th>803</th>\n",
|
242 |
+
" <td>13585.636802</td>\n",
|
243 |
+
" <td>35662</td>\n",
|
244 |
+
" <td>Saturn</td>\n",
|
245 |
+
" <td>L Series</td>\n",
|
246 |
+
" <td>L300 Sedan 4D</td>\n",
|
247 |
+
" <td>Sedan</td>\n",
|
248 |
+
" <td>6</td>\n",
|
249 |
+
" <td>3.0</td>\n",
|
250 |
+
" <td>4</td>\n",
|
251 |
+
" <td>1</td>\n",
|
252 |
+
" <td>0</td>\n",
|
253 |
+
" <td>0</td>\n",
|
254 |
+
" </tr>\n",
|
255 |
+
" </tbody>\n",
|
256 |
+
"</table>\n",
|
257 |
+
"<p>804 rows × 12 columns</p>\n",
|
258 |
+
"</div>"
|
259 |
+
],
|
260 |
+
"text/plain": [
|
261 |
+
" Price Mileage Make Model Trim Type Cylinder \\\n",
|
262 |
+
"0 17314.103129 8221 Buick Century Sedan 4D Sedan 6 \n",
|
263 |
+
"1 17542.036083 9135 Buick Century Sedan 4D Sedan 6 \n",
|
264 |
+
"2 16218.847862 13196 Buick Century Sedan 4D Sedan 6 \n",
|
265 |
+
"3 16336.913140 16342 Buick Century Sedan 4D Sedan 6 \n",
|
266 |
+
"4 16339.170324 19832 Buick Century Sedan 4D Sedan 6 \n",
|
267 |
+
".. ... ... ... ... ... ... ... \n",
|
268 |
+
"799 16507.070267 16229 Saturn L Series L300 Sedan 4D Sedan 6 \n",
|
269 |
+
"800 16175.957604 19095 Saturn L Series L300 Sedan 4D Sedan 6 \n",
|
270 |
+
"801 15731.132897 20484 Saturn L Series L300 Sedan 4D Sedan 6 \n",
|
271 |
+
"802 15118.893228 25979 Saturn L Series L300 Sedan 4D Sedan 6 \n",
|
272 |
+
"803 13585.636802 35662 Saturn L Series L300 Sedan 4D Sedan 6 \n",
|
273 |
+
"\n",
|
274 |
+
" Liter Doors Cruise Sound Leather \n",
|
275 |
+
"0 3.1 4 1 1 1 \n",
|
276 |
+
"1 3.1 4 1 1 0 \n",
|
277 |
+
"2 3.1 4 1 1 0 \n",
|
278 |
+
"3 3.1 4 1 0 0 \n",
|
279 |
+
"4 3.1 4 1 0 1 \n",
|
280 |
+
".. ... ... ... ... ... \n",
|
281 |
+
"799 3.0 4 1 0 0 \n",
|
282 |
+
"800 3.0 4 1 1 0 \n",
|
283 |
+
"801 3.0 4 1 1 0 \n",
|
284 |
+
"802 3.0 4 1 1 0 \n",
|
285 |
+
"803 3.0 4 1 0 0 \n",
|
286 |
+
"\n",
|
287 |
+
"[804 rows x 12 columns]"
|
288 |
+
]
|
289 |
+
},
|
290 |
+
"execution_count": 19,
|
291 |
+
"metadata": {},
|
292 |
+
"output_type": "execute_result"
|
293 |
+
}
|
294 |
+
],
|
295 |
+
"source": [
|
296 |
+
"df = pd.read_excel('cars.xls')\n",
|
297 |
+
"df"
|
298 |
+
]
|
299 |
+
},
|
300 |
+
{
|
301 |
+
"cell_type": "code",
|
302 |
+
"execution_count": 21,
|
303 |
+
"id": "1e110d3e-edf0-4c7b-a6b6-ac8f5930050d",
|
304 |
+
"metadata": {},
|
305 |
+
"outputs": [],
|
306 |
+
"source": [
|
307 |
+
"# Data preprocessing"
|
308 |
+
]
|
309 |
+
},
|
310 |
+
{
|
311 |
+
"cell_type": "code",
|
312 |
+
"execution_count": 23,
|
313 |
+
"id": "edb61d8e-5c1c-4d87-b222-061e8010202d",
|
314 |
+
"metadata": {},
|
315 |
+
"outputs": [],
|
316 |
+
"source": [
|
317 |
+
"X = df.drop('Price', axis=1) # fiyata etki edenleri al\n",
|
318 |
+
"y = df['Price'] # tahmin"
|
319 |
+
]
|
320 |
+
},
|
321 |
+
{
|
322 |
+
"cell_type": "code",
|
323 |
+
"execution_count": 25,
|
324 |
+
"id": "51d6ae52-8e4d-4501-9bc6-5647187429bd",
|
325 |
+
"metadata": {},
|
326 |
+
"outputs": [],
|
327 |
+
"source": [
|
328 |
+
"X_train, X_test , y_train, y_test = train_test_split(X,y, test_size = 0.2 , random_state = 42)"
|
329 |
+
]
|
330 |
+
},
|
331 |
+
{
|
332 |
+
"cell_type": "markdown",
|
333 |
+
"id": "8c8a6f88-e37c-490a-945d-8c2140ce3f2d",
|
334 |
+
"metadata": {},
|
335 |
+
"source": [
|
336 |
+
"# data preprocessing, standardization and with one hot encoding process automating"
|
337 |
+
]
|
338 |
+
},
|
339 |
+
{
|
340 |
+
"cell_type": "code",
|
341 |
+
"execution_count": 30,
|
342 |
+
"id": "713b7032-0ce3-4ea7-9a21-dbe39e0794c3",
|
343 |
+
"metadata": {},
|
344 |
+
"outputs": [],
|
345 |
+
"source": [
|
346 |
+
"preprocess = ColumnTransformer(\n",
|
347 |
+
" transformers=[\n",
|
348 |
+
" ('num', StandardScaler(),['Mileage','Cylinder','Liter','Doors']),\n",
|
349 |
+
" ('cat', OneHotEncoder(),['Make','Model','Trim','Type'])\n",
|
350 |
+
" ]\n",
|
351 |
+
")\n",
|
352 |
+
" "
|
353 |
+
]
|
354 |
+
},
|
355 |
+
{
|
356 |
+
"cell_type": "code",
|
357 |
+
"execution_count": 34,
|
358 |
+
"id": "0bb76bfd-fed4-4beb-96ef-56e4a2e3092b",
|
359 |
+
"metadata": {},
|
360 |
+
"outputs": [],
|
361 |
+
"source": [
|
362 |
+
"#modeli tnaımladık\n",
|
363 |
+
"my_model = LinearRegression()"
|
364 |
+
]
|
365 |
+
},
|
366 |
+
{
|
367 |
+
"cell_type": "code",
|
368 |
+
"execution_count": 36,
|
369 |
+
"id": "746038a4-71bb-46bb-870d-18061112c21b",
|
370 |
+
"metadata": {},
|
371 |
+
"outputs": [],
|
372 |
+
"source": [
|
373 |
+
"pipe = Pipeline(steps=[('preprocessor',preprocess),('model',my_model)])"
|
374 |
+
]
|
375 |
+
},
|
376 |
+
{
|
377 |
+
"cell_type": "code",
|
378 |
+
"execution_count": 38,
|
379 |
+
"id": "4f60e30f-5955-4207-9544-a97be0246621",
|
380 |
+
"metadata": {},
|
381 |
+
"outputs": [
|
382 |
+
{
|
383 |
+
"data": {
|
384 |
+
"text/html": [
|
385 |
+
"<style>#sk-container-id-1 {\n",
|
386 |
+
" /* Definition of color scheme common for light and dark mode */\n",
|
387 |
+
" --sklearn-color-text: black;\n",
|
388 |
+
" --sklearn-color-line: gray;\n",
|
389 |
+
" /* Definition of color scheme for unfitted estimators */\n",
|
390 |
+
" --sklearn-color-unfitted-level-0: #fff5e6;\n",
|
391 |
+
" --sklearn-color-unfitted-level-1: #f6e4d2;\n",
|
392 |
+
" --sklearn-color-unfitted-level-2: #ffe0b3;\n",
|
393 |
+
" --sklearn-color-unfitted-level-3: chocolate;\n",
|
394 |
+
" /* Definition of color scheme for fitted estimators */\n",
|
395 |
+
" --sklearn-color-fitted-level-0: #f0f8ff;\n",
|
396 |
+
" --sklearn-color-fitted-level-1: #d4ebff;\n",
|
397 |
+
" --sklearn-color-fitted-level-2: #b3dbfd;\n",
|
398 |
+
" --sklearn-color-fitted-level-3: cornflowerblue;\n",
|
399 |
+
"\n",
|
400 |
+
" /* Specific color for light theme */\n",
|
401 |
+
" --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
|
402 |
+
" --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, white)));\n",
|
403 |
+
" --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, black)));\n",
|
404 |
+
" --sklearn-color-icon: #696969;\n",
|
405 |
+
"\n",
|
406 |
+
" @media (prefers-color-scheme: dark) {\n",
|
407 |
+
" /* Redefinition of color scheme for dark theme */\n",
|
408 |
+
" --sklearn-color-text-on-default-background: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
|
409 |
+
" --sklearn-color-background: var(--sg-background-color, var(--theme-background, var(--jp-layout-color0, #111)));\n",
|
410 |
+
" --sklearn-color-border-box: var(--sg-text-color, var(--theme-code-foreground, var(--jp-content-font-color1, white)));\n",
|
411 |
+
" --sklearn-color-icon: #878787;\n",
|
412 |
+
" }\n",
|
413 |
+
"}\n",
|
414 |
+
"\n",
|
415 |
+
"#sk-container-id-1 {\n",
|
416 |
+
" color: var(--sklearn-color-text);\n",
|
417 |
+
"}\n",
|
418 |
+
"\n",
|
419 |
+
"#sk-container-id-1 pre {\n",
|
420 |
+
" padding: 0;\n",
|
421 |
+
"}\n",
|
422 |
+
"\n",
|
423 |
+
"#sk-container-id-1 input.sk-hidden--visually {\n",
|
424 |
+
" border: 0;\n",
|
425 |
+
" clip: rect(1px 1px 1px 1px);\n",
|
426 |
+
" clip: rect(1px, 1px, 1px, 1px);\n",
|
427 |
+
" height: 1px;\n",
|
428 |
+
" margin: -1px;\n",
|
429 |
+
" overflow: hidden;\n",
|
430 |
+
" padding: 0;\n",
|
431 |
+
" position: absolute;\n",
|
432 |
+
" width: 1px;\n",
|
433 |
+
"}\n",
|
434 |
+
"\n",
|
435 |
+
"#sk-container-id-1 div.sk-dashed-wrapped {\n",
|
436 |
+
" border: 1px dashed var(--sklearn-color-line);\n",
|
437 |
+
" margin: 0 0.4em 0.5em 0.4em;\n",
|
438 |
+
" box-sizing: border-box;\n",
|
439 |
+
" padding-bottom: 0.4em;\n",
|
440 |
+
" background-color: var(--sklearn-color-background);\n",
|
441 |
+
"}\n",
|
442 |
+
"\n",
|
443 |
+
"#sk-container-id-1 div.sk-container {\n",
|
444 |
+
" /* jupyter's `normalize.less` sets `[hidden] { display: none; }`\n",
|
445 |
+
" but bootstrap.min.css set `[hidden] { display: none !important; }`\n",
|
446 |
+
" so we also need the `!important` here to be able to override the\n",
|
447 |
+
" default hidden behavior on the sphinx rendered scikit-learn.org.\n",
|
448 |
+
" See: https://github.com/scikit-learn/scikit-learn/issues/21755 */\n",
|
449 |
+
" display: inline-block !important;\n",
|
450 |
+
" position: relative;\n",
|
451 |
+
"}\n",
|
452 |
+
"\n",
|
453 |
+
"#sk-container-id-1 div.sk-text-repr-fallback {\n",
|
454 |
+
" display: none;\n",
|
455 |
+
"}\n",
|
456 |
+
"\n",
|
457 |
+
"div.sk-parallel-item,\n",
|
458 |
+
"div.sk-serial,\n",
|
459 |
+
"div.sk-item {\n",
|
460 |
+
" /* draw centered vertical line to link estimators */\n",
|
461 |
+
" background-image: linear-gradient(var(--sklearn-color-text-on-default-background), var(--sklearn-color-text-on-default-background));\n",
|
462 |
+
" background-size: 2px 100%;\n",
|
463 |
+
" background-repeat: no-repeat;\n",
|
464 |
+
" background-position: center center;\n",
|
465 |
+
"}\n",
|
466 |
+
"\n",
|
467 |
+
"/* Parallel-specific style estimator block */\n",
|
468 |
+
"\n",
|
469 |
+
"#sk-container-id-1 div.sk-parallel-item::after {\n",
|
470 |
+
" content: \"\";\n",
|
471 |
+
" width: 100%;\n",
|
472 |
+
" border-bottom: 2px solid var(--sklearn-color-text-on-default-background);\n",
|
473 |
+
" flex-grow: 1;\n",
|
474 |
+
"}\n",
|
475 |
+
"\n",
|
476 |
+
"#sk-container-id-1 div.sk-parallel {\n",
|
477 |
+
" display: flex;\n",
|
478 |
+
" align-items: stretch;\n",
|
479 |
+
" justify-content: center;\n",
|
480 |
+
" background-color: var(--sklearn-color-background);\n",
|
481 |
+
" position: relative;\n",
|
482 |
+
"}\n",
|
483 |
+
"\n",
|
484 |
+
"#sk-container-id-1 div.sk-parallel-item {\n",
|
485 |
+
" display: flex;\n",
|
486 |
+
" flex-direction: column;\n",
|
487 |
+
"}\n",
|
488 |
+
"\n",
|
489 |
+
"#sk-container-id-1 div.sk-parallel-item:first-child::after {\n",
|
490 |
+
" align-self: flex-end;\n",
|
491 |
+
" width: 50%;\n",
|
492 |
+
"}\n",
|
493 |
+
"\n",
|
494 |
+
"#sk-container-id-1 div.sk-parallel-item:last-child::after {\n",
|
495 |
+
" align-self: flex-start;\n",
|
496 |
+
" width: 50%;\n",
|
497 |
+
"}\n",
|
498 |
+
"\n",
|
499 |
+
"#sk-container-id-1 div.sk-parallel-item:only-child::after {\n",
|
500 |
+
" width: 0;\n",
|
501 |
+
"}\n",
|
502 |
+
"\n",
|
503 |
+
"/* Serial-specific style estimator block */\n",
|
504 |
+
"\n",
|
505 |
+
"#sk-container-id-1 div.sk-serial {\n",
|
506 |
+
" display: flex;\n",
|
507 |
+
" flex-direction: column;\n",
|
508 |
+
" align-items: center;\n",
|
509 |
+
" background-color: var(--sklearn-color-background);\n",
|
510 |
+
" padding-right: 1em;\n",
|
511 |
+
" padding-left: 1em;\n",
|
512 |
+
"}\n",
|
513 |
+
"\n",
|
514 |
+
"\n",
|
515 |
+
"/* Toggleable style: style used for estimator/Pipeline/ColumnTransformer box that is\n",
|
516 |
+
"clickable and can be expanded/collapsed.\n",
|
517 |
+
"- Pipeline and ColumnTransformer use this feature and define the default style\n",
|
518 |
+
"- Estimators will overwrite some part of the style using the `sk-estimator` class\n",
|
519 |
+
"*/\n",
|
520 |
+
"\n",
|
521 |
+
"/* Pipeline and ColumnTransformer style (default) */\n",
|
522 |
+
"\n",
|
523 |
+
"#sk-container-id-1 div.sk-toggleable {\n",
|
524 |
+
" /* Default theme specific background. It is overwritten whether we have a\n",
|
525 |
+
" specific estimator or a Pipeline/ColumnTransformer */\n",
|
526 |
+
" background-color: var(--sklearn-color-background);\n",
|
527 |
+
"}\n",
|
528 |
+
"\n",
|
529 |
+
"/* Toggleable label */\n",
|
530 |
+
"#sk-container-id-1 label.sk-toggleable__label {\n",
|
531 |
+
" cursor: pointer;\n",
|
532 |
+
" display: block;\n",
|
533 |
+
" width: 100%;\n",
|
534 |
+
" margin-bottom: 0;\n",
|
535 |
+
" padding: 0.5em;\n",
|
536 |
+
" box-sizing: border-box;\n",
|
537 |
+
" text-align: center;\n",
|
538 |
+
"}\n",
|
539 |
+
"\n",
|
540 |
+
"#sk-container-id-1 label.sk-toggleable__label-arrow:before {\n",
|
541 |
+
" /* Arrow on the left of the label */\n",
|
542 |
+
" content: \"▸\";\n",
|
543 |
+
" float: left;\n",
|
544 |
+
" margin-right: 0.25em;\n",
|
545 |
+
" color: var(--sklearn-color-icon);\n",
|
546 |
+
"}\n",
|
547 |
+
"\n",
|
548 |
+
"#sk-container-id-1 label.sk-toggleable__label-arrow:hover:before {\n",
|
549 |
+
" color: var(--sklearn-color-text);\n",
|
550 |
+
"}\n",
|
551 |
+
"\n",
|
552 |
+
"/* Toggleable content - dropdown */\n",
|
553 |
+
"\n",
|
554 |
+
"#sk-container-id-1 div.sk-toggleable__content {\n",
|
555 |
+
" max-height: 0;\n",
|
556 |
+
" max-width: 0;\n",
|
557 |
+
" overflow: hidden;\n",
|
558 |
+
" text-align: left;\n",
|
559 |
+
" /* unfitted */\n",
|
560 |
+
" background-color: var(--sklearn-color-unfitted-level-0);\n",
|
561 |
+
"}\n",
|
562 |
+
"\n",
|
563 |
+
"#sk-container-id-1 div.sk-toggleable__content.fitted {\n",
|
564 |
+
" /* fitted */\n",
|
565 |
+
" background-color: var(--sklearn-color-fitted-level-0);\n",
|
566 |
+
"}\n",
|
567 |
+
"\n",
|
568 |
+
"#sk-container-id-1 div.sk-toggleable__content pre {\n",
|
569 |
+
" margin: 0.2em;\n",
|
570 |
+
" border-radius: 0.25em;\n",
|
571 |
+
" color: var(--sklearn-color-text);\n",
|
572 |
+
" /* unfitted */\n",
|
573 |
+
" background-color: var(--sklearn-color-unfitted-level-0);\n",
|
574 |
+
"}\n",
|
575 |
+
"\n",
|
576 |
+
"#sk-container-id-1 div.sk-toggleable__content.fitted pre {\n",
|
577 |
+
" /* unfitted */\n",
|
578 |
+
" background-color: var(--sklearn-color-fitted-level-0);\n",
|
579 |
+
"}\n",
|
580 |
+
"\n",
|
581 |
+
"#sk-container-id-1 input.sk-toggleable__control:checked~div.sk-toggleable__content {\n",
|
582 |
+
" /* Expand drop-down */\n",
|
583 |
+
" max-height: 200px;\n",
|
584 |
+
" max-width: 100%;\n",
|
585 |
+
" overflow: auto;\n",
|
586 |
+
"}\n",
|
587 |
+
"\n",
|
588 |
+
"#sk-container-id-1 input.sk-toggleable__control:checked~label.sk-toggleable__label-arrow:before {\n",
|
589 |
+
" content: \"▾\";\n",
|
590 |
+
"}\n",
|
591 |
+
"\n",
|
592 |
+
"/* Pipeline/ColumnTransformer-specific style */\n",
|
593 |
+
"\n",
|
594 |
+
"#sk-container-id-1 div.sk-label input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
|
595 |
+
" color: var(--sklearn-color-text);\n",
|
596 |
+
" background-color: var(--sklearn-color-unfitted-level-2);\n",
|
597 |
+
"}\n",
|
598 |
+
"\n",
|
599 |
+
"#sk-container-id-1 div.sk-label.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
|
600 |
+
" background-color: var(--sklearn-color-fitted-level-2);\n",
|
601 |
+
"}\n",
|
602 |
+
"\n",
|
603 |
+
"/* Estimator-specific style */\n",
|
604 |
+
"\n",
|
605 |
+
"/* Colorize estimator box */\n",
|
606 |
+
"#sk-container-id-1 div.sk-estimator input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
|
607 |
+
" /* unfitted */\n",
|
608 |
+
" background-color: var(--sklearn-color-unfitted-level-2);\n",
|
609 |
+
"}\n",
|
610 |
+
"\n",
|
611 |
+
"#sk-container-id-1 div.sk-estimator.fitted input.sk-toggleable__control:checked~label.sk-toggleable__label {\n",
|
612 |
+
" /* fitted */\n",
|
613 |
+
" background-color: var(--sklearn-color-fitted-level-2);\n",
|
614 |
+
"}\n",
|
615 |
+
"\n",
|
616 |
+
"#sk-container-id-1 div.sk-label label.sk-toggleable__label,\n",
|
617 |
+
"#sk-container-id-1 div.sk-label label {\n",
|
618 |
+
" /* The background is the default theme color */\n",
|
619 |
+
" color: var(--sklearn-color-text-on-default-background);\n",
|
620 |
+
"}\n",
|
621 |
+
"\n",
|
622 |
+
"/* On hover, darken the color of the background */\n",
|
623 |
+
"#sk-container-id-1 div.sk-label:hover label.sk-toggleable__label {\n",
|
624 |
+
" color: var(--sklearn-color-text);\n",
|
625 |
+
" background-color: var(--sklearn-color-unfitted-level-2);\n",
|
626 |
+
"}\n",
|
627 |
+
"\n",
|
628 |
+
"/* Label box, darken color on hover, fitted */\n",
|
629 |
+
"#sk-container-id-1 div.sk-label.fitted:hover label.sk-toggleable__label.fitted {\n",
|
630 |
+
" color: var(--sklearn-color-text);\n",
|
631 |
+
" background-color: var(--sklearn-color-fitted-level-2);\n",
|
632 |
+
"}\n",
|
633 |
+
"\n",
|
634 |
+
"/* Estimator label */\n",
|
635 |
+
"\n",
|
636 |
+
"#sk-container-id-1 div.sk-label label {\n",
|
637 |
+
" font-family: monospace;\n",
|
638 |
+
" font-weight: bold;\n",
|
639 |
+
" display: inline-block;\n",
|
640 |
+
" line-height: 1.2em;\n",
|
641 |
+
"}\n",
|
642 |
+
"\n",
|
643 |
+
"#sk-container-id-1 div.sk-label-container {\n",
|
644 |
+
" text-align: center;\n",
|
645 |
+
"}\n",
|
646 |
+
"\n",
|
647 |
+
"/* Estimator-specific */\n",
|
648 |
+
"#sk-container-id-1 div.sk-estimator {\n",
|
649 |
+
" font-family: monospace;\n",
|
650 |
+
" border: 1px dotted var(--sklearn-color-border-box);\n",
|
651 |
+
" border-radius: 0.25em;\n",
|
652 |
+
" box-sizing: border-box;\n",
|
653 |
+
" margin-bottom: 0.5em;\n",
|
654 |
+
" /* unfitted */\n",
|
655 |
+
" background-color: var(--sklearn-color-unfitted-level-0);\n",
|
656 |
+
"}\n",
|
657 |
+
"\n",
|
658 |
+
"#sk-container-id-1 div.sk-estimator.fitted {\n",
|
659 |
+
" /* fitted */\n",
|
660 |
+
" background-color: var(--sklearn-color-fitted-level-0);\n",
|
661 |
+
"}\n",
|
662 |
+
"\n",
|
663 |
+
"/* on hover */\n",
|
664 |
+
"#sk-container-id-1 div.sk-estimator:hover {\n",
|
665 |
+
" /* unfitted */\n",
|
666 |
+
" background-color: var(--sklearn-color-unfitted-level-2);\n",
|
667 |
+
"}\n",
|
668 |
+
"\n",
|
669 |
+
"#sk-container-id-1 div.sk-estimator.fitted:hover {\n",
|
670 |
+
" /* fitted */\n",
|
671 |
+
" background-color: var(--sklearn-color-fitted-level-2);\n",
|
672 |
+
"}\n",
|
673 |
+
"\n",
|
674 |
+
"/* Specification for estimator info (e.g. \"i\" and \"?\") */\n",
|
675 |
+
"\n",
|
676 |
+
"/* Common style for \"i\" and \"?\" */\n",
|
677 |
+
"\n",
|
678 |
+
".sk-estimator-doc-link,\n",
|
679 |
+
"a:link.sk-estimator-doc-link,\n",
|
680 |
+
"a:visited.sk-estimator-doc-link {\n",
|
681 |
+
" float: right;\n",
|
682 |
+
" font-size: smaller;\n",
|
683 |
+
" line-height: 1em;\n",
|
684 |
+
" font-family: monospace;\n",
|
685 |
+
" background-color: var(--sklearn-color-background);\n",
|
686 |
+
" border-radius: 1em;\n",
|
687 |
+
" height: 1em;\n",
|
688 |
+
" width: 1em;\n",
|
689 |
+
" text-decoration: none !important;\n",
|
690 |
+
" margin-left: 1ex;\n",
|
691 |
+
" /* unfitted */\n",
|
692 |
+
" border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
|
693 |
+
" color: var(--sklearn-color-unfitted-level-1);\n",
|
694 |
+
"}\n",
|
695 |
+
"\n",
|
696 |
+
".sk-estimator-doc-link.fitted,\n",
|
697 |
+
"a:link.sk-estimator-doc-link.fitted,\n",
|
698 |
+
"a:visited.sk-estimator-doc-link.fitted {\n",
|
699 |
+
" /* fitted */\n",
|
700 |
+
" border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
|
701 |
+
" color: var(--sklearn-color-fitted-level-1);\n",
|
702 |
+
"}\n",
|
703 |
+
"\n",
|
704 |
+
"/* On hover */\n",
|
705 |
+
"div.sk-estimator:hover .sk-estimator-doc-link:hover,\n",
|
706 |
+
".sk-estimator-doc-link:hover,\n",
|
707 |
+
"div.sk-label-container:hover .sk-estimator-doc-link:hover,\n",
|
708 |
+
".sk-estimator-doc-link:hover {\n",
|
709 |
+
" /* unfitted */\n",
|
710 |
+
" background-color: var(--sklearn-color-unfitted-level-3);\n",
|
711 |
+
" color: var(--sklearn-color-background);\n",
|
712 |
+
" text-decoration: none;\n",
|
713 |
+
"}\n",
|
714 |
+
"\n",
|
715 |
+
"div.sk-estimator.fitted:hover .sk-estimator-doc-link.fitted:hover,\n",
|
716 |
+
".sk-estimator-doc-link.fitted:hover,\n",
|
717 |
+
"div.sk-label-container:hover .sk-estimator-doc-link.fitted:hover,\n",
|
718 |
+
".sk-estimator-doc-link.fitted:hover {\n",
|
719 |
+
" /* fitted */\n",
|
720 |
+
" background-color: var(--sklearn-color-fitted-level-3);\n",
|
721 |
+
" color: var(--sklearn-color-background);\n",
|
722 |
+
" text-decoration: none;\n",
|
723 |
+
"}\n",
|
724 |
+
"\n",
|
725 |
+
"/* Span, style for the box shown on hovering the info icon */\n",
|
726 |
+
".sk-estimator-doc-link span {\n",
|
727 |
+
" display: none;\n",
|
728 |
+
" z-index: 9999;\n",
|
729 |
+
" position: relative;\n",
|
730 |
+
" font-weight: normal;\n",
|
731 |
+
" right: .2ex;\n",
|
732 |
+
" padding: .5ex;\n",
|
733 |
+
" margin: .5ex;\n",
|
734 |
+
" width: min-content;\n",
|
735 |
+
" min-width: 20ex;\n",
|
736 |
+
" max-width: 50ex;\n",
|
737 |
+
" color: var(--sklearn-color-text);\n",
|
738 |
+
" box-shadow: 2pt 2pt 4pt #999;\n",
|
739 |
+
" /* unfitted */\n",
|
740 |
+
" background: var(--sklearn-color-unfitted-level-0);\n",
|
741 |
+
" border: .5pt solid var(--sklearn-color-unfitted-level-3);\n",
|
742 |
+
"}\n",
|
743 |
+
"\n",
|
744 |
+
".sk-estimator-doc-link.fitted span {\n",
|
745 |
+
" /* fitted */\n",
|
746 |
+
" background: var(--sklearn-color-fitted-level-0);\n",
|
747 |
+
" border: var(--sklearn-color-fitted-level-3);\n",
|
748 |
+
"}\n",
|
749 |
+
"\n",
|
750 |
+
".sk-estimator-doc-link:hover span {\n",
|
751 |
+
" display: block;\n",
|
752 |
+
"}\n",
|
753 |
+
"\n",
|
754 |
+
"/* \"?\"-specific style due to the `<a>` HTML tag */\n",
|
755 |
+
"\n",
|
756 |
+
"#sk-container-id-1 a.estimator_doc_link {\n",
|
757 |
+
" float: right;\n",
|
758 |
+
" font-size: 1rem;\n",
|
759 |
+
" line-height: 1em;\n",
|
760 |
+
" font-family: monospace;\n",
|
761 |
+
" background-color: var(--sklearn-color-background);\n",
|
762 |
+
" border-radius: 1rem;\n",
|
763 |
+
" height: 1rem;\n",
|
764 |
+
" width: 1rem;\n",
|
765 |
+
" text-decoration: none;\n",
|
766 |
+
" /* unfitted */\n",
|
767 |
+
" color: var(--sklearn-color-unfitted-level-1);\n",
|
768 |
+
" border: var(--sklearn-color-unfitted-level-1) 1pt solid;\n",
|
769 |
+
"}\n",
|
770 |
+
"\n",
|
771 |
+
"#sk-container-id-1 a.estimator_doc_link.fitted {\n",
|
772 |
+
" /* fitted */\n",
|
773 |
+
" border: var(--sklearn-color-fitted-level-1) 1pt solid;\n",
|
774 |
+
" color: var(--sklearn-color-fitted-level-1);\n",
|
775 |
+
"}\n",
|
776 |
+
"\n",
|
777 |
+
"/* On hover */\n",
|
778 |
+
"#sk-container-id-1 a.estimator_doc_link:hover {\n",
|
779 |
+
" /* unfitted */\n",
|
780 |
+
" background-color: var(--sklearn-color-unfitted-level-3);\n",
|
781 |
+
" color: var(--sklearn-color-background);\n",
|
782 |
+
" text-decoration: none;\n",
|
783 |
+
"}\n",
|
784 |
+
"\n",
|
785 |
+
"#sk-container-id-1 a.estimator_doc_link.fitted:hover {\n",
|
786 |
+
" /* fitted */\n",
|
787 |
+
" background-color: var(--sklearn-color-fitted-level-3);\n",
|
788 |
+
"}\n",
|
789 |
+
"</style><div id=\"sk-container-id-1\" class=\"sk-top-container\"><div class=\"sk-text-repr-fallback\"><pre>Pipeline(steps=[('preprocessor',\n",
|
790 |
+
" ColumnTransformer(transformers=[('num', StandardScaler(),\n",
|
791 |
+
" ['Mileage', 'Cylinder',\n",
|
792 |
+
" 'Liter', 'Doors']),\n",
|
793 |
+
" ('cat', OneHotEncoder(),\n",
|
794 |
+
" ['Make', 'Model', 'Trim',\n",
|
795 |
+
" 'Type'])])),\n",
|
796 |
+
" ('model', LinearRegression())])</pre><b>In a Jupyter environment, please rerun this cell to show the HTML representation or trust the notebook. <br />On GitHub, the HTML representation is unable to render, please try loading this page with nbviewer.org.</b></div><div class=\"sk-container\" hidden><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-1\" type=\"checkbox\" ><label for=\"sk-estimator-id-1\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\"> Pipeline<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.pipeline.Pipeline.html\">?<span>Documentation for Pipeline</span></a><span class=\"sk-estimator-doc-link fitted\">i<span>Fitted</span></span></label><div class=\"sk-toggleable__content fitted\"><pre>Pipeline(steps=[('preprocessor',\n",
|
797 |
+
" ColumnTransformer(transformers=[('num', StandardScaler(),\n",
|
798 |
+
" ['Mileage', 'Cylinder',\n",
|
799 |
+
" 'Liter', 'Doors']),\n",
|
800 |
+
" ('cat', OneHotEncoder(),\n",
|
801 |
+
" ['Make', 'Model', 'Trim',\n",
|
802 |
+
" 'Type'])])),\n",
|
803 |
+
" ('model', LinearRegression())])</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item sk-dashed-wrapped\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-2\" type=\"checkbox\" ><label for=\"sk-estimator-id-2\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\"> preprocessor: ColumnTransformer<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.compose.ColumnTransformer.html\">?<span>Documentation for preprocessor: ColumnTransformer</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>ColumnTransformer(transformers=[('num', StandardScaler(),\n",
|
804 |
+
" ['Mileage', 'Cylinder', 'Liter', 'Doors']),\n",
|
805 |
+
" ('cat', OneHotEncoder(),\n",
|
806 |
+
" ['Make', 'Model', 'Trim', 'Type'])])</pre></div> </div></div><div class=\"sk-parallel\"><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-3\" type=\"checkbox\" ><label for=\"sk-estimator-id-3\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">num</label><div class=\"sk-toggleable__content fitted\"><pre>['Mileage', 'Cylinder', 'Liter', 'Doors']</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-4\" type=\"checkbox\" ><label for=\"sk-estimator-id-4\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\"> StandardScaler<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.preprocessing.StandardScaler.html\">?<span>Documentation for StandardScaler</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>StandardScaler()</pre></div> </div></div></div></div></div><div class=\"sk-parallel-item\"><div class=\"sk-item\"><div class=\"sk-label-container\"><div class=\"sk-label fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-5\" type=\"checkbox\" ><label for=\"sk-estimator-id-5\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\">cat</label><div class=\"sk-toggleable__content fitted\"><pre>['Make', 'Model', 'Trim', 'Type']</pre></div> </div></div><div class=\"sk-serial\"><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-6\" type=\"checkbox\" ><label for=\"sk-estimator-id-6\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\"> OneHotEncoder<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.preprocessing.OneHotEncoder.html\">?<span>Documentation for OneHotEncoder</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>OneHotEncoder()</pre></div> </div></div></div></div></div></div></div><div class=\"sk-item\"><div class=\"sk-estimator fitted sk-toggleable\"><input class=\"sk-toggleable__control sk-hidden--visually\" id=\"sk-estimator-id-7\" type=\"checkbox\" ><label for=\"sk-estimator-id-7\" class=\"sk-toggleable__label fitted sk-toggleable__label-arrow fitted\"> LinearRegression<a class=\"sk-estimator-doc-link fitted\" rel=\"noreferrer\" target=\"_blank\" href=\"https://scikit-learn.org/1.4/modules/generated/sklearn.linear_model.LinearRegression.html\">?<span>Documentation for LinearRegression</span></a></label><div class=\"sk-toggleable__content fitted\"><pre>LinearRegression()</pre></div> </div></div></div></div></div></div>"
|
807 |
+
],
|
808 |
+
"text/plain": [
|
809 |
+
"Pipeline(steps=[('preprocessor',\n",
|
810 |
+
" ColumnTransformer(transformers=[('num', StandardScaler(),\n",
|
811 |
+
" ['Mileage', 'Cylinder',\n",
|
812 |
+
" 'Liter', 'Doors']),\n",
|
813 |
+
" ('cat', OneHotEncoder(),\n",
|
814 |
+
" ['Make', 'Model', 'Trim',\n",
|
815 |
+
" 'Type'])])),\n",
|
816 |
+
" ('model', LinearRegression())])"
|
817 |
+
]
|
818 |
+
},
|
819 |
+
"execution_count": 38,
|
820 |
+
"metadata": {},
|
821 |
+
"output_type": "execute_result"
|
822 |
+
}
|
823 |
+
],
|
824 |
+
"source": [
|
825 |
+
"pipe.fit(X_train,y_train)"
|
826 |
+
]
|
827 |
+
},
|
828 |
+
{
|
829 |
+
"cell_type": "code",
|
830 |
+
"execution_count": 40,
|
831 |
+
"id": "ed17767e-513f-43d2-b60b-27748d0a2836",
|
832 |
+
"metadata": {},
|
833 |
+
"outputs": [
|
834 |
+
{
|
835 |
+
"name": "stdout",
|
836 |
+
"output_type": "stream",
|
837 |
+
"text": [
|
838 |
+
"MSE 835.100716728648\n",
|
839 |
+
"R2 0.9912072828879327\n"
|
840 |
+
]
|
841 |
+
}
|
842 |
+
],
|
843 |
+
"source": [
|
844 |
+
"y_pred = pipe.predict(X_test)\n",
|
845 |
+
"print('MSE',mean_squared_error(y_test,y_pred)**0.5)\n",
|
846 |
+
"print('R2', r2_score(y_test,y_pred))\n"
|
847 |
+
]
|
848 |
+
},
|
849 |
+
{
|
850 |
+
"cell_type": "code",
|
851 |
+
"execution_count": 50,
|
852 |
+
"id": "2636e539-d6b3-4249-89c7-42b0413e70ed",
|
853 |
+
"metadata": {},
|
854 |
+
"outputs": [],
|
855 |
+
"source": [
|
856 |
+
"#istersek veri setinin tamamıyla tekrar eğitim yapabiliriz.\n",
|
857 |
+
"#pipe.fit(X,y)"
|
858 |
+
]
|
859 |
+
},
|
860 |
+
{
|
861 |
+
"cell_type": "markdown",
|
862 |
+
"id": "30719e98-9aad-4f7f-9baa-88ea94894e7e",
|
863 |
+
"metadata": {},
|
864 |
+
"source": [
|
865 |
+
"# streamlit ile modeli Deploy etme / Yayma / Kullanıma Sunma/ Mlops"
|
866 |
+
]
|
867 |
+
},
|
868 |
+
{
|
869 |
+
"cell_type": "code",
|
870 |
+
"execution_count": 45,
|
871 |
+
"id": "54b5657e-b40c-484c-a1d2-e1c52154a7fe",
|
872 |
+
"metadata": {
|
873 |
+
"collapsed": true,
|
874 |
+
"jupyter": {
|
875 |
+
"outputs_hidden": true
|
876 |
+
}
|
877 |
+
},
|
878 |
+
"outputs": [
|
879 |
+
{
|
880 |
+
"name": "stdout",
|
881 |
+
"output_type": "stream",
|
882 |
+
"text": [
|
883 |
+
"Collecting streamlit\n",
|
884 |
+
" Obtaining dependency information for streamlit from https://files.pythonhosted.org/packages/0e/86/69fdac2ec6852304bda08e5af5b72dfa6e74dc0b3cef0d7c1e19994388ae/streamlit-1.35.0-py2.py3-none-any.whl.metadata\n",
|
885 |
+
" Downloading streamlit-1.35.0-py2.py3-none-any.whl.metadata (8.5 kB)\n",
|
886 |
+
"Requirement already satisfied: altair<6,>=4.0 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from streamlit) (5.3.0)\n",
|
887 |
+
"Collecting blinker<2,>=1.0.0 (from streamlit)\n",
|
888 |
+
" Obtaining dependency information for blinker<2,>=1.0.0 from https://files.pythonhosted.org/packages/bb/2a/10164ed1f31196a2f7f3799368a821765c62851ead0e630ab52b8e14b4d0/blinker-1.8.2-py3-none-any.whl.metadata\n",
|
889 |
+
" Using cached blinker-1.8.2-py3-none-any.whl.metadata (1.6 kB)\n",
|
890 |
+
"Collecting cachetools<6,>=4.0 (from streamlit)\n",
|
891 |
+
" Obtaining dependency information for cachetools<6,>=4.0 from https://files.pythonhosted.org/packages/fb/2b/a64c2d25a37aeb921fddb929111413049fc5f8b9a4c1aefaffaafe768d54/cachetools-5.3.3-py3-none-any.whl.metadata\n",
|
892 |
+
" Downloading cachetools-5.3.3-py3-none-any.whl.metadata (5.3 kB)\n",
|
893 |
+
"Requirement already satisfied: click<9,>=7.0 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from streamlit) (8.1.7)\n",
|
894 |
+
"Requirement already satisfied: numpy<2,>=1.19.3 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from streamlit) (1.26.4)\n",
|
895 |
+
"Requirement already satisfied: packaging<25,>=16.8 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from streamlit) (23.2)\n",
|
896 |
+
"Requirement already satisfied: pandas<3,>=1.3.0 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from streamlit) (2.0.3)\n",
|
897 |
+
"Requirement already satisfied: pillow<11,>=7.1.0 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from streamlit) (10.3.0)\n",
|
898 |
+
"Requirement already satisfied: protobuf<5,>=3.20 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from streamlit) (4.21.12)\n",
|
899 |
+
"Requirement already satisfied: pyarrow>=7.0 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from streamlit) (14.0.2)\n",
|
900 |
+
"Requirement already satisfied: requests<3,>=2.27 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from streamlit) (2.32.2)\n",
|
901 |
+
"Collecting rich<14,>=10.14.0 (from streamlit)\n",
|
902 |
+
" Obtaining dependency information for rich<14,>=10.14.0 from https://files.pythonhosted.org/packages/87/67/a37f6214d0e9fe57f6ae54b2956d550ca8365857f42a1ce0392bb21d9410/rich-13.7.1-py3-none-any.whl.metadata\n",
|
903 |
+
" Downloading rich-13.7.1-py3-none-any.whl.metadata (18 kB)\n",
|
904 |
+
"Collecting tenacity<9,>=8.1.0 (from streamlit)\n",
|
905 |
+
" Obtaining dependency information for tenacity<9,>=8.1.0 from https://files.pythonhosted.org/packages/61/a1/6bb0cbebefb23641f068bb58a2bc56da9beb2b1c550242e3c540b37698f3/tenacity-8.3.0-py3-none-any.whl.metadata\n",
|
906 |
+
" Downloading tenacity-8.3.0-py3-none-any.whl.metadata (1.2 kB)\n",
|
907 |
+
"Requirement already satisfied: toml<2,>=0.10.1 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from streamlit) (0.10.2)\n",
|
908 |
+
"Requirement already satisfied: typing-extensions<5,>=4.3.0 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from streamlit) (4.11.0)\n",
|
909 |
+
"Collecting gitpython!=3.1.19,<4,>=3.0.7 (from streamlit)\n",
|
910 |
+
" Obtaining dependency information for gitpython!=3.1.19,<4,>=3.0.7 from https://files.pythonhosted.org/packages/e9/bd/cc3a402a6439c15c3d4294333e13042b915bbeab54edc457c723931fed3f/GitPython-3.1.43-py3-none-any.whl.metadata\n",
|
911 |
+
" Downloading GitPython-3.1.43-py3-none-any.whl.metadata (13 kB)\n",
|
912 |
+
"Collecting pydeck<1,>=0.8.0b4 (from streamlit)\n",
|
913 |
+
" Obtaining dependency information for pydeck<1,>=0.8.0b4 from https://files.pythonhosted.org/packages/ab/4c/b888e6cf58bd9db9c93f40d1c6be8283ff49d88919231afe93a6bcf61626/pydeck-0.9.1-py2.py3-none-any.whl.metadata\n",
|
914 |
+
" Downloading pydeck-0.9.1-py2.py3-none-any.whl.metadata (4.1 kB)\n",
|
915 |
+
"Requirement already satisfied: tornado<7,>=6.0.3 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from streamlit) (6.3.3)\n",
|
916 |
+
"Collecting watchdog>=2.1.5 (from streamlit)\n",
|
917 |
+
" Obtaining dependency information for watchdog>=2.1.5 from https://files.pythonhosted.org/packages/85/e0/2a9f43008902427b5f074c497705d6ef8f815c85d4bc25fbf83f720a6159/watchdog-4.0.1-py3-none-win_amd64.whl.metadata\n",
|
918 |
+
" Downloading watchdog-4.0.1-py3-none-win_amd64.whl.metadata (37 kB)\n",
|
919 |
+
"Requirement already satisfied: jinja2 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from altair<6,>=4.0->streamlit) (3.1.4)\n",
|
920 |
+
"Requirement already satisfied: jsonschema>=3.0 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from altair<6,>=4.0->streamlit) (4.19.2)\n",
|
921 |
+
"Requirement already satisfied: toolz in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from altair<6,>=4.0->streamlit) (0.12.0)\n",
|
922 |
+
"Requirement already satisfied: colorama in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from click<9,>=7.0->streamlit) (0.4.6)\n",
|
923 |
+
"Collecting gitdb<5,>=4.0.1 (from gitpython!=3.1.19,<4,>=3.0.7->streamlit)\n",
|
924 |
+
" Obtaining dependency information for gitdb<5,>=4.0.1 from https://files.pythonhosted.org/packages/fd/5b/8f0c4a5bb9fd491c277c21eff7ccae71b47d43c4446c9d0c6cff2fe8c2c4/gitdb-4.0.11-py3-none-any.whl.metadata\n",
|
925 |
+
" Downloading gitdb-4.0.11-py3-none-any.whl.metadata (1.2 kB)\n",
|
926 |
+
"Requirement already satisfied: python-dateutil>=2.8.2 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from pandas<3,>=1.3.0->streamlit) (2.9.0.post0)\n",
|
927 |
+
"Requirement already satisfied: pytz>=2020.1 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from pandas<3,>=1.3.0->streamlit) (2024.1)\n",
|
928 |
+
"Requirement already satisfied: tzdata>=2022.1 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from pandas<3,>=1.3.0->streamlit) (2023.3)\n",
|
929 |
+
"Requirement already satisfied: charset-normalizer<4,>=2 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from requests<3,>=2.27->streamlit) (2.0.4)\n",
|
930 |
+
"Requirement already satisfied: idna<4,>=2.5 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from requests<3,>=2.27->streamlit) (3.7)\n",
|
931 |
+
"Requirement already satisfied: urllib3<3,>=1.21.1 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from requests<3,>=2.27->streamlit) (2.0.3)\n",
|
932 |
+
"Requirement already satisfied: certifi>=2017.4.17 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from requests<3,>=2.27->streamlit) (2024.6.2)\n",
|
933 |
+
"Collecting markdown-it-py>=2.2.0 (from rich<14,>=10.14.0->streamlit)\n",
|
934 |
+
" Obtaining dependency information for markdown-it-py>=2.2.0 from https://files.pythonhosted.org/packages/42/d7/1ec15b46af6af88f19b8e5ffea08fa375d433c998b8a7639e76935c14f1f/markdown_it_py-3.0.0-py3-none-any.whl.metadata\n",
|
935 |
+
" Downloading markdown_it_py-3.0.0-py3-none-any.whl.metadata (6.9 kB)\n",
|
936 |
+
"Requirement already satisfied: pygments<3.0.0,>=2.13.0 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from rich<14,>=10.14.0->streamlit) (2.15.1)\n",
|
937 |
+
"Collecting smmap<6,>=3.0.1 (from gitdb<5,>=4.0.1->gitpython!=3.1.19,<4,>=3.0.7->streamlit)\n",
|
938 |
+
" Obtaining dependency information for smmap<6,>=3.0.1 from https://files.pythonhosted.org/packages/a7/a5/10f97f73544edcdef54409f1d839f6049a0d79df68adbc1ceb24d1aaca42/smmap-5.0.1-py3-none-any.whl.metadata\n",
|
939 |
+
" Downloading smmap-5.0.1-py3-none-any.whl.metadata (4.3 kB)\n",
|
940 |
+
"Requirement already satisfied: MarkupSafe>=2.0 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from jinja2->altair<6,>=4.0->streamlit) (2.1.3)\n",
|
941 |
+
"Requirement already satisfied: attrs>=22.2.0 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit) (23.1.0)\n",
|
942 |
+
"Requirement already satisfied: jsonschema-specifications>=2023.03.6 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit) (2023.7.1)\n",
|
943 |
+
"Requirement already satisfied: referencing>=0.28.4 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit) (0.30.2)\n",
|
944 |
+
"Requirement already satisfied: rpds-py>=0.7.1 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from jsonschema>=3.0->altair<6,>=4.0->streamlit) (0.10.6)\n",
|
945 |
+
"Collecting mdurl~=0.1 (from markdown-it-py>=2.2.0->rich<14,>=10.14.0->streamlit)\n",
|
946 |
+
" Obtaining dependency information for mdurl~=0.1 from https://files.pythonhosted.org/packages/b3/38/89ba8ad64ae25be8de66a6d463314cf1eb366222074cfda9ee839c56a4b4/mdurl-0.1.2-py3-none-any.whl.metadata\n",
|
947 |
+
" Downloading mdurl-0.1.2-py3-none-any.whl.metadata (1.6 kB)\n",
|
948 |
+
"Requirement already satisfied: six>=1.5 in c:\\users\\erayc\\anaconda3\\lib\\site-packages (from python-dateutil>=2.8.2->pandas<3,>=1.3.0->streamlit) (1.16.0)\n",
|
949 |
+
"Downloading streamlit-1.35.0-py2.py3-none-any.whl (8.6 MB)\n",
|
950 |
+
" ---------------------------------------- 0.0/8.6 MB ? eta -:--:--\n",
|
951 |
+
" ---------------------------------------- 0.0/8.6 MB 1.4 MB/s eta 0:00:07\n",
|
952 |
+
" ---------------------------------------- 0.1/8.6 MB 919.0 kB/s eta 0:00:10\n",
|
953 |
+
" ---------------------------------------- 0.1/8.6 MB 919.0 kB/s eta 0:00:10\n",
|
954 |
+
" --------------------------------------- 0.2/8.6 MB 919.0 kB/s eta 0:00:10\n",
|
955 |
+
" --------------------------------------- 0.2/8.6 MB 958.4 kB/s eta 0:00:09\n",
|
956 |
+
" --------------------------------------- 0.2/8.6 MB 958.4 kB/s eta 0:00:09\n",
|
957 |
+
" - -------------------------------------- 0.2/8.6 MB 801.7 kB/s eta 0:00:11\n",
|
958 |
+
" - -------------------------------------- 0.3/8.6 MB 780.5 kB/s eta 0:00:11\n",
|
959 |
+
" - -------------------------------------- 0.3/8.6 MB 780.5 kB/s eta 0:00:11\n",
|
960 |
+
" - -------------------------------------- 0.3/8.6 MB 780.5 kB/s eta 0:00:11\n",
|
961 |
+
" - -------------------------------------- 0.3/8.6 MB 611.3 kB/s eta 0:00:14\n",
|
962 |
+
" - -------------------------------------- 0.3/8.6 MB 611.3 kB/s eta 0:00:14\n",
|
963 |
+
" - -------------------------------------- 0.3/8.6 MB 534.4 kB/s eta 0:00:16\n",
|
964 |
+
" - -------------------------------------- 0.3/8.6 MB 534.4 kB/s eta 0:00:16\n",
|
965 |
+
" - -------------------------------------- 0.4/8.6 MB 594.3 kB/s eta 0:00:14\n",
|
966 |
+
" -- ------------------------------------- 0.5/8.6 MB 640.9 kB/s eta 0:00:13\n",
|
967 |
+
" -- ------------------------------------- 0.5/8.6 MB 640.9 kB/s eta 0:00:13\n",
|
968 |
+
" -- ------------------------------------- 0.5/8.6 MB 581.3 kB/s eta 0:00:14\n",
|
969 |
+
" -- ------------------------------------- 0.5/8.6 MB 618.8 kB/s eta 0:00:14\n",
|
970 |
+
" -- ------------------------------------- 0.6/8.6 MB 610.8 kB/s eta 0:00:14\n",
|
971 |
+
" --- ------------------------------------ 0.7/8.6 MB 698.4 kB/s eta 0:00:12\n",
|
972 |
+
" --- ------------------------------------ 0.7/8.6 MB 686.1 kB/s eta 0:00:12\n",
|
973 |
+
" --- ------------------------------------ 0.7/8.6 MB 686.1 kB/s eta 0:00:12\n",
|
974 |
+
" --- ------------------------------------ 0.7/8.6 MB 684.6 kB/s eta 0:00:12\n",
|
975 |
+
" --- ------------------------------------ 0.8/8.6 MB 691.8 kB/s eta 0:00:12\n",
|
976 |
+
" --- ------------------------------------ 0.8/8.6 MB 691.8 kB/s eta 0:00:12\n",
|
977 |
+
" --- ------------------------------------ 0.8/8.6 MB 691.8 kB/s eta 0:00:12\n",
|
978 |
+
" ---- ----------------------------------- 0.9/8.6 MB 695.5 kB/s eta 0:00:12\n",
|
979 |
+
" ---- ----------------------------------- 0.9/8.6 MB 695.5 kB/s eta 0:00:12\n",
|
980 |
+
" ---- ----------------------------------- 1.0/8.6 MB 730.9 kB/s eta 0:00:11\n",
|
981 |
+
" ---- ----------------------------------- 1.1/8.6 MB 750.2 kB/s eta 0:00:11\n",
|
982 |
+
" ----- ---------------------------------- 1.1/8.6 MB 740.0 kB/s eta 0:00:11\n",
|
983 |
+
" ----- ---------------------------------- 1.1/8.6 MB 745.2 kB/s eta 0:00:11\n",
|
984 |
+
" ----- ---------------------------------- 1.1/8.6 MB 745.2 kB/s eta 0:00:11\n",
|
985 |
+
" ----- ---------------------------------- 1.1/8.6 MB 745.2 kB/s eta 0:00:11\n",
|
986 |
+
" ----- ---------------------------------- 1.1/8.6 MB 745.2 kB/s eta 0:00:11\n",
|
987 |
+
" ----- ---------------------------------- 1.1/8.6 MB 745.2 kB/s eta 0:00:11\n",
|
988 |
+
" ----- ---------------------------------- 1.1/8.6 MB 745.2 kB/s eta 0:00:11\n",
|
989 |
+
" ----- ---------------------------------- 1.1/8.6 MB 745.2 kB/s eta 0:00:11\n",
|
990 |
+
" ----- ---------------------------------- 1.1/8.6 MB 627.3 kB/s eta 0:00:12\n",
|
991 |
+
" ----- ---------------------------------- 1.1/8.6 MB 627.3 kB/s eta 0:00:12\n",
|
992 |
+
" ----- ---------------------------------- 1.2/8.6 MB 602.0 kB/s eta 0:00:13\n",
|
993 |
+
" ----- ---------------------------------- 1.2/8.6 MB 613.2 kB/s eta 0:00:13\n",
|
994 |
+
" ----- ---------------------------------- 1.2/8.6 MB 613.2 kB/s eta 0:00:13\n",
|
995 |
+
" ----- ---------------------------------- 1.3/8.6 MB 615.3 kB/s eta 0:00:12\n",
|
996 |
+
" ------ --------------------------------- 1.3/8.6 MB 607.2 kB/s eta 0:00:12\n",
|
997 |
+
" ------ --------------------------------- 1.4/8.6 MB 622.2 kB/s eta 0:00:12\n",
|
998 |
+
" ------ --------------------------------- 1.4/8.6 MB 646.1 kB/s eta 0:00:12\n",
|
999 |
+
" ------ --------------------------------- 1.4/8.6 MB 646.1 kB/s eta 0:00:12\n",
|
1000 |
+
" ------ --------------------------------- 1.4/8.6 MB 646.1 kB/s eta 0:00:12\n",
|
1001 |
+
" ------ --------------------------------- 1.5/8.6 MB 633.4 kB/s eta 0:00:12\n",
|
1002 |
+
" ------ --------------------------------- 1.5/8.6 MB 633.4 kB/s eta 0:00:12\n",
|
1003 |
+
" ------ --------------------------------- 1.5/8.6 MB 633.4 kB/s eta 0:00:12\n",
|
1004 |
+
" ------ --------------------------------- 1.5/8.6 MB 633.4 kB/s eta 0:00:12\n",
|
1005 |
+
" ------- -------------------------------- 1.5/8.6 MB 606.9 kB/s eta 0:00:12\n",
|
1006 |
+
" ------- -------------------------------- 1.6/8.6 MB 615.1 kB/s eta 0:00:12\n",
|
1007 |
+
" ------- -------------------------------- 1.6/8.6 MB 608.4 kB/s eta 0:00:12\n",
|
1008 |
+
" ------- -------------------------------- 1.6/8.6 MB 608.4 kB/s eta 0:00:12\n",
|
1009 |
+
" ------- -------------------------------- 1.6/8.6 MB 598.8 kB/s eta 0:00:12\n",
|
1010 |
+
" ------- -------------------------------- 1.7/8.6 MB 610.5 kB/s eta 0:00:12\n",
|
1011 |
+
" ------- -------------------------------- 1.7/8.6 MB 610.5 kB/s eta 0:00:12\n",
|
1012 |
+
" -------- ------------------------------- 1.7/8.6 MB 601.3 kB/s eta 0:00:12\n",
|
1013 |
+
" -------- ------------------------------- 1.7/8.6 MB 601.3 kB/s eta 0:00:12\n",
|
1014 |
+
" -------- ------------------------------- 1.7/8.6 MB 601.3 kB/s eta 0:00:12\n",
|
1015 |
+
" -------- ------------------------------- 1.7/8.6 MB 582.9 kB/s eta 0:00:12\n",
|
1016 |
+
" -------- ------------------------------- 1.8/8.6 MB 588.1 kB/s eta 0:00:12\n",
|
1017 |
+
" -------- ------------------------------- 1.8/8.6 MB 598.6 kB/s eta 0:00:12\n",
|
1018 |
+
" -------- ------------------------------- 1.9/8.6 MB 596.8 kB/s eta 0:00:12\n",
|
1019 |
+
" -------- ------------------------------- 1.9/8.6 MB 594.4 kB/s eta 0:00:12\n",
|
1020 |
+
" -------- ------------------------------- 1.9/8.6 MB 594.4 kB/s eta 0:00:12\n",
|
1021 |
+
" -------- ------------------------------- 1.9/8.6 MB 594.4 kB/s eta 0:00:12\n",
|
1022 |
+
" --------- ------------------------------ 2.0/8.6 MB 590.1 kB/s eta 0:00:12\n",
|
1023 |
+
" --------- ------------------------------ 2.0/8.6 MB 590.1 kB/s eta 0:00:12\n",
|
1024 |
+
" --------- ------------------------------ 2.0/8.6 MB 601.1 kB/s eta 0:00:11\n",
|
1025 |
+
" ---------- ----------------------------- 2.2/8.6 MB 628.7 kB/s eta 0:00:11\n",
|
1026 |
+
" ---------- ----------------------------- 2.2/8.6 MB 637.8 kB/s eta 0:00:10\n",
|
1027 |
+
" ---------- ----------------------------- 2.3/8.6 MB 641.1 kB/s eta 0:00:10\n",
|
1028 |
+
" ----------- ---------------------------- 2.4/8.6 MB 672.4 kB/s eta 0:00:10\n",
|
1029 |
+
" ----------- ---------------------------- 2.5/8.6 MB 678.1 kB/s eta 0:00:10\n",
|
1030 |
+
" ------------ --------------------------- 2.6/8.6 MB 708.2 kB/s eta 0:00:09\n",
|
1031 |
+
" ------------ --------------------------- 2.7/8.6 MB 719.0 kB/s eta 0:00:09\n",
|
1032 |
+
" ------------ --------------------------- 2.7/8.6 MB 719.0 kB/s eta 0:00:09\n",
|
1033 |
+
" ------------ --------------------------- 2.8/8.6 MB 716.9 kB/s eta 0:00:09\n",
|
1034 |
+
" ------------ --------------------------- 2.8/8.6 MB 716.9 kB/s eta 0:00:09\n",
|
1035 |
+
" ------------ --------------------------- 2.8/8.6 MB 716.9 kB/s eta 0:00:09\n",
|
1036 |
+
" ------------ --------------------------- 2.8/8.6 MB 716.9 kB/s eta 0:00:09\n",
|
1037 |
+
" ------------- -------------------------- 2.8/8.6 MB 703.9 kB/s eta 0:00:09\n",
|
1038 |
+
" ------------- -------------------------- 2.8/8.6 MB 703.9 kB/s eta 0:00:09\n",
|
1039 |
+
" ------------- -------------------------- 2.9/8.6 MB 707.8 kB/s eta 0:00:09\n",
|
1040 |
+
" ------------- -------------------------- 2.9/8.6 MB 707.8 kB/s eta 0:00:09\n",
|
1041 |
+
" ------------- -------------------------- 3.0/8.6 MB 711.4 kB/s eta 0:00:08\n",
|
1042 |
+
" -------------- ------------------------- 3.0/8.6 MB 716.0 kB/s eta 0:00:08\n",
|
1043 |
+
" -------------- ------------------------- 3.0/8.6 MB 716.0 kB/s eta 0:00:08\n",
|
1044 |
+
" -------------- ------------------------- 3.0/8.6 MB 716.0 kB/s eta 0:00:08\n",
|
1045 |
+
" -------------- ------------------------- 3.1/8.6 MB 704.4 kB/s eta 0:00:08\n",
|
1046 |
+
" -------------- ------------------------- 3.1/8.6 MB 704.4 kB/s eta 0:00:08\n",
|
1047 |
+
" -------------- ------------------------- 3.2/8.6 MB 703.4 kB/s eta 0:00:08\n",
|
1048 |
+
" --------------- ------------------------ 3.3/8.6 MB 718.7 kB/s eta 0:00:08\n",
|
1049 |
+
" --------------- ------------------------ 3.3/8.6 MB 718.7 kB/s eta 0:00:08\n",
|
1050 |
+
" --------------- ------------------------ 3.4/8.6 MB 728.9 kB/s eta 0:00:08\n",
|
1051 |
+
" --------------- ------------------------ 3.4/8.6 MB 728.0 kB/s eta 0:00:08\n",
|
1052 |
+
" ---------------- ----------------------- 3.5/8.6 MB 736.3 kB/s eta 0:00:07\n",
|
1053 |
+
" ---------------- ----------------------- 3.6/8.6 MB 754.5 kB/s eta 0:00:07\n",
|
1054 |
+
" ---------------- ----------------------- 3.6/8.6 MB 754.5 kB/s eta 0:00:07\n",
|
1055 |
+
" ----------------- ---------------------- 3.8/8.6 MB 773.4 kB/s eta 0:00:07\n",
|
1056 |
+
" ----------------- ---------------------- 3.8/8.6 MB 781.4 kB/s eta 0:00:07\n",
|
1057 |
+
" ----------------- ---------------------- 3.8/8.6 MB 781.4 kB/s eta 0:00:07\n",
|
1058 |
+
" ----------------- ---------------------- 3.9/8.6 MB 775.3 kB/s eta 0:00:07\n",
|
1059 |
+
" ------------------ --------------------- 3.9/8.6 MB 777.5 kB/s eta 0:00:06\n",
|
1060 |
+
" ------------------ --------------------- 4.0/8.6 MB 787.2 kB/s eta 0:00:06\n",
|
1061 |
+
" ------------------ --------------------- 4.1/8.6 MB 791.7 kB/s eta 0:00:06\n",
|
1062 |
+
" ------------------ --------------------- 4.1/8.6 MB 791.7 kB/s eta 0:00:06\n",
|
1063 |
+
" ------------------ --------------------- 4.1/8.6 MB 791.7 kB/s eta 0:00:06\n",
|
1064 |
+
" ------------------- -------------------- 4.2/8.6 MB 789.6 kB/s eta 0:00:06\n",
|
1065 |
+
" -------------------- ------------------- 4.3/8.6 MB 813.5 kB/s eta 0:00:06\n",
|
1066 |
+
" -------------------- ------------------- 4.4/8.6 MB 823.6 kB/s eta 0:00:06\n",
|
1067 |
+
" -------------------- ------------------- 4.4/8.6 MB 824.9 kB/s eta 0:00:06\n",
|
1068 |
+
" --------------------- ------------------ 4.5/8.6 MB 825.7 kB/s eta 0:00:05\n",
|
1069 |
+
" --------------------- ------------------ 4.6/8.6 MB 832.8 kB/s eta 0:00:05\n",
|
1070 |
+
" --------------------- ------------------ 4.6/8.6 MB 832.8 kB/s eta 0:00:05\n",
|
1071 |
+
" --------------------- ------------------ 4.6/8.6 MB 827.4 kB/s eta 0:00:05\n",
|
1072 |
+
" --------------------- ------------------ 4.6/8.6 MB 827.4 kB/s eta 0:00:05\n",
|
1073 |
+
" --------------------- ------------------ 4.6/8.6 MB 827.4 kB/s eta 0:00:05\n",
|
1074 |
+
" --------------------- ------------------ 4.7/8.6 MB 810.3 kB/s eta 0:00:05\n",
|
1075 |
+
" --------------------- ------------------ 4.7/8.6 MB 817.4 kB/s eta 0:00:05\n",
|
1076 |
+
" --------------------- ------------------ 4.7/8.6 MB 817.4 kB/s eta 0:00:05\n",
|
1077 |
+
" ---------------------- ----------------- 4.8/8.6 MB 807.0 kB/s eta 0:00:05\n",
|
1078 |
+
" ---------------------- ----------------- 4.8/8.6 MB 808.4 kB/s eta 0:00:05\n",
|
1079 |
+
" ---------------------- ----------------- 4.9/8.6 MB 811.4 kB/s eta 0:00:05\n",
|
1080 |
+
" ---------------------- ----------------- 4.9/8.6 MB 808.6 kB/s eta 0:00:05\n",
|
1081 |
+
" ----------------------- ---------------- 5.0/8.6 MB 826.0 kB/s eta 0:00:05\n",
|
1082 |
+
" ----------------------- ---------------- 5.1/8.6 MB 836.4 kB/s eta 0:00:05\n",
|
1083 |
+
" ------------------------ --------------- 5.2/8.6 MB 850.6 kB/s eta 0:00:04\n",
|
1084 |
+
" ------------------------ --------------- 5.2/8.6 MB 850.6 kB/s eta 0:00:04\n",
|
1085 |
+
" ------------------------ --------------- 5.3/8.6 MB 847.6 kB/s eta 0:00:04\n",
|
1086 |
+
" ------------------------- -------------- 5.5/8.6 MB 870.0 kB/s eta 0:00:04\n",
|
1087 |
+
" ------------------------- -------------- 5.5/8.6 MB 872.2 kB/s eta 0:00:04\n",
|
1088 |
+
" ------------------------- -------------- 5.5/8.6 MB 872.2 kB/s eta 0:00:04\n",
|
1089 |
+
" -------------------------- ------------- 5.6/8.6 MB 871.8 kB/s eta 0:00:04\n",
|
1090 |
+
" -------------------------- ------------- 5.7/8.6 MB 880.7 kB/s eta 0:00:04\n",
|
1091 |
+
" -------------------------- ------------- 5.8/8.6 MB 886.9 kB/s eta 0:00:04\n",
|
1092 |
+
" --------------------------- ------------ 5.9/8.6 MB 888.9 kB/s eta 0:00:04\n",
|
1093 |
+
" --------------------------- ------------ 5.9/8.6 MB 890.4 kB/s eta 0:00:04\n",
|
1094 |
+
" ---------------------------- ----------- 6.0/8.6 MB 903.1 kB/s eta 0:00:03\n",
|
1095 |
+
" ---------------------------- ----------- 6.1/8.6 MB 901.3 kB/s eta 0:00:03\n",
|
1096 |
+
" ---------------------------- ----------- 6.1/8.6 MB 899.6 kB/s eta 0:00:03\n",
|
1097 |
+
" ---------------------------- ----------- 6.2/8.6 MB 908.0 kB/s eta 0:00:03\n",
|
1098 |
+
" ---------------------------- ----------- 6.2/8.6 MB 908.0 kB/s eta 0:00:03\n",
|
1099 |
+
" ----------------------------- ---------- 6.3/8.6 MB 911.5 kB/s eta 0:00:03\n",
|
1100 |
+
" ----------------------------- ---------- 6.4/8.6 MB 918.2 kB/s eta 0:00:03\n",
|
1101 |
+
" ----------------------------- ---------- 6.4/8.6 MB 919.3 kB/s eta 0:00:03\n",
|
1102 |
+
" ------------------------------ --------- 6.5/8.6 MB 926.3 kB/s eta 0:00:03\n",
|
1103 |
+
" ------------------------------- -------- 6.7/8.6 MB 946.2 kB/s eta 0:00:02\n",
|
1104 |
+
" ------------------------------- -------- 6.8/8.6 MB 957.9 kB/s eta 0:00:02\n",
|
1105 |
+
" ------------------------------- -------- 6.8/8.6 MB 957.9 kB/s eta 0:00:02\n",
|
1106 |
+
" ------------------------------- -------- 6.8/8.6 MB 957.9 kB/s eta 0:00:02\n",
|
1107 |
+
" ------------------------------- -------- 6.8/8.6 MB 957.9 kB/s eta 0:00:02\n",
|
1108 |
+
" -------------------------------- ------- 6.9/8.6 MB 944.4 kB/s eta 0:00:02\n",
|
1109 |
+
" -------------------------------- ------- 7.0/8.6 MB 945.4 kB/s eta 0:00:02\n",
|
1110 |
+
" -------------------------------- ------- 7.0/8.6 MB 948.5 kB/s eta 0:00:02\n",
|
1111 |
+
" --------------------------------- ------ 7.1/8.6 MB 953.4 kB/s eta 0:00:02\n",
|
1112 |
+
" --------------------------------- ------ 7.1/8.6 MB 953.4 kB/s eta 0:00:02\n",
|
1113 |
+
" --------------------------------- ------ 7.1/8.6 MB 943.0 kB/s eta 0:00:02\n",
|
1114 |
+
" --------------------------------- ------ 7.2/8.6 MB 950.6 kB/s eta 0:00:02\n",
|
1115 |
+
" --------------------------------- ------ 7.2/8.6 MB 946.8 kB/s eta 0:00:02\n",
|
1116 |
+
" --------------------------------- ------ 7.3/8.6 MB 947.1 kB/s eta 0:00:02\n",
|
1117 |
+
" ---------------------------------- ----- 7.3/8.6 MB 949.8 kB/s eta 0:00:02\n",
|
1118 |
+
" ---------------------------------- ----- 7.3/8.6 MB 949.8 kB/s eta 0:00:02\n",
|
1119 |
+
" ---------------------------------- ----- 7.3/8.6 MB 949.8 kB/s eta 0:00:02\n",
|
1120 |
+
" ---------------------------------- ----- 7.4/8.6 MB 942.0 kB/s eta 0:00:02\n",
|
1121 |
+
" ---------------------------------- ----- 7.5/8.6 MB 941.6 kB/s eta 0:00:02\n",
|
1122 |
+
" ----------------------------------- ---- 7.5/8.6 MB 946.4 kB/s eta 0:00:02\n",
|
1123 |
+
" ----------------------------------- ---- 7.5/8.6 MB 946.4 kB/s eta 0:00:02\n",
|
1124 |
+
" ----------------------------------- ---- 7.6/8.6 MB 944.2 kB/s eta 0:00:02\n",
|
1125 |
+
" ----------------------------------- ---- 7.6/8.6 MB 944.4 kB/s eta 0:00:01\n",
|
1126 |
+
" ------------------------------------ --- 7.7/8.6 MB 947.9 kB/s eta 0:00:01\n",
|
1127 |
+
" ------------------------------------ --- 7.8/8.6 MB 957.3 kB/s eta 0:00:01\n",
|
1128 |
+
" ------------------------------------ --- 7.8/8.6 MB 957.3 kB/s eta 0:00:01\n",
|
1129 |
+
" ------------------------------------ --- 7.9/8.6 MB 956.5 kB/s eta 0:00:01\n",
|
1130 |
+
" ------------------------------------ --- 7.9/8.6 MB 951.7 kB/s eta 0:00:01\n",
|
1131 |
+
" ------------------------------------- -- 8.0/8.6 MB 951.8 kB/s eta 0:00:01\n",
|
1132 |
+
" ------------------------------------- -- 8.2/8.6 MB 964.9 kB/s eta 0:00:01\n",
|
1133 |
+
" --------------------------------------- 8.4/8.6 MB 986.1 kB/s eta 0:00:01\n",
|
1134 |
+
" --------------------------------------- 8.5/8.6 MB 994.5 kB/s eta 0:00:01\n",
|
1135 |
+
" --------------------------------------- 8.5/8.6 MB 993.9 kB/s eta 0:00:01\n",
|
1136 |
+
" --------------------------------------- 8.5/8.6 MB 993.9 kB/s eta 0:00:01\n",
|
1137 |
+
" --------------------------------------- 8.6/8.6 MB 987.8 kB/s eta 0:00:01\n",
|
1138 |
+
" --------------------------------------- 8.6/8.6 MB 984.8 kB/s eta 0:00:01\n",
|
1139 |
+
" ---------------------------------------- 8.6/8.6 MB 983.0 kB/s eta 0:00:00\n",
|
1140 |
+
"Using cached blinker-1.8.2-py3-none-any.whl (9.5 kB)\n",
|
1141 |
+
"Downloading cachetools-5.3.3-py3-none-any.whl (9.3 kB)\n",
|
1142 |
+
"Downloading GitPython-3.1.43-py3-none-any.whl (207 kB)\n",
|
1143 |
+
" ---------------------------------------- 0.0/207.3 kB ? eta -:--:--\n",
|
1144 |
+
" ----------------- ---------------------- 92.2/207.3 kB 5.5 MB/s eta 0:00:01\n",
|
1145 |
+
" ----------------------- ---------------- 122.9/207.3 kB 1.4 MB/s eta 0:00:01\n",
|
1146 |
+
" ---------------------------------------- 207.3/207.3 kB 1.8 MB/s eta 0:00:00\n",
|
1147 |
+
"Downloading pydeck-0.9.1-py2.py3-none-any.whl (6.9 MB)\n",
|
1148 |
+
" ---------------------------------------- 0.0/6.9 MB ? eta -:--:--\n",
|
1149 |
+
" --------------------------------------- 0.1/6.9 MB 2.8 MB/s eta 0:00:03\n",
|
1150 |
+
" -- ------------------------------------- 0.4/6.9 MB 4.0 MB/s eta 0:00:02\n",
|
1151 |
+
" -- ------------------------------------- 0.4/6.9 MB 3.9 MB/s eta 0:00:02\n",
|
1152 |
+
" -- ------------------------------------- 0.4/6.9 MB 3.9 MB/s eta 0:00:02\n",
|
1153 |
+
" -- ------------------------------------- 0.4/6.9 MB 3.9 MB/s eta 0:00:02\n",
|
1154 |
+
" -- ------------------------------------- 0.4/6.9 MB 3.9 MB/s eta 0:00:02\n",
|
1155 |
+
" --- ------------------------------------ 0.6/6.9 MB 1.7 MB/s eta 0:00:04\n",
|
1156 |
+
" ---- ----------------------------------- 0.8/6.9 MB 2.3 MB/s eta 0:00:03\n",
|
1157 |
+
" ---- ----------------------------------- 0.8/6.9 MB 2.3 MB/s eta 0:00:03\n",
|
1158 |
+
" ----- ---------------------------------- 0.9/6.9 MB 2.0 MB/s eta 0:00:03\n",
|
1159 |
+
" ------ --------------------------------- 1.2/6.9 MB 2.3 MB/s eta 0:00:03\n",
|
1160 |
+
" ------- -------------------------------- 1.2/6.9 MB 2.3 MB/s eta 0:00:03\n",
|
1161 |
+
" ------- -------------------------------- 1.3/6.9 MB 2.2 MB/s eta 0:00:03\n",
|
1162 |
+
" ------- -------------------------------- 1.4/6.9 MB 2.2 MB/s eta 0:00:03\n",
|
1163 |
+
" ------- -------------------------------- 1.4/6.9 MB 2.2 MB/s eta 0:00:03\n",
|
1164 |
+
" -------- ------------------------------- 1.4/6.9 MB 1.9 MB/s eta 0:00:03\n",
|
1165 |
+
" -------- ------------------------------- 1.4/6.9 MB 1.9 MB/s eta 0:00:03\n",
|
1166 |
+
" --------- ------------------------------ 1.6/6.9 MB 1.9 MB/s eta 0:00:03\n",
|
1167 |
+
" ---------- ----------------------------- 1.7/6.9 MB 2.0 MB/s eta 0:00:03\n",
|
1168 |
+
" ---------- ----------------------------- 1.8/6.9 MB 2.0 MB/s eta 0:00:03\n",
|
1169 |
+
" ---------- ----------------------------- 1.8/6.9 MB 2.0 MB/s eta 0:00:03\n",
|
1170 |
+
" ---------- ----------------------------- 1.8/6.9 MB 2.0 MB/s eta 0:00:03\n",
|
1171 |
+
" ---------- ----------------------------- 1.9/6.9 MB 1.8 MB/s eta 0:00:03\n",
|
1172 |
+
" ---------- ----------------------------- 1.9/6.9 MB 1.7 MB/s eta 0:00:03\n",
|
1173 |
+
" ----------- ---------------------------- 2.0/6.9 MB 1.7 MB/s eta 0:00:03\n",
|
1174 |
+
" ------------ --------------------------- 2.1/6.9 MB 1.7 MB/s eta 0:00:03\n",
|
1175 |
+
" ------------ --------------------------- 2.1/6.9 MB 1.7 MB/s eta 0:00:03\n",
|
1176 |
+
" -------------- ------------------------- 2.4/6.9 MB 1.8 MB/s eta 0:00:03\n",
|
1177 |
+
" -------------- ------------------------- 2.5/6.9 MB 1.9 MB/s eta 0:00:03\n",
|
1178 |
+
" --------------- ------------------------ 2.7/6.9 MB 1.9 MB/s eta 0:00:03\n",
|
1179 |
+
" --------------- ------------------------ 2.7/6.9 MB 1.9 MB/s eta 0:00:03\n",
|
1180 |
+
" ---------------- ----------------------- 2.8/6.9 MB 1.9 MB/s eta 0:00:03\n",
|
1181 |
+
" ----------------- ---------------------- 3.1/6.9 MB 2.0 MB/s eta 0:00:02\n",
|
1182 |
+
" ------------------- -------------------- 3.3/6.9 MB 2.1 MB/s eta 0:00:02\n",
|
1183 |
+
" ------------------- -------------------- 3.4/6.9 MB 2.1 MB/s eta 0:00:02\n",
|
1184 |
+
" -------------------- ------------------- 3.5/6.9 MB 2.1 MB/s eta 0:00:02\n",
|
1185 |
+
" -------------------- ------------------- 3.5/6.9 MB 2.1 MB/s eta 0:00:02\n",
|
1186 |
+
" -------------------- ------------------- 3.5/6.9 MB 2.1 MB/s eta 0:00:02\n",
|
1187 |
+
" -------------------- ------------------- 3.6/6.9 MB 2.0 MB/s eta 0:00:02\n",
|
1188 |
+
" -------------------- ------------------- 3.6/6.9 MB 2.0 MB/s eta 0:00:02\n",
|
1189 |
+
" --------------------- ------------------ 3.6/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1190 |
+
" --------------------- ------------------ 3.7/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1191 |
+
" --------------------- ------------------ 3.7/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1192 |
+
" --------------------- ------------------ 3.7/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1193 |
+
" --------------------- ------------------ 3.7/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1194 |
+
" --------------------- ------------------ 3.7/6.9 MB 1.7 MB/s eta 0:00:02\n",
|
1195 |
+
" ----------------------- ---------------- 4.1/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1196 |
+
" ------------------------ --------------- 4.2/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1197 |
+
" ------------------------- -------------- 4.4/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1198 |
+
" ------------------------- -------------- 4.5/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1199 |
+
" -------------------------- ------------- 4.5/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1200 |
+
" -------------------------- ------------- 4.5/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1201 |
+
" -------------------------- ------------- 4.6/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1202 |
+
" -------------------------- ------------- 4.6/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1203 |
+
" ---------------------------- ----------- 4.9/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1204 |
+
" ---------------------------- ----------- 5.0/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1205 |
+
" ---------------------------- ----------- 5.0/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1206 |
+
" ---------------------------- ----------- 5.0/6.9 MB 1.9 MB/s eta 0:00:02\n",
|
1207 |
+
" ----------------------------- ---------- 5.1/6.9 MB 1.9 MB/s eta 0:00:01\n",
|
1208 |
+
" ------------------------------ --------- 5.2/6.9 MB 1.9 MB/s eta 0:00:01\n",
|
1209 |
+
" ------------------------------ --------- 5.2/6.9 MB 1.9 MB/s eta 0:00:01\n",
|
1210 |
+
" ------------------------------ --------- 5.3/6.9 MB 1.8 MB/s eta 0:00:01\n",
|
1211 |
+
" ------------------------------ --------- 5.3/6.9 MB 1.8 MB/s eta 0:00:01\n",
|
1212 |
+
" ------------------------------- -------- 5.4/6.9 MB 1.8 MB/s eta 0:00:01\n",
|
1213 |
+
" ------------------------------- -------- 5.5/6.9 MB 1.8 MB/s eta 0:00:01\n",
|
1214 |
+
" -------------------------------- ------- 5.5/6.9 MB 1.8 MB/s eta 0:00:01\n",
|
1215 |
+
" -------------------------------- ------- 5.6/6.9 MB 1.8 MB/s eta 0:00:01\n",
|
1216 |
+
" -------------------------------- ------- 5.7/6.9 MB 1.8 MB/s eta 0:00:01\n",
|
1217 |
+
" --------------------------------- ------ 5.7/6.9 MB 1.8 MB/s eta 0:00:01\n",
|
1218 |
+
" --------------------------------- ------ 5.7/6.9 MB 1.8 MB/s eta 0:00:01\n",
|
1219 |
+
" ---------------------------------- ----- 5.9/6.9 MB 1.8 MB/s eta 0:00:01\n",
|
1220 |
+
" ---------------------------------- ----- 5.9/6.9 MB 1.8 MB/s eta 0:00:01\n",
|
1221 |
+
" ---------------------------------- ----- 5.9/6.9 MB 1.8 MB/s eta 0:00:01\n",
|
1222 |
+
" ---------------------------------- ----- 6.0/6.9 MB 1.8 MB/s eta 0:00:01\n",
|
1223 |
+
" ----------------------------------- ---- 6.1/6.9 MB 1.7 MB/s eta 0:00:01\n",
|
1224 |
+
" ----------------------------------- ---- 6.1/6.9 MB 1.7 MB/s eta 0:00:01\n",
|
1225 |
+
" ----------------------------------- ---- 6.2/6.9 MB 1.7 MB/s eta 0:00:01\n",
|
1226 |
+
" ----------------------------------- ---- 6.2/6.9 MB 1.7 MB/s eta 0:00:01\n",
|
1227 |
+
" ------------------------------------ --- 6.2/6.9 MB 1.7 MB/s eta 0:00:01\n",
|
1228 |
+
" ------------------------------------ --- 6.3/6.9 MB 1.7 MB/s eta 0:00:01\n",
|
1229 |
+
" ------------------------------------- -- 6.5/6.9 MB 1.7 MB/s eta 0:00:01\n",
|
1230 |
+
" ------------------------------------- -- 6.6/6.9 MB 1.7 MB/s eta 0:00:01\n",
|
1231 |
+
" -------------------------------------- - 6.6/6.9 MB 1.7 MB/s eta 0:00:01\n",
|
1232 |
+
" -------------------------------------- - 6.7/6.9 MB 1.7 MB/s eta 0:00:01\n",
|
1233 |
+
" --------------------------------------- 6.8/6.9 MB 1.7 MB/s eta 0:00:01\n",
|
1234 |
+
" --------------------------------------- 6.9/6.9 MB 1.7 MB/s eta 0:00:01\n",
|
1235 |
+
" ---------------------------------------- 6.9/6.9 MB 1.7 MB/s eta 0:00:00\n",
|
1236 |
+
"Downloading rich-13.7.1-py3-none-any.whl (240 kB)\n",
|
1237 |
+
" ---------------------------------------- 0.0/240.7 kB ? eta -:--:--\n",
|
1238 |
+
" --------------- ------------------------ 92.2/240.7 kB 2.6 MB/s eta 0:00:01\n",
|
1239 |
+
" --------------------------- ------------ 163.8/240.7 kB 2.4 MB/s eta 0:00:01\n",
|
1240 |
+
" -------------------------------- ------- 194.6/240.7 kB 1.7 MB/s eta 0:00:01\n",
|
1241 |
+
" ---------------------------------------- 240.7/240.7 kB 1.5 MB/s eta 0:00:00\n",
|
1242 |
+
"Downloading tenacity-8.3.0-py3-none-any.whl (25 kB)\n",
|
1243 |
+
"Downloading watchdog-4.0.1-py3-none-win_amd64.whl (83 kB)\n",
|
1244 |
+
" ---------------------------------------- 0.0/83.0 kB ? eta -:--:--\n",
|
1245 |
+
" ---------------------------------------- 83.0/83.0 kB 1.5 MB/s eta 0:00:00\n",
|
1246 |
+
"Downloading gitdb-4.0.11-py3-none-any.whl (62 kB)\n",
|
1247 |
+
" ---------------------------------------- 0.0/62.7 kB ? eta -:--:--\n",
|
1248 |
+
" ---------------------------------------- 62.7/62.7 kB ? eta 0:00:00\n",
|
1249 |
+
"Downloading markdown_it_py-3.0.0-py3-none-any.whl (87 kB)\n",
|
1250 |
+
" ---------------------------------------- 0.0/87.5 kB ? eta -:--:--\n",
|
1251 |
+
" ---------------------------------------- 87.5/87.5 kB 4.8 MB/s eta 0:00:00\n",
|
1252 |
+
"Downloading mdurl-0.1.2-py3-none-any.whl (10.0 kB)\n",
|
1253 |
+
"Downloading smmap-5.0.1-py3-none-any.whl (24 kB)\n",
|
1254 |
+
"Installing collected packages: watchdog, tenacity, smmap, mdurl, cachetools, blinker, pydeck, markdown-it-py, gitdb, rich, gitpython, streamlit\n",
|
1255 |
+
"Successfully installed blinker-1.8.2 cachetools-5.3.3 gitdb-4.0.11 gitpython-3.1.43 markdown-it-py-3.0.0 mdurl-0.1.2 pydeck-0.9.1 rich-13.7.1 smmap-5.0.1 streamlit-1.35.0 tenacity-8.3.0 watchdog-4.0.1\n"
|
1256 |
+
]
|
1257 |
+
}
|
1258 |
+
],
|
1259 |
+
"source": [
|
1260 |
+
"!pip install streamlit"
|
1261 |
+
]
|
1262 |
+
},
|
1263 |
+
{
|
1264 |
+
"cell_type": "markdown",
|
1265 |
+
"id": "f408d44e-72f6-4096-961c-a0747cf79061",
|
1266 |
+
"metadata": {},
|
1267 |
+
"source": [
|
1268 |
+
"# python ile yapılan çalışmaların hızlı bir şekilde deployment süreçleri - HTML Rendering"
|
1269 |
+
]
|
1270 |
+
},
|
1271 |
+
{
|
1272 |
+
"cell_type": "code",
|
1273 |
+
"execution_count": 56,
|
1274 |
+
"id": "30f657b3-cb9e-4e08-9179-2eaf3ebcc51b",
|
1275 |
+
"metadata": {},
|
1276 |
+
"outputs": [
|
1277 |
+
{
|
1278 |
+
"name": "stderr",
|
1279 |
+
"output_type": "stream",
|
1280 |
+
"text": [
|
1281 |
+
"2024-06-11 20:10:16.914 Session state does not function when running a script without `streamlit run`\n"
|
1282 |
+
]
|
1283 |
+
}
|
1284 |
+
],
|
1285 |
+
"source": [
|
1286 |
+
"import streamlit as st\n",
|
1287 |
+
"#price tahmin fonksiyonu tanımla\n",
|
1288 |
+
"def price(make,model,trim,mileage,car_type,cylinder,liter,doors,cruise,sound,leather):\n",
|
1289 |
+
" input_data=pd.DataFrame({'Make':[make],\n",
|
1290 |
+
" 'Model':[model],\n",
|
1291 |
+
" 'Trim':[trim],\n",
|
1292 |
+
" 'Mileage':[mileage],\n",
|
1293 |
+
" 'Type':[car_type],\n",
|
1294 |
+
" 'Cylinder':[cylinder],\n",
|
1295 |
+
" 'Liter':[liter],\n",
|
1296 |
+
" 'Doors':[doors],\n",
|
1297 |
+
" 'Cruise':[cruise],\n",
|
1298 |
+
" 'Sound':[sound],\n",
|
1299 |
+
" 'Leather':[leather]})\n",
|
1300 |
+
" prediction = pipe.predict(input_data)[0]\n",
|
1301 |
+
" return prediction\n",
|
1302 |
+
"\n",
|
1303 |
+
"\n",
|
1304 |
+
"st.title(\"Car Price Prediction: red_car: @ErayCoşkunAI\")\n",
|
1305 |
+
"st.write('Select feature of the car')\n",
|
1306 |
+
"make = st.selectbox(\"Brand of Car\",df['Make'].unique())\n",
|
1307 |
+
"model = st.selectbox(\"Model of Car\",df[df['Make']==make]['Model'].unique())\n",
|
1308 |
+
"trim = st.selectbox('Trim Of Car', df[(df['Make']==make) & (df['Model']==model)]['Trim'].unique())\n",
|
1309 |
+
"mileage = st.number_input('Kilometer of Car',100,200000)\n",
|
1310 |
+
"car_type = st.selectbox('Type Of Car', df['Type'].unique())\n",
|
1311 |
+
"cylinder = st.selectbox('Cylinder of Car',df['Cylinder'].unique())\n",
|
1312 |
+
"liter = st.number_input('Liter value of car',1,10)\n",
|
1313 |
+
"doors = st.selectbox('Count of Door',df['Doors'].unique())\n",
|
1314 |
+
"cruise = st.radio('Hız sbt', [True,False])\n",
|
1315 |
+
"sound = st.radio('Sound System',[True,False])\n",
|
1316 |
+
"leather = st.radio('Deri Döşeme',[True,False])\n",
|
1317 |
+
"if st.button('Tahmin'):\n",
|
1318 |
+
" pred = price(make,model,trim,mileage,car_type,cylinder,liter,doors,cruise,sound,leather)\n",
|
1319 |
+
" st.write('Price:$',round(pred[0],2))\n"
|
1320 |
+
]
|
1321 |
+
},
|
1322 |
+
{
|
1323 |
+
"cell_type": "code",
|
1324 |
+
"execution_count": null,
|
1325 |
+
"id": "2676981b-51c0-4d72-8897-011bdc45724a",
|
1326 |
+
"metadata": {},
|
1327 |
+
"outputs": [],
|
1328 |
+
"source": []
|
1329 |
+
}
|
1330 |
+
],
|
1331 |
+
"metadata": {
|
1332 |
+
"kernelspec": {
|
1333 |
+
"display_name": "Python 3 (ipykernel)",
|
1334 |
+
"language": "python",
|
1335 |
+
"name": "python3"
|
1336 |
+
},
|
1337 |
+
"language_info": {
|
1338 |
+
"codemirror_mode": {
|
1339 |
+
"name": "ipython",
|
1340 |
+
"version": 3
|
1341 |
+
},
|
1342 |
+
"file_extension": ".py",
|
1343 |
+
"mimetype": "text/x-python",
|
1344 |
+
"name": "python",
|
1345 |
+
"nbconvert_exporter": "python",
|
1346 |
+
"pygments_lexer": "ipython3",
|
1347 |
+
"version": "3.11.9"
|
1348 |
+
}
|
1349 |
+
},
|
1350 |
+
"nbformat": 4,
|
1351 |
+
"nbformat_minor": 5
|
1352 |
+
}
|
app.py
ADDED
@@ -0,0 +1,196 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
# coding: utf-8
|
3 |
+
|
4 |
+
# # Car Prediction #
|
5 |
+
# İkinci el araç fiyatlarını (özelliklerine göre) tahmin eden modeller oluşturma ve MLOPs ile Hugging Face üzerinden yayımlayacağız.
|
6 |
+
#
|
7 |
+
|
8 |
+
# In[1]:
|
9 |
+
|
10 |
+
|
11 |
+
import pandas as pd
|
12 |
+
from sklearn.model_selection import train_test_split #veri setini bölme işlemleri
|
13 |
+
from sklearn.linear_model import LinearRegression #Doğrusal regresyon
|
14 |
+
from sklearn.metrics import r2_score,mean_squared_error #modelimizin performansını ölçmek için
|
15 |
+
from sklearn.compose import ColumnTransformer #Sütun dönüşüm işlemleri
|
16 |
+
from sklearn.preprocessing import OneHotEncoder, StandardScaler # kategori - sayısal dönüşüm ve ölçeklendirme
|
17 |
+
from sklearn.pipeline import Pipeline #Veri işleme hattı
|
18 |
+
|
19 |
+
|
20 |
+
# In[ ]:
|
21 |
+
|
22 |
+
|
23 |
+
#Excell dosyalarını okumak için
|
24 |
+
|
25 |
+
|
26 |
+
# In[2]:
|
27 |
+
|
28 |
+
|
29 |
+
get_ipython().system('pip install xldr')
|
30 |
+
|
31 |
+
|
32 |
+
# ## Veri dosyasını yükle
|
33 |
+
|
34 |
+
# In[3]:
|
35 |
+
|
36 |
+
|
37 |
+
ls
|
38 |
+
|
39 |
+
|
40 |
+
# In[5]:
|
41 |
+
|
42 |
+
|
43 |
+
df=pd.read_excel('cars.xls')
|
44 |
+
df
|
45 |
+
|
46 |
+
|
47 |
+
# In[10]:
|
48 |
+
|
49 |
+
|
50 |
+
df.info()
|
51 |
+
|
52 |
+
|
53 |
+
# In[6]:
|
54 |
+
|
55 |
+
|
56 |
+
# Veri ön işleme
|
57 |
+
|
58 |
+
|
59 |
+
# In[7]:
|
60 |
+
|
61 |
+
|
62 |
+
X=df.drop('Price',axis=1) #fiyat sütunu çıkar fiyata etki edenler kalsın
|
63 |
+
y=df['Price'] #tahmin
|
64 |
+
|
65 |
+
|
66 |
+
# In[9]:
|
67 |
+
|
68 |
+
|
69 |
+
X_train,X_test,y_train,y_test=train_test_split(X,y,test_size=0.2,random_state=42)
|
70 |
+
|
71 |
+
|
72 |
+
# #### Veri ön işleme, standartlaştırma ve OHE işlemlerini otomatikleştiriyoruz (standarlaştırıyoruz). Artık preprocess kullanarak kullanıcında arayüz aracılığıyla gelen veriyi mdoelimize uygun hale çevirebiliriz.
|
73 |
+
#
|
74 |
+
|
75 |
+
# In[11]:
|
76 |
+
|
77 |
+
|
78 |
+
preprocess=ColumnTransformer(
|
79 |
+
transformers=[
|
80 |
+
('num',StandardScaler(),['Mileage', 'Cylinder','Liter','Doors']),
|
81 |
+
('cat',OneHotEncoder(),['Make','Model','Trim','Type'])
|
82 |
+
]
|
83 |
+
)
|
84 |
+
|
85 |
+
|
86 |
+
# In[12]:
|
87 |
+
|
88 |
+
|
89 |
+
my_model=LinearRegression()
|
90 |
+
|
91 |
+
|
92 |
+
# In[13]:
|
93 |
+
|
94 |
+
|
95 |
+
#pipeline ı tanımla
|
96 |
+
pipe=Pipeline(steps=[('preprocessor',preprocess),('model',my_model)])
|
97 |
+
|
98 |
+
|
99 |
+
# In[14]:
|
100 |
+
|
101 |
+
|
102 |
+
#pipeline fit
|
103 |
+
pipe.fit(X_train,y_train)
|
104 |
+
|
105 |
+
|
106 |
+
# In[16]:
|
107 |
+
|
108 |
+
|
109 |
+
y_pred=pipe.predict(X_test)
|
110 |
+
print('RMSE',mean_squared_error(y_test,y_pred)**0.5)
|
111 |
+
print('R2',r2_score(y_test,y_pred))
|
112 |
+
|
113 |
+
|
114 |
+
# In[ ]:
|
115 |
+
|
116 |
+
|
117 |
+
#isterseniz veri setinin tammamıyla tekrar eğitim yapabilirsiniz.
|
118 |
+
#pipe.fit(X,y)
|
119 |
+
|
120 |
+
|
121 |
+
# ## Streamlit ile modeli yayma/deploy/kullanıma sunma
|
122 |
+
|
123 |
+
# In[17]:
|
124 |
+
|
125 |
+
|
126 |
+
get_ipython().system('pip install streamlit')
|
127 |
+
|
128 |
+
|
129 |
+
# In[18]:
|
130 |
+
|
131 |
+
|
132 |
+
df['Mileage'].max()
|
133 |
+
|
134 |
+
|
135 |
+
# In[19]:
|
136 |
+
|
137 |
+
|
138 |
+
df['Type'].unique()
|
139 |
+
|
140 |
+
|
141 |
+
# In[20]:
|
142 |
+
|
143 |
+
|
144 |
+
df['Liter'].max()
|
145 |
+
|
146 |
+
|
147 |
+
# #### Python ile yapılan çalışmnalrın hızlı bir şekilde deploy edilmesi için HTML render arayüzler tasarlamanızı sağlar.
|
148 |
+
|
149 |
+
# In[21]:
|
150 |
+
|
151 |
+
|
152 |
+
import streamlit as st
|
153 |
+
#price tahmin fonksiyonu tanımla
|
154 |
+
def price(make,model,trim,mileage,car_type,cylinder,liter,doors,cruise,sound,leather):
|
155 |
+
input_data=pd.DataFrame({'Make':[make],
|
156 |
+
'Model':[model],
|
157 |
+
'Trim':[trim],
|
158 |
+
'Mileage':[mileage],
|
159 |
+
'Type':[car_type],
|
160 |
+
'Cylinder':[cylinder],
|
161 |
+
'Liter':[liter],
|
162 |
+
'Doors':[doors],
|
163 |
+
'Cruise':[cruise],
|
164 |
+
'Sound':[sound],
|
165 |
+
'Leather':[leather]})
|
166 |
+
prediction=pipe.predict(input_data)[0]
|
167 |
+
return prediction
|
168 |
+
st.title("II. El Araba Fiyatı Tahmin:red_car: @drmurataltun")
|
169 |
+
st.write('Arabanın özelliklerini seçiniz')
|
170 |
+
make=st.selectbox('Marka',df['Make'].unique())
|
171 |
+
model=st.selectbox('Model',df[df['Make']==make]['Model'].unique())
|
172 |
+
trim=st.selectbox('Trim',df[(df['Make']==make) &(df['Model']==model)]['Trim'].unique())
|
173 |
+
mileage=st.number_input('Kilometre',100,200000)
|
174 |
+
car_type=st.selectbox('Araç Tipi',df[(df['Make']==make) &(df['Model']==model)&(df['Trim']==trim)]['Type'].unique())
|
175 |
+
cylinder=st.selectbox('Cylinder',df['Cylinder'].unique())
|
176 |
+
liter=st.number_input('Yakıt hacmi',1,10)
|
177 |
+
doors=st.selectbox('Kapı sayısı',df['Doors'].unique())
|
178 |
+
cruise=st.radio('Hız Sbt.',[True,False])
|
179 |
+
sound=st.radio('Ses Sis.',[True,False])
|
180 |
+
leather=st.radio('Deri döşeme.',[True,False])
|
181 |
+
if st.button('Tahmin'):
|
182 |
+
pred=price(make,model,trim,mileage,car_type,cylinder,liter,doors,cruise,sound,leather)
|
183 |
+
st.write('Fiyat:$', round(pred[0],2))
|
184 |
+
|
185 |
+
|
186 |
+
# In[25]:
|
187 |
+
|
188 |
+
|
189 |
+
#streamlit run C:\ProgramData\anaconda3\Lib\site-packages\ipykernel_launcher.py
|
190 |
+
|
191 |
+
|
192 |
+
# In[ ]:
|
193 |
+
|
194 |
+
|
195 |
+
|
196 |
+
|
cars.xls
ADDED
Binary file (142 kB). View file
|
|
requirements.txt.txt
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
streamlit==1.31.1
|
2 |
+
scikit-learn==1.4.1.post1
|
3 |
+
pandas==2.1.0
|
4 |
+
xlrd == 2.0.1
|