import tensorflow as tf
# Model parameters
A = tf.Variable([.3], dtype=tf.float32)
W = tf.Variable([.3], dtype=tf.float32)
b = tf.Variable([-.3], dtype=tf.float32)
# Model input and output
x =
餵我目前工作的一個迴歸分析用下面的代碼: for (i in 1:ncol(Ret1)){
r2.out[i]=summary(lm(Ret1[,1]~Ret1[,i]))$r.squared
}
r2.out
此代碼運行每個列的簡單OLS迴歸在數據幀agianst第一列並提供這些迴歸的R^2。 在時刻處,迴歸使用列中的所有數據點。 我需要現在是代碼,而不是使用列中的所有數據點只