DataRobot-Research/drdocs huggingface dataset:
---
title: Edit applications
description: Modify the configuration of current No-Code AI Apps  using widgets.

---

# Edit applications {: #edit-applications}

On the **Applications** tab, click **Open** next to the application you want to manage and click **Build**. The **Build** page allows you to modify the configuration of an application using widgets. Before the app opens, you must sign in with DataRobot and authorize access.

These sections describe the configurable elements of No-Code AI Apps:

Topic       | Describes...
---------- | -----------
[Pages](app-pages)      | Add or remove pages to organize and group application insights.
[Widgets](app-widgets)      | Add, remove, and configure widgets&mdash;tools for surfacing insights, creating visualizations, and using applications.
[What-if and Optimizer widget](whatif-opt) | Configure the What-if and Optimizer widget&mdash;a single widget that provides scenario comparison and optimizer tools.
[Settings](app-settings) | Modify general configuration information and permissions, as well as view usage details.

## UI overview {: #ui-overview }

![](images/app-build-1.png)

|  &nbsp; | Element |  Description |
|---|---|---|
| ![](images/icon-1.png) | [Pages panel](app-pages) |  Allows you to rename, reorder, add, hide, and delete application pages. |
| ![](images/icon-2.png) | [Widget panel](app-widgets) |  Allows you to add widgets to your application. |
| ![](images/icon-3.png) | [Settings](app-settings) |  Modifies general configurations and permissions as well as displays app usage. |
| ![](images/icon-4.png) | Documentation |  Opens the DataRobot documentation for No-Code AI Apps. |
| ![](images/icon-5.png) | Editing page dropdown |  Controls the application page you are currently editing. To view a different page, click the dropdown and select the page you want to edit. Click **Manage pages** to open the **Pages** panel. |
| ![](images/icon-6.png) | Preview |  Previews the application on different devices. |
| ![](images/icon-7.png) | Go to app / Publish |  Opens the end-user application, where you can [make new predictions](app-make-pred), as well as [view prediction results](app-analyze-result) and widget visualizations. After editing an application, this button displays **Publish**, which you must click to apply your changes.|
| ![](images/icon-8.png) |  Widget actions |  Moves, hides, edits, and deletes widgets.  |
---
title: Reduce 30-Day readmissions rate
description: This page outlines a use case to reduce the 30-day readmission rate at a hospital. This use case is captured in a Jupyter notebook that you can download and execute.

---

# Reduce 30-Day readmissions rate {: #reduce-30-day-readmissions-rate }

This page outlines a use case to reduce the 30-day readmission rate at a hospital. This use case is captured in a [Jupyter notebook](readmission.ipynb) that you can download and execute.

{% include 'includes/hospital-readmit-include.md' %}

### Demo {:#demo}

See the notebook version of this accelerator [here](readmission.ipynb).
# Composable ML reference {: #composable-ml-reference }

Topic | Describes...
----- | ------------
[Blueprints in the AI Catalog](cml-catalog) | How to save, edit, share, and re-use blueprints from the AI Catalog.
[Validation schema](cml-validation) | How to define the expected input and output data requirements for a given custom task.
[Sentiment analysis example](cml-sentiment-example) | A tip for capturing Text sentiments using Composable ML.
[Composable ML considerations](cml-consider) | Considerations to be aware of when working with Composable ML.


## Learn more {: #learn-more }

The following resources are available to provide more information.

### Read and view {: #read-and-view }

* [Demo video](https://www.datarobot.com/platform/composable-ml/){ target=_blank }
* [AutoML and Composable ML blog](https://www.datarobot.com/blog/building-ai-with-automl-and-composable-ml/){ target=_blank }

### Try it {: #try-it }

* The Blueprint Workshop provides tools for building and editing blueprints using a programmatic interface. Visit the:
	* [Homepage](https://blueprint-workshop.datarobot.com/index.html#){ target=_blank } for easy access to setup, tutorials, examples, and an API reference.
	* [Walkthough](https://blueprint-workshop.datarobot.com/examples/walkthrough/Walkthrough.html){ target=_blank } of the most popularly used functionality in the Blueprint Workshop.
* [Task templates](https://github.com/datarobot/datarobot-user-models/tree/master/task_templates){ target=_blank }
* [Drop-in environments](https://github.com/datarobot/datarobot-user-models/tree/master/public_dropin_environments){ target=_blank }
---
title: Alternate use for a payoff matrix
description: An interesting way to use DataRobot's payoff matrix, consider justifying cost vs. identifying profit drivers.
---

# Alternate use for a payoff matrix {: #alternate-use-for-a-payoff-matrix }



<span style="color:red;font-size: 1rem"> `Robot 1`</span>

**How about justify cost savings vs identify profit drivers?**

Hello Team. A client and I were putting together numbers for a [payoff matrix](profit-curve#compare-models-based-on-a-payoff-matrix) and had an alternative way to look at things. For them, the goal is to justify cost savings vs identify profit drivers from a use case.

Example:

1. True Positive (benefit): This is the benefit from an order that is correctly predicted as canceled. The benefit is no/limited inventory costs. For example, if the item costs $100 to store typically, but due to cancellation - no additional cost (we put a 0 here). Benefit can come from additional revenue generated through proactive reach out

2. True Negative (benefit): This is the benefit from an order that is correctly predicted as not canceled. The additional benefit / costs are 0 because a customer simply does not cancel this item and continues with shipment ($1000 profit on avg or -100 inventory cost per order)

3. False Positive (cost): This is the cost associated with classifying an order as canceled when it did not cancel. What costs are incurred - Lost opportunity or business since the order is not fulfilled or delayed (-200)

4. False Negative (cost): This is the cost associated with classifying an order as not canceled, when it will actually cancel. We have to incur a cost here for inventory management -$100
 

Just thought I'd share!


<span style="color:red;font-size: 1rem"> `Robot 2`</span>

Nice!
## DRUM on Ubuntu {: #drum-on-ubuntu }

The following describes the DRUM installation workflow. Consider the language prerequisites before proceeding.

| Language | Prerequisites        | Installation command         |
|----------|----------------------|------------------------------|
| Python   | Python 3 recommended | `pip install datarobot-drum` |
| Java     | JRE ≥ 11             | `pip install datarobot-drum` |
| R        | <ul><li>Python ≥ 3.6</li><li>R framework installed</li></ul>DRUM uses the rpy2 package to run R (the latest version is installed by default). You may need to adjust the rpy2 and pandas versions for compatibility. | `pip install datarobot-drum[R]` |

To install the DRUM with support for Python and Java models, use the following command:

``` sh
pip install datarobot-drum
```

To install DRUM with support for R models:

``` sh
pip install datarobot-drum[R]
```

!!! note
     If you are using a Conda environment, install the wheels with a `--no-deps` flag. If any dependencies are required for a Conda environment, install them with Conda tools.
---
title: Gather churn prediction insights with the Streamlit app
description: Use the Streamlit churn predictor app to present the drivers and predictions of your DataRobot model.

---

# Gather churn prediction insights with the Streamlit app {: #gather-churn-prediction-insights-with-the-streamlit-app }

[Access this AI accelerator on GitHub <span style="vertical-align: sub">:material-arrow-right-circle:{.lg }</span>](https://github.com/datarobot-community/ai-accelerators/tree/main/advanced-experimentation/Churn_app_Streamlit){ .md-button }

This app serves as an example of how to present the drivers and predictions of your Datarobot model using a Churn prediction use case. Building a churn predictor app using Streamlit and DataRobot is a great way to leverage the power of machine learning to improve customer retention.

The first step in building a churn prediction model is to collect and prepare your data. This typically involves gathering data on your customers' behavior, demographics, and usage patterns. Once you have your data, you can upload it to DataRobot and let the platform do the rest. After training, DataRobot provides detailed insights into the model's performance, including feature importance, model validation, and accuracy metrics.

Once you have a model that you're satisfied with, you can generate predictions on new data using DataRobot's prediction API. This workflow assumes that you have already generated these predictions and saved them as a CSV file.

To create a Streamlit app for churn prediction, you will need to import the necessary libraries, including Pandas, NumPy, Streamlit, Plotly, and PIL. You can then read in your prediction data and set up your Streamlit app's page configuration.

The app itself should allow users to specify criteria for viewing churn scores and top churn reasons. You can accomplish this using sliders and other interactive elements.

A workflow of this process for building a Streamlit app using DataRobot predictions can be found in the churn Streamlit app GitHub repository. This workflow can be adapted to present insights from other classification or regression models built in DataRobot.
---
title: Word Cloud
description: Word Cloud displays the most relevant words and short phrases in word cloud format.

---

# Word Cloud {: #word-cloud }

Text variables often contain words that are highly indicative of the response. The **Word Cloud** insight displays up to the 200 most impactful words and short phrases in word cloud format.

Select a model from the Leaderboard and click **Understand > Word Cloud** to display the chart:

![](images/word-cloud.png)

{% include 'includes/word-cloud-include.md' %}
---
title: Anti-Money Laundering (AML) Alert Scoring
description: Build a model that uses historical data, including customer and transactional information, to identify which alerts resulted in a Suspicious Activity Report (SAR).

---

# Anti-Money Laundering (AML) Alert Scoring {: #anti-money-laundering-aml-alert-scoring }

In this use case you will build a model that uses historical data, including customer and transactional information, to identify which alerts resulted in a Suspicious Activity Report (SAR). The model can then be used to assign a suspicious activity score to future alerts and improve the efficiency of an AML compliance program using rank ordering by score.

Download the sample training dataset [here](https://s3.amazonaws.com/datarobot-use-case-datasets/DR_Demo_AML_Alert_train.csv).

[Click here](anti_money_laundering.ipynb) to jump directly to the notebook. Otherwise, the following several paragraphs describe the business justification and problem framing for this use case.

{% include 'includes/aml-1-include.md' %}

{% include 'includes/aml-2-include.md' %}

{% include 'includes/aml-3-include.md' %}

{% include 'includes/aml-4-include.md' %}

## Demo {:#demo}

See the notebook [here](anti_money_laundering.ipynb).
|  | Element | Description |
|---|---|---|
| ![](images/icon-1.png) | Filter by predicted or actual |  Narrows the display based on the predicted and actual class values. See [Filters](#filters) for details.|
| ![](images/icon-2.png) | Show color overlay | Sets whether to display the activation map in either black and white or full color. See [Color overlay](#color-overlay) for details. |
| ![](images/icon-3.png) | Activation scale | Shows the extent to which a region is influencing the prediction. See [Activation scale](#activation-scale) for details. |

See the [reference material](vai-ref#ref-map) for detailed information about Visual AI.

### Filters {: #filters }

Filters allow you to narrow the display based on the predicted and the actual class values. The initial display shows the full sample (i.e., both filters are set to *all*). You can instead set the display to filter by specific classes, limiting the display). Some examples:

| "Predicted" filter |  "Actual" filter  |   Display results  |
|--------------------|-------------------|--------------------|
| All    | All  | All (up to 100) samples from the validation set |
| Tomato Leaf Mold  | All  | All samples in which the predicted class was Tomato Leaf Mold                                   |
| Tomato Leaf Mold  | Tomato Leaf Mold | All samples in which both the predicted and actual class were Tomato Leaf Mold   |
| Tomato Leaf Mold  | Potato Blight  | Any sample in which DataRobot predicted Tomato Leaf Mold but the actual class was potato blight |


Hover over an image to see the reported predicted and actual classes for the image:

![](images/vai-20.png)


### Color overlay {: #color-overlay }

DataRobot provides two different views of the activation maps&mdash;black and white (which shows some transparency of original image colors) and full color. Select the option that provides the clearest contrast. For example, for black and white datasets, the alternative color overlay may make activation areas more obvious (instead of using a black-to-transparent scale). Toggle **Show color overlay** to compare.

![](images/vai-18.png)


### Activation scale {: #activation-scale }

The high-to-low activation scale indicates how much of a region in an image is influencing the prediction. Areas that are higher on the scale have a higher predictive influence&mdash;the model used something that was there (or not there, but should have been) to make the prediction. Some examples might include the presence or absence of yellow discoloration on a leaf, a shadow under a leaf, or an edge of a leaf that curls in a certain way.

Another way to think of scale is that it reflects how much the model "is excited by" a particular region of the image. It’s a kind of prediction explanation&mdash;why did the model predict what it did? The map shows that the reason is because the algorithm saw _x_ in this region, which activated the filters sensitive to visual information like _x_.
---
title: Public preview features
description: Read preliminary documentation for application-related features currently in the DataRobot public preview pipeline.
section_name: Workbench
maturity: public-preview
---

# Application public preview features {: #application-public-preview-features }

{% include 'includes/pub-preview-notice-include.md' %}

## Available public preview documentation {: #available-public-preview-documentation }

Public preview for... | Describes...
----- | ------
[New app experience ](wb-app-edit) | Enable the new application experience with model insights.
---
title: Over Time chart
description: How to use the Over Time chart, which helps identify trends and potential gaps in your data, for all time-aware projects (OTV, single series, and multiseries).

---

# Over Time chart  {: #over-time-chart}

The **Over time** chart helps you identify trends and potential gaps in your data by displaying, for both the original modeling data and the derived data, how a feature changes over the primary date/time feature. It is available for all time-aware projects (OTV, single series, and multiseries). For time series, it is available for each user-configured forecast distance. See also [Understand a feature's Over Time chart](ts-leaderboard#understand-a-features-over-time-chart).

Using the page's tools, you can focus on specific time periods. Display options for OTV and single-series projects differ than those of multiseries. Note that to view the **Over time** chart you must first compute chart data. Once computed:

1. Set the chart's granularity. The resolution options are auto-detected by DataRobot. All project types allow you to set a resolution (this option is under **Additional settings** for multiseries projects).

	![](images/fot-resolution.png)

2. Toggle the histogram display on and off to see a visualization of the bins DataRobot is using for EDA1.

3. Use the date range slider below the chart to highlight a specific region of the time plot. For smaller datasets, you can drag the sliders to a selected portion. Larger data sets use block pagination.

	![](images/fot-slide.png)

4. For multiseries projects	, you can set both the forecast distance and an individual series (or average across series) to plot:

	![](images/fot-resolution-multi.png)

For time series projects, the **Data** page also provides a [Feature Lineage](ts-leaderboard#feature-lineage-tab) chart to help understand the creation process for derived features.
---
title: Configure hyperparameters for custom tasks
description: Define the hyperparameters for a custom task.
section_name: AutoML
maturity: public-preview
---

# Configure hyperparameters for custom tasks {: #configure-hyperparameters-for-custom-tasks }

!!! info "Availability information"
    Hyperparameters for custom tasks is off by default. Contact your DataRobot representative or administrator for information on enabling the feature.

    <b>Feature flag:</b> Enable Custom Task Hyperparameters

Now available for public preview, you can define hyperparameters for a custom task. You must specify two values for each hyperparameter: the `name` and `type`. The type can be one of `int`, `float`, `string`, `select`, or `multi`. All types support a `default` value.  Integer and float values can have a `min` and `max` value specified. Certain type parameters require a list in the `values` field to define the accepted values. String type hyperparameters can accept any arbitrary string. Multi types have values specified as multiple of the aforementioned types, e.g. `float` and `select`.

View an example set of hyperparameters below.

```yaml
hyperparameters:
  # int: Integer value, must provide a min and max. Default is optional. Uses the min value if not provided.
  - name: seed
    type: int
    min: 0
    max: 10000
    default: 64
  # int: Integer value, must provide a min and max. Default is optional. Uses the min value if not provided.
  - name: kbins_n_bins
    type: int
    min: 2
    max: 1000
    default: 10
  # select: A discrete set of unique values, similar to an enum. Default is optional. Will use the first value if
  # not provided.
  - name: kbins_strategy
    type: select
    values:
      - uniform
      - quantile
      - kmeans
    default: quantile
  # multi: A parameter that can be of multiple types (int/float/select). Default is optional. Will use the first parameter
  # type's default value. This example uses select, the first entry, or for int/float, the min value.
  - name: missing_values_strategy
    type: multi
    values:
      float:
        min: -1000000.0
        max: 1000000.0
      select:
        values:
        - median
        - mean
        - most_frequent
    default: median
  # string: Unicode string. Default is optional. Is an empty string if not provided.
  - name: print_message
    type: string
    default: "hello world 🚀"
```

Access a custom task's hyperparameters via the `fit` method and add parameters to the `fit` function arguments, as shown below.

```yaml
def fit(
    X: pd.DataFrame,
    y: pd.Series,
    output_dir: str,
    class_order: Optional[List[str]] = None,
    row_weights: Optional[np.ndarray] = None,
    parameters: Optional[dict] = None,
    **kwargs,
):
```
---
title: Default language change in Japanese
description: DataRobot's natural language processing heuristics improvements.
---

# Default language change in Japanese {: #default-language-change-in-japanese }

<span style="color:red;font-size: 1rem"> `Robot 1`</span>

**Why did the default language change when modeling Japanese text features?**

Hi team, this is a question from a customer:

> When modeling with Japanese text features, the "language" used to be set to "english" by default. However, when I recently performed modeling using the same data, the setting was changed to "language=japanese". It has been basically set to "language=english" by default until now, but from now on, if I input Japanese, will it automatically be set to "language=japanese"?

I was able to reproduce this event with my data. The model created on July 19, 2022 had `language=english`, but when I created a model today with the same settings, it had `language=japanese`. Is this a setting that was updated when the default was changed from "Word N-Gram" to "Char N-Gram"?

<span style="color:red;font-size: 1rem"> `Robot 2`</span>

Before, for every dataset we showed "english", which is incorrect. Now after NLP Heuristics Improvements, we dynamically detect and set the dataset's language.

Additionally, we found that char-grams for Japanese datasets perform better than word-grams, thus we switched to char-grams for better speed & accuracy. But to keep Text AI Word Cloud Insights in a good shape, we also train 1 word-gram based blueprint so you can inspect both char & word-gram WCs.

Let me know if you have more questions, happy to help!

<span style="color:red;font-size: 1rem"> `Robot 1`</span>

Robot 2, thank you for the comment. I will tell the customer that NLP has improved and language is now properly set. I was also able to confirm that the word-gram based BP model was created as you mentioned. Thanks!
---
title: Use Cases
description: Describes creating a Use Case in DataRobot's Workbench and navigating the directory and assets.

---

# Use Cases {: #use-cases }

This section covers the following topics:

Topic   |   Describes...
---------|-----------------
[Use Cases](wb-build-usecase)  | Create, share, and manage Use Cases.
[Reference and FAQ](wb-usecase-ref)  | Questions and tips for working with Use Cases.
---
title: Select models using custom metrics
description: This AI Accelerator demonstrates how one can leverage DataRobot's Python client to extract predictions, compute custom metrics, and sort their DataRobot models accordingly.

---

# Select models using custom metrics {: #select-models-using-custom-metrics }

[Access this AI accelerator on GitHub <span style="vertical-align: sub">:material-arrow-right-circle:{.lg }</span>](https://github.com/datarobot-community/ai-accelerators/blob/main/advanced-experimentation/custom_metrics/custom_metrics.ipynb){ .md-button }

When it comes to evaluating model performance, DataRobot provides many of the standard metrics [out-of-the box](opt-metric), either on the [Leaderboard](tut-read-leaderboard) or as part of a [model insight](analyze-models/index).

However, depending on the industry, you may need to sort your DataRobot leaderboard by a specific metric not natively supported by DataRobot. This AI Accelerator demonstrates how one can leverage DataRobot's Python client to extract predictions, compute custom metrics, and sort their DataRobot models accordingly. The topics covered are as follows:

* Setup: import libraries and connect to DataRobot
* Build models with Autopilot
* Retrieve predictions and actuals
* Sort models by Brier Skill Score (BSS)
* Sort models by Rate@Top1%
* Sort models by return-on-investment (ROI)
This section provides preliminary documentation for features currently in the public preview pipeline. If not enabled for your organization, the feature is not visible.

Although these features have been tested within the engineering and quality environments, they should not be used in production at this time. Note that public preview functionality is subject to change and that any Support SLA agreements are not applicable.


!!! info "Availability information"
    Contact your DataRobot representative or administrator for information on enabling or disabling public preview features.