Skip to content

Commit

Permalink
Merge pull request #67 from LuoXueling/dev-xlluo
Browse files Browse the repository at this point in the history
Update documentation
  • Loading branch information
LuoXueling authored Sep 25, 2024
2 parents 7e57060 + 586542e commit 13b9fb6
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 4 deletions.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ The package stands on the shoulder of the giants:

## Installation/Usage

A full documentation is available [here](https://tabular-ensemble.readthedocs.io/en/latest/index.html). For a quick start:

1. `tabular_ensemble` can be installed using pypi by running the following command:

```shell
Expand Down Expand Up @@ -89,7 +91,7 @@ python main.py --base sample --epoch 10
```
where `--base` refers to the configuration file, and additional arguments (such as `--epoch` here) refer to those in `config/default.py`.

See the documentation pages for details.
See the [documentation pages](https://tabular-ensemble.readthedocs.io/en/latest/index.html) for details.

## Citation

Expand Down
1 change: 1 addition & 0 deletions docs/source/examples/get_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ Get Started
:maxdepth: 2

get_started/installation
get_started/quick_start
get_started/run_sample
get_started/new_dataset
get_started/inference
Expand Down
19 changes: 16 additions & 3 deletions docs/source/examples/get_started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,17 @@

## Ubuntu

Before installing `tabular-ensemble`, `PyTorch` should be installed first following its [documentation](https://pytorch.org/get-started/locally/).
Before installing `tabular-ensemble`, `torch>=1.12.0` should be installed first following its [documentation](https://pytorch.org/get-started/locally/).

### From PyPI

```shell
pip install tabensemb
```

Use `pip install tabensemb[test]` instead if you want to run unit tests.

### From source

Clone the repository from GitHub

Expand All @@ -17,10 +27,13 @@ Then install the package
pip install -e .
```

To test the functionality of the package
Use `pip install -e .[test]` instead if you want to run unit tests.

### Unit test

To run unit tests:

```shell
pip install -e .[test]
cd test
pytest .
```
Expand Down
23 changes: 23 additions & 0 deletions docs/source/examples/get_started/quick_start.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Quick start

Place your `.csv` or `.xlsx` file in a `data` subfolder (e.g., `data/sample.csv`), and generate a configuration file in a `configs` subfolder (e.g., `configs/sample.py`), containing the following content
```python
cfg = {
"database": "sample",
"continuous_feature_names": ["cont_0", "cont_1", "cont_2", "cont_3", "cont_4"],
"categorical_feature_names": ["cat_0", "cat_1", "cat_2"],
"label_name": ["target"],
}
```

Run the experiment using the configuration and the data using
```python
python main.py --base sample --epoch 10
```
where `--base` refers to the configuration file, and additional arguments (such as `--epoch` here) refer to those in `config/default.py`.

Here is a typical usage of the repository

```python
python main.py --base sample --epoch 200 --batch_size 128 --bayes_opt --split_ratio 0.6 0.2 0.2
```

0 comments on commit 13b9fb6

Please sign in to comment.