semvec/pypi-packages huggingface dataset:
lassobbn 1.0.0
Learning Bayesian Belief Networks with LASSO
Keywords: bayesian belief network,bayesian network,causal learning,causal discovery,lasso regression,structure learning

![pybbn logo](https://lasso-bbn.readthedocs.io/en/latest/_images/logo-250x250.png)

# LASSO BBN

Learning Bayesian Belief Networks (BBNs) with LASSO. Example code is as below. 

```python
from lassobbn.learn import learn_parameters, learn_structure, to_bbn, to_join_tree, posteriors_to_df

# Step 1. Learn the structure
df_path = './data/data-binary.csv'
meta_path = './data/data-binary-complete.json'

parents = learn_structure(df_path, meta_path, n_way=2, ignore_neg_gt=-0.01, ignore_pos_lt=0.05)

# Step 2. Learn the parameters
d, g, p = learn_parameters(df_path, parents)

# Step 3. Get the BBN
bbn = to_bbn(d, g, p)

# Step 4. Get the Join Tree
jt = to_join_tree(bbn)

```

You can then use [Py-BBN](https://py-bbn.readthedocs.io/) to create a BBN and join tree (JT) instance and perform exact inference.

# Installation

```bash
pip install lassobbn
```

# Links

- [Code](https://github.com/oneoffcoder/lasso-bbn)
- [Documentation](https://lasso-bbn.readthedocs.io/en/latest/index.html)
- [PyPi](https://pypi.org/project/lassobbn/)

# Additional APIs

turing_bbn                                                                            |  pyspark-bbn
:------------------------------------------------------------------------------------:|:---------------------------------------------------------------------------------------:
![turing_bbn logo](https://turing-bbn.oneoffcoder.com/_images/turing-bbn-150x150.png) |![pyspark-bbn logo](https://pyspark-bbn.oneoffcoder.com/_images/pyspark-bbn-150x150.png)

* [turing_bbn](https://turing-bbn.oneoffcoder.com/) is a C++17 implementation of py-bbn; take your causal and probabilistic inferences to the next computing level!
* [pyspark-bbn](https://pyspark-bbn.oneoffcoder.com/) is a is a scalable, massively parallel processing MPP framework for learning structures and parameters of Bayesian Belief Networks BBNs using [Apache Spark](https://spark.apache.org/).

# Citation

```
@misc{alemi_2021,
title={lasso-bbn},
url={https://lasso-bbn.readthedocs.io/},
author={F. Alemi, J. Vang},
year={2021},
month={Aug}}
```

# Copyright Stuff

## Software

```
Copyright 2021 Farrokh Alemi and Jee Vang

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

    http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
```

## Art Copyright

Copyright 2021 Daytchia Vang

# Sponsor, Love

- [Patreon](https://www.patreon.com/vangj)
- [GitHub](https://github.com/sponsors/vangj)
hello-g 0.1.5
Main backend module, which is used for developing web-app logic and deploying AI model.
Requires Python: >=3.7,<4.0

# backend-module

Main backend module, which is used for developing web-app logic and deploying AI model.

# Usage - Phase 1
**Step 1:** 
Install and update [Docker](https://docs.docker.com/get-docker/) and [Docker Compose](https://docs.docker.com/compose/install/).

**Step 2:**
Put the desired model into your app with the following path:
```
ml\model\<model_name>
```
**Step 3:** 
Config model name as an environment variable in **.env** file.

**Step 4:**
Build and run docker
```
$ docker-compose build
$ docker-compose up -d
```

# Usage - Phase 2

We develop a RESTful web controller into a reusable library between many AI models. With these functionalities: **Input model**, **Define data input**, **logging**, **exception handler**.

## Installing
Delivering and versioning as a [PyPi](https://pypi.org/) package.
Install and update using [pip](https://pip.pypa.io/en/stable/getting-started/):

```
$ pip install annhub-python
```
## A simple example
```python
from annhub_python import PyAnn

pyann = PyAnn()

# Define the expected AI model
pyann.set_model("D:\ARI\ANSCENTER\TrainedModel_c++.ann")

# Define which model ID will be used
pyann.set_model_id(5122020)

# Define the input corresponding to the choosen model
pyann.set_input_length(4)

if __name__ == "__main__":
    pyann.run(host = "0.0.0.0", port = 8080, debug = False)

```

## API 
The library will product two APIs: **health checking**, **predicting** as well as a [Swagger UI](https://swagger.io/) for API documentation.
```
GET: /api/v1/health
POST: /api/v1/predict
```
![Swagger UI](https://raw.githubusercontent.com/ans-ari/annhub-python/master/figures/swagger.png)
django-gift-registry 0.5.4
A minimal wedding registry or gift registry app.
Requires Python: >=3.6

=============
Gift Registry
=============

.. A minimal wedding registry or gift registry app.

Create a list of gifts ideas that can then be reserved by guests.

Guests can browse the list of gift ideas and reserve one by entering their email
address. The item is then marked as chosen for the information of other guests.
No registration is required, just an email address to send confirmation.

Gifts ideas can be either items that you only want one of, or items that you
would be happy to receive multiples of (eg. a gift voucher). You can add a
picture, description and URL for each item.

The registry doesn't take payment or allow the gift to be directly purchase, it
simply allows gift ideas to be reserved.


Quick start
-----------

1. Add the following required Django settings:

   .. code-block:: python

          INSTALLED_APPS = [
              ...
   	   'django.contrib.sites',
              'gift_registry',
   	   ...
          ]

          SITE_ID = 1
          GIFT_REGISTRY_SETTINGS = {
              'EVENT_NAME': "Alice and Bob's Wedding",
          }

2. Include the gifts URLconf in your project urls.py like this:

   .. code-block:: python

          path('', include('gift_registry.urls')),

   and a line to serve uploaded media in development:

   .. code-block:: python

          from django.conf import settings
          from django.conf.urls.static import static
          urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

3. Run ``python manage.py migrate`` to create the Gift Registry models.

4. Run ``python manage.py createsuperuser --username=admin --email=test@example.com``.

5. Start the development server and visit the Django Admin at
   ``http://127.0.0.1:8000/admin/gift_registry/gift/`` to add gift ideas.

6. Visit ``http://127.0.0.1:8000/`` to browse the public list.

7. Before deployment, be sure to add a "Site" via the Django Admin to ensure the
   outgoing emails include the correct link back to the website.


Customising
-----------

There's a good chance that you'll want to customise the look and feel. You do
this by overriding the built-in templates.

Add your own template directory to ``settings.TEMPLATE_DIRS`` and override the base
template here. To do this, first create a ``gift_registry`` directory in your
templates directory. Then from within the django-gift-registry package, copy
``gift_registry/templates/gift_registry/base.html`` into your newly created
``gift_registry`` directory. Customise this base.html file with your own HTML and
CSS.

..
   Local Variables:
   mode: rst
   End:

Release History
---------------

0.5.4 (2021-09-29)
++++++++++++++++++

Switch to setup.cfg.


0.5.3 (2021-09-22)
++++++++++++++++++

Upgraded for Python 3 and Django 3.2.


0.4.3 (2015-08-04)
++++++++++++++++++

Initial version.