semvec/pypi-packages huggingface dataset:
rumboost 1.0.2
Gradient Boosting Decision Trees for Random Utility Models
Requires Python: >=3.11

<img src="logo/rumboost_logo.png" width="950">

---------------------------------

[![Documentation Status](https://readthedocs.org/projects/rumboost/badge/?version=latest)](https://rumboost.readthedocs.io/) [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.org/NicoSlvd/rumboost/LICENSE.md) [![Python Versions](https://img.shields.io/pypi/pyversions/rumboost.svg?logo=python&logoColor=white)](https://pypi.org/project/rumboost) [![PyPI Version](https://img.shields.io/pypi/v/rumboost.svg?logo=pypi&logoColor=white)](https://pypi.org/project/rumboost)

## Description

RUMBoost is a python package to estimate Random Utility models with Gradient Boosted Decision Trees. More specifically, each parameter in the traditional utility function is replaced by an ensemble of regression trees with appropriate constraints to: i) ensure the guarantee of marginal utilities monotonicity; ii) incorporate alternative-specific attributes; and iii) provide an intrinsically interpretable non-linear form of the utility function, directly learnt from the data.

Currently RUMBoost can estimate the following RUMs:

- MNL
- Nested Logit
- Cross-Nested Logit
- An equivalent of the Mixed Effect model

For more details, you can refer to the [preprint](https://papers.ssrn.com/sol3/papers.cfm?abstract_id=4701222) of our paper.

## Installation

RUMBoost is launched on pypi. You can install it with the following command:

`pip install rumboost`

We recommend to install rumboost in a separate environment with its dependencies.

## Documentation and example
The full documentation can be found [here](https://rumboost.readthedocs.io/en/latest/). In addition, you can find several examples on how to use RUMBoost under the example folder. Currently, there are seven example notebooks. We recommend using them in this order:

1. simple_rumboost: how to train and plot parameters of a simple RUMBoost model
2. feature_interaction: how to include feature interactions for training and plotting
3. nested: how to train a nested logit RUMBoost model
4. functional_effect: how to train and plot a functional effect RUMBoost model
5. cross-nested: how to train a cross-nested logit RUMBoost model
6. bootstrap: how to test the model robustness
7. smoothing_and_vot: how to smooth a RUMBoost output and plot the smoothed version, as well as computing and plotting VoT

## Bug reports and feature requests
If you encounter any issues or have ideas for new features, please open an [issue](https://github.com/NicoSlvd/rumboost/issues). You can also contact us at nicolas.salvade.22@ucl.ac.uk

## License
This project is licensed under the MIT License - see the [LICENSE](LICENSE.txt) file for details.

## Reference paper (preprint)

Salvadé, Nicolas and Hillel, Tim, Rumboost: Gradient Boosted Random Utility Models. Available at SSRN: https://ssrn.com/abstract=4701222 or http://dx.doi.org/10.2139/ssrn.4701222
llmdataset 1.0.0
llm dataset
Requires Python: >=3.9,<4.0

# LLM dataset

## How to use
- install
    - https://pypi.org/project/llmdataset/
```
pip install llmdataset
```
- setting
```python
dataloader = llmdataset.dataloader(
    data_type='train',
    batch_size=4,
    seed=3655,
    max_data=5
    )
```
- execution
```
for i in dataloader:
    print('------')
    print(i)
```

## Useful dataset
- GSM8K
    - https://huggingface.co/datasets/gsm8k
```python
llmdataset = main.LLMdataset(dataset_name="gsm8k", subset='main')
```
- MultiArith
    - https://huggingface.co/datasets/ChilleD/MultiArith
```python
llmdataset = main.LLMdataset(dataset_name="ChilleD/MultiArith")
```

- Big Bench
    - https://huggingface.co/datasets/bigbench
```python
llmdataset = main.LLMdataset(dataset_name="tasksource/bigbench", subset = "abstract_narrative_understanding")
```

- Big Bench Hard
    - https://huggingface.co/datasets/lukaemon/bbh
```python
llmdataset = main.LLMdataset(dataset_name="reasoning-machines/gsm-hard", subset="boolean_expressions")
```

- GSM Hard
    - https://huggingface.co/datasets/reasoning-machines/gsm-hard
```python
llmdataset = main.LLMdataset(dataset_name="reasoning-machines/gsm-hard")
```

- wikitablequestions
    - https://huggingface.co/datasets/wikitablequestions?row=0
```python
llmdataset = main.LLMdataset(dataset_name="wikitablequestions")
```

- StrategyQA
    - https://huggingface.co/datasets/ChilleD/StrategyQA?row=0
```python
llmdataset = main.LLMdataset(dataset_name="ChilleD/StrategyQA")
```

- ARC
    - https://huggingface.co/datasets/allenai/ai2_arc
```python
llmdataset = main.LLMdataset(dataset_name="allenai/ai2_arc", subset = "ARC-Challenge")
```

- AQuA-RAT
    - https://huggingface.co/datasets/aqua_rat/viewer/raw
```python
llmdataset = main.LLMdataset(dataset_name="aqua_rat", subset = "raw")
```

- GPQA
    - https://huggingface.co/datasets/Idavidrein/gpqa
```python
llmdataset = main.LLMdataset(dataset_name="Idavidrein/gpqa", subset = "gpqa_diamond")
```

- SVAP
    - https://huggingface.co/datasets/ChilleD/SVAMP?row=0
```python
llmdataset = main.LLMdataset(dataset_name="ChilleD/SVAMP")
```

- CommonsenseQA
    - https://huggingface.co/datasets/tau/commonsense_qa
```python
llmdataset = main.LLMdataset(dataset_name="tau/commonsense_qa")
```