forked from bytesenseidk/Mixed-Applications
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotter.py
More file actions
26 lines (19 loc) · 752 Bytes
/
plotter.py
File metadata and controls
26 lines (19 loc) · 752 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
import sklearn
import numpy as pd
import pandas as pd
from sklearn import linear_model
from sklearn.utils import shuffle
data = pd.read_csv("iris.csv", sep=";")
# data = data[["sepal_length", "sepal_width", "petal_length", "petal_width", "species"]]
# predict = "species"
print(data.columns)
# X = np.array(data.drop([predict], 1))
# y = np.array(data[predict])
# x_train, y_train, x_test, y_test = sklearn.model_selection.train_test_split(X, y, test_size=0.1)
# linear = linear_model.LinearRegression()
# linear.fit(x_train, y_train)
# accuracy = linear.score(x_test, y_test)
# print(accuracy)
# predictions = linear.predict(x_test)
# for x in range(len(predictions)):
# print(predictions[x], x_test[x], y_test[x])