Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Partial display of ModelStudio applet in Quatro HTML file #116

Closed
arodionoff opened this issue Jun 28, 2024 · 3 comments
Closed

Partial display of ModelStudio applet in Quatro HTML file #116

arodionoff opened this issue Jun 28, 2024 · 3 comments
Labels
feature 💡 New feature or enhancement request question ❔ Further information is requested

Comments

@arodionoff
Copy link

I'm trying to create an HTML file by rendering a Quatro file with the following code in Posit Cloud:

---
title: "TEST ModelStudio"
format: html
---

## 	modelStudio in R
'''{r}
library("DALEX")
library("ranger")
library("modelStudio")

# fit a model
model <- ranger(score ~., data = happiness_train)

# create an explainer for the model    
explainer <- explain(model,
                     data = happiness_test,
                     y = happiness_test$score,
                     label = "Random Forest",
                     verbose = FALSE)

# make a studio for the model
modelStudio(explainer)
'''

But in Quarto, a file is created in which modelStudio generates an applet, which is partially visible only in the upper left part.
image

How can we make it possible to demonstrate the entire applet in its entirety?

@hbaniecki hbaniecki added the feature 💡 New feature or enhancement request label Jun 29, 2024
@hbaniecki
Copy link
Member

Hi @arodionoff, I didn't try to run modelStudio in Quatro before. Will look into it when I have some free time

@arodionoff
Copy link
Author

Are there any promotions for ModelStudio in Quarto?

@hbaniecki
Copy link
Member

Hi @arodionoff, you need to play around with document margins, e.g.

---
title: "TEST ModelStudio"
format: 
  html:
    grid:
      body-width: 1250px
---

<style type="text/css">

#mywidget {
  position: relative !important;
  width: 1250px !important;
  height: 900px !important;
}

</style>

## 	modelStudio in R

``{r}
library("DALEX")
library("ranger")
library("modelStudio")

# fit a model
model <- ranger(score ~., data = happiness_train)

# create an explainer for the model    
explainer <- explain(model,
                     data = happiness_test,
                     y = happiness_test$score,
                     label = "Random Forest",
                     verbose = FALSE)

# make a studio for the model
modelStudio(explainer,
            widget_id = "mywidget")
``

## Test

test

@hbaniecki hbaniecki added the question ❔ Further information is requested label Sep 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature 💡 New feature or enhancement request question ❔ Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants