# Information based ML

## Decision Tree(cart)

### Input Data

|                   |                                                                                       |
| ----------------- | ------------------------------------------------------------------------------------- |
| **\*Target Data** | Input Data                                                                            |
| **\*Model Name**  | Name of the model                                                                     |
| **Output Name**   | Name of the output after the calculation(optional)                                    |
| **Merge Data**    | If not empty, the prediction data will be stored in the selected data frame(optional) |
| **\*X**           | Independent variables                                                                 |
| **\*Y**           | Dependent variable                                                                    |

![\[Task Information of Decision Tree\]](/files/-MKuoAm6cW42MbcPDa33)

## Random Forests

### Input Data

|                   |                                                                                                                                                                         |
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **\*Target Data** | Input Data                                                                                                                                                              |
| **\*Model Name**  | Name of the model                                                                                                                                                       |
| **Output Name**   | Name of the output after the calculation(optional)                                                                                                                      |
| **Merge Data**    | If not empty, the prediction data will be stored in the selected data frame(optional)                                                                                   |
| **X**             | Independent variables                                                                                                                                                   |
| **Y**             | <p>Dependent variable.</p><p></p><ul><li>If the variable for Y is not a factor, convert it by using <strong>Convert Factor</strong> before running the model.</li></ul> |

![\[Task Information of Random Forests\]](/files/-MKvN123mkEDM6h-bPdj)

## Decision Tree (C5.0)

### Input Data

|                   |                                                                                                                                                                                   |
| ----------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **\*Target Data** | Input Data                                                                                                                                                                        |
| **\*Model Name**  | Name of the model                                                                                                                                                                 |
| **Output Name**   | Name of the output after the calculation(optional)                                                                                                                                |
| **Merge Data**    | If not empty, the prediction data will be stored in the selected data frame(optional)                                                                                             |
| **X**             | Independent variables                                                                                                                                                             |
| **Y**             | <p>Dependent variable. Factor type only</p><ul><li>If the variable for Y is not a factor, convert it by using <strong>Convert Factor</strong> before running the model.</li></ul> |

![\[Task Information of Decision Tree(C5.0)](/files/-MKvQYMppo-hucYwbQfT)

## Workflow Example&#x20;

![](/files/-MLWaj_twwRwOyCl7BSE)

## R Packages

**Decision Tree (cart)**

Package name: rpart, Method: rpart

<https://cran.r-project.org/web/packages/rpart/index.html>

**Random Forests**

Package name: randomForest, Method: randomForest

<https://cran.r-project.org/web/packages/randomForest/index.html>

**Decision Tree (C5.0)**

Package name: C50, Method: C5.0.default

<https://cran.r-project.org/web/packages/C50/index.html>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://hwasumok.gitbook.io/r-flow/r/machine-learning/information-based-ml.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
