Skip to content

Commit

Permalink
Merge pull request #7 from artefactory/examples
Browse files Browse the repository at this point in the history
ADD Custom Model Examples
  • Loading branch information
VincentAuriau authored Jan 3, 2024
2 parents 69049d9 + 00a0dee commit e429f2c
Show file tree
Hide file tree
Showing 4 changed files with 484 additions and 19 deletions.
43 changes: 30 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
[![Linting , formatting, imports sorting: ruff](https://img.shields.io/endpoint?url=https://raw.githubusercontent.com/charliermarsh/ruff/main/assets/badge/v2.json)](https://github.com/astral-sh/ruff)
[![security: bandit](https://img.shields.io/badge/security-bandit-yellow.svg)](https://github.com/PyCQA/bandit)
[![Pre-commit](https://img.shields.io/badge/pre--commit-enabled-informational?logo=pre-commit&logoColor=white)](https://github.com/artefactory/choice-learn-private/blob/main/.pre-commit-config.yaml)

</div>

<img src="docs/choice_learn_official_logo.png" width="256">

Choice-Learn is a Python package designed to help you build with ease discrete choice models.
The package provides ready to use datasets and different models from the litterature. It also provides a lower level use if you want to customize any model or create your own from scratch. In particular you will find smart datasets handling to limit RAM usage and different structure commons to any choice model.

Expand All @@ -19,20 +22,44 @@ This repository contains a private version of the package.

- [choice-learn-private](#choice-learn-private)
- [Table of Contents](#table-of-contents)
- [What's in there ?](#whats-in-there)
- [Installation](#installation)
- [Usage](#usage)
- [Documentation](#documentation)
- [Repository Structure](#repository-structure)
- [Citation](#citation)

## What's in there ?

## Getting Started - Fast Track

You can find the following notebooks to help you getting started with the package:
- [Introduction to data management](notebooks/choice_learn_introduction_data.ipynb)
- [Introduction to modelling with the conditional logit model on ModeCanada dataaset](notebooks/choice_learn_introduction_clogit.ipynb)
- [Introduction to custom modelling with the ModeCanada dataset](notebooks/custom_model.ipynb)

## Installation

### User installation

To install the required packages in a virtual environment, run the following command:

** pip-install not possible yet, to come soon**
```bash
pip install choice-learn
```

In the mean time you can clone the repository:
```bash
git clone [email protected]:artefactory/choice-learn-private.git
```

### Dependencies
Choice-Learn requires the following:
- Python (>=...)
- NumPy (>=...)
- TensorFlow (>=...)
- pandas ?

## Usage

## Documentation
Expand All @@ -53,16 +80,6 @@ To build it and deploy it to GitHub pages, run the following command:
make deploy_docs
```

## Repository Structure
## Citation

```
.
├── .github <- GitHub Actions workflows and PR template
├── bin <- Bash files
├── config <- Configuration files
├── docs <- Documentation files (mkdocs)
├── lib <- Python modules
├── notebooks <- Jupyter notebooks
├── secrets <- Secret files (ignored by git)
└── tests <- Unit tests
```
### Contributors
12 changes: 6 additions & 6 deletions choice_learn/models/base_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -648,12 +648,12 @@ def _fit_with_lbfgs(self, dataset, n_epochs, tolerance=1e-8):
Parameters
----------
dataset : _type_
_description_
n_epochs : _type_
_description_
tolerance : _type_, optional
_description_, by default 1e-8
dataset : ChoiceDataset
Dataset to be used for coefficients estimations
n_epochs : int
Maximum number of epochs allowed to reach minimum
tolerance : float, optional
Maximum tolerance accepted, by default 1e-8
Returns:
--------
Expand Down
Binary file added docs/choice_learn_official_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit e429f2c

Please sign in to comment.