Skip to content

Instantly share code, notes, and snippets.

@b0noI
Created August 21, 2017 00:19
Show Gist options
  • Save b0noI/1f1b591505572086d7d5c06212033778 to your computer and use it in GitHub Desktop.
Save b0noI/1f1b591505572086d7d5c06212033778 to your computer and use it in GitHub Desktop.
# lineral equation
def f2(x):
# a = 5
# b = 2
return - 5 * x + 2
# Data
X2 = np.arange(100, step=0.001)
Y2 = f2(X2)
# Split data for taining and evaluation
X2_train, X2_test, Y2_train, Y2_test = train_test_split(X2, Y2)
figure = plt.figure()
plt.plot(X2_train, Y2_train, 'r')
plt.xlabel('x')
plt.ylabel('y')
plt.title('simple line')
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment