27 lines
549 B
Python
27 lines
549 B
Python
|
|
|
|
from sklearn import linear_model
|
|
|
|
# x = [[20, 3],
|
|
# [23, 7],
|
|
# [31, 10],
|
|
# [42, 13],
|
|
# [50, 7],
|
|
# [60, 5]]
|
|
# y = [0, 1, 1, 1, 0, 0]
|
|
# lr = linear_model.LogisticRegression()
|
|
# lr.fit(x, y)
|
|
# testX = [[28, 8]]
|
|
# label = lr.predict(testX)
|
|
# print("predicted label = ", label)
|
|
#
|
|
# prob = lr.predict_proba(testX)
|
|
# print("probability = ", prob)
|
|
|
|
import tensorflow as tf
|
|
tf.compat.v1.disable_eager_execution()
|
|
hello = tf.constant("hello, world!")
|
|
sess = tf.compat.v1.Session()
|
|
result = sess.run(hello)
|
|
sess.close()
|
|
print(result) |