我试图让滑块、用户输入和表格之间的依赖关系工作。我尝试输出数据并使用回调来更新它。我被建议只在回调中创建表并使用“Div”。来定义它在显示中的位置。
其他信息:
threshold是由用户输入(滑块或输入)调整的值如果有人能帮我找出表格不显示的原因,我将不胜感激?
这是我的代码:
import dash
import dash_bootstrap_components as dbc
import dash_core_components as dcc
import dash_html_components as html
import pandas as pd
from dash.dependencies import Input, Output
import dash_table
threshold = 0.5
################################################################
###################### Table Data ##############################
################################################################
metrics_index = ["AUC", "Accuracy", "Kappa", "Sensitivity (Recall)", "Specificity", "Precision", "F1"]
algo_columns = ["Test-SVM+Naïve B", "RF"]
table_data = {"AUC": [threshold * 0.8, threshold * 0.83],
"Accuracy": [threshold * 0.85, threshold * 0.86],
"Kappa": …Run Code Online (Sandbox Code Playgroud)