小编pda*_*awr的帖子

如何使用 Python 3 在带有连续颜色图的“散景”中制作“热图”?

我试图来复制这种风格HeatMap是连续值映射到一个LinearColorMapper实例:http://docs.bokeh.org/en/latest/docs/gallery/unemployment.html 我想作一个HeatMap(W /无论是chartsrect),然后添加一个选择小部件来选择obsv_id,然后添加一个滑块小部件来浏览dates.

但是,一开始我在HeatMap使用单obsv_id/date对时遇到了麻烦。我在创建这个时做错了HeatMap什么?这本质上是size变量和loc变量的 3x3 矩形图。

奖励:你能帮我/就如何连接这些小部件的输出来控制情节提出一些建议吗?

我看到了这些帖子,但所有示例都使用实际的十六进制颜色作为列表,而不是使用连续度量进行映射: python bokeh,如何制作相关图? http://docs.bokeh.org/en/latest/docs/gallery/categorical.html

# Init
import numpy as np
import pandas as pd
from bokeh.plotting import figure, output_notebook, output_file, reset_output, show, ColumnDataSource
from bokeh.models import LinearColorMapper
reset_output()
output_notebook()

np.random.seed(0)

# Coords
dates = ["07-3","07-11","08-6","08-28"]
#locs = ["air","water","earth"]
locs = [0,1,2] …
Run Code Online (Sandbox Code Playgroud)

plot colors widget heatmap bokeh

5
推荐指数
1
解决办法
4414
查看次数

如何修复 MLflow UI 中未显示的工件

我使用了 MLflow 并使用下面的函数(来自 pydataberlin)记录了参数。

def train(alpha=0.5, l1_ratio=0.5):
    # train a model with given parameters
    warnings.filterwarnings("ignore")
    np.random.seed(40)

    # Read the wine-quality csv file (make sure you're running this from the root of MLflow!)
    data_path = "data/wine-quality.csv"
    train_x, train_y, test_x, test_y = load_data(data_path)

    # Useful for multiple runs (only doing one run in this sample notebook)    
    with mlflow.start_run():
        # Execute ElasticNet
        lr = ElasticNet(alpha=alpha, l1_ratio=l1_ratio, random_state=42)
        lr.fit(train_x, train_y)

        # Evaluate Metrics
        predicted_qualities = lr.predict(test_x)
        (rmse, mae, r2) = eval_metrics(test_y, predicted_qualities)

        # Print …
Run Code Online (Sandbox Code Playgroud)

python artifacts mlflow

4
推荐指数
2
解决办法
2万
查看次数

标签 统计

artifacts ×1

bokeh ×1

colors ×1

heatmap ×1

mlflow ×1

plot ×1

python ×1

widget ×1