-
Notifications
You must be signed in to change notification settings - Fork 18
Expand file tree
/
Copy pathb-2-1-satislar.py
More file actions
40 lines (27 loc) · 797 Bytes
/
b-2-1-satislar.py
File metadata and controls
40 lines (27 loc) · 797 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# -*- coding: utf-8 -*-
"""
Created on Wed Aug 29 22:28:23 2018
@author: regkr
"""
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
satislar = pd.read_csv("satislar.csv")
print (satislar)
ay = satislar[["Aylar"]]
satis = satislar[["Satislar"]]
print (ay, "\n",satis)
"""
satis2 = satislar.iloc[:,1:].values
ay2 = satislar.iloc[:,:1].values
print (satis2)
print (ay2)
"""
#verilerin egitim ve test icin bolunmesi
from sklearn.cross_validation import train_test_split
x_train, x_test,y_train,y_test = train_test_split(ay,satis,test_size=0.33, random_state=0)
#verilerin olceklenmesi
from sklearn.preprocessing import StandardScaler
sc = StandardScaler()
X_train = sc.fit_transform(x_train)
X_test = sc.fit_transform(x_test)