我使用sklow中的tensorforest以及以下模型文件构建了一个模型
有谁能告诉我如何编写冻结和模拟模型的代码?我是否必须使用占位符,如在tensorflow中完成或者skflow不同? 这是代码
y_train = pd.factorize(df_train['data.0.sleeping'])[0]
y_test = pd.factorize(df_test['data.0.sleeping'])[0]
df_test=df_test.iloc[:, :-1]
print(df_test.head(3))
hparams = tf.contrib.tensor_forest.python.tensor_forest.ForestHParams(
num_trees=3, max_nodes=1000, num_classes=2, num_features=4)
clf = tf.contrib.learn.TensorForestEstimator(hparams, model_dir='model/')
clf.fit(x=df_train[features], y=y_train,steps=100)