1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[Python] PartialDependenceDisplay.from_estimator plots having lines with 0 values

Discussão em 'Python' iniciado por Stack, Setembro 14, 2024.

  1. Stack

    Stack Membro Participativo

    Need to evaluate the two way interaction between two variables after regressor model. Used PartialDependenceDisplay.from_estimator to plot but the contour lines inside the plot all have value 0.Not sure what might cause this. Checked the data and model and there are no problems while loading the model and data. Checked the other two variable combinations and they have same issue.

    from sklearn.inspection import partial_dependence, PartialDependenceDisplay
    model = load_model(model_path)
    model_features = model.feature_name_

    fig, ax = plt.subplots(figsize=(10,5))
    X = training_data[model_features]
    PartialDependenceDisplay.from_estimator(model, X, features=[('temperature', 'speed')], ax=ax, n_jobs=-1, grid_resolution=20)


    [​IMG]

    Continue reading...

Compartilhe esta Página