📜  回归 r2 张量流 - Python 代码示例

📅  最后修改于: 2022-03-11 14:45:23.134000             🧑  作者: Mango

代码示例1
unexplained_error = tf.reduce_sum(tf.square(labels - predictions))
total_error = tf.reduce_sum(tf.square(labels - tf.reduce_mean(labels, axis=0)))
R2 = 1. - tf.div(unexplained_error, total_error)