semvec/pypi-packages huggingface dataset:
mlre 0.4.0
Machine Learning Research Environment
Requires Python: >=3.7

# MLRE: Machine Learning and Research Environment.
[![Build Status](https://travis-ci.org/cabrust/mlre.svg?branch=master)](https://travis-ci.com/cabrust/mlre)
[![Build Status (Develop)](https://travis-ci.org/cabrust/mlre.svg?branch=develop)](https://travis-ci.com/cabrust/mlre)
[![codecov](https://codecov.io/gh/cabrust/mlre/branch/master/graph/badge.svg)](https://codecov.io/gh/cabrust/mlre)
[![Maintainability](https://api.codeclimate.com/v1/badges/fce3f41be52403aaa260/maintainability)](https://codeclimate.com/github/cabrust/mlre/maintainability)
[![License](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](https://opensource.org/licenses/BSD-3-Clause)

MLRE is a collection of tools that may help machine learning researchers and developers.

## Radar
Radar is a networked event reporting library. Its main feature is the freeze frame support, where with each event we record observations from the environment to aid in debugging. This type of tracing is inspired by the automotive industry.

#### Starting the Radar API server:
``` shell script
FLASK_APP=mlre.radar.radar_app:create_default_app flask run
```
autolabel 0.0.1
Autolabel is an image labeling tool using Neural Network
Requires Python: >=3.6

# Autolabel

Autolabel is an image labeling tool.
Currently images are labeled using [ResNet18-152](https://arxiv.org/abs/1512.03385) implemented by [pytorch](https://pytorch.org/hub/pytorch_vision_resnet/).
Autolabel can be used as a cli tool or as a library.

## Installation
```
python setup.py install
```

## Command line usage
See `--help` for a command overview
```
Usage: autolabel [OPTIONS] [IMAGES]...

Options:
  --batch-size INTEGER
  --sep TEXT                      Separator
  --top INTEGER
  -o, --output FILENAME           Output file
  -m, --model [resnet18|resnet34|resnet50|resnet101|resnet152]
  --help                          Show this message and exit.
```

In the simplest form this mean:
```bash
autolabel image.jpg
```

Autolabel supports reading file names from STDIN:
```bash
find /myimages -type f -iname '*.jpg' | autolabel
```


## Library usage
```python
from autolabel.image import ImageListDataset
from autolabel.classifier.resnet import Resnet18Classifier
from pathlib import Path

classifier = Resnet18Classifier()
images = [Path('/path/to/image.jpg'), Path('/path/to/another/image.png')]
dataset = ImageListDataset(images)
res = classifier.predict(dataset, top=top)
for p, decoded in res.items():
    print(p, decoded)
```
multigaussampler 0.1.1
Sampling from a Maximum-Likelihood fitted Multi-Gaussian distribution in TensorFlow 2.1

# Multi-Gaussian Sampling 

The parametrization of conditional probability density function plays a crucial 
role in the simulations used to produce quickly large samples of data emulating 
real-life datasets. 

A very simple technique is based on the explicit modelling of the probability 
density function of the target dataset as a function of the conditions through 
the sum of kernel functions. 

The package`multigaussampler` offers a simple Python3 implementation of this 
simple algorithm. The model of the `pdf` is obtained through a maximum 
likelihood fit of a probability density function obtained as sum of 
Gaussians, optimized using the TensorFlow implementation of the Adam optimizer. 

The sampling of the `pdf` is also implemented in TensorFlow to provide 
efficient sampling on both CPU and GPU infrastructures. 

### Example code 
The code snippet below trains a sampler on a random dataset and generates
a random sample of y variables on top of the same X variables used for training.
```
import numpy as np

## Generate a random dataset as an example
nSamples = 1000 
X = np.random.uniform ( -20, 10,  (nSamples,4)).astype (np.float32) 
y = np.random.uniform ( 0, 1,     (nSamples,2)).astype (np.float32) 

#from multigaussampler import MGSampler
## Creates and configure the MGSampler object
gp = MGSampler(X,y) 

## Train the MGSampler on the training dataset
from tqdm import trange
progress_bar = trange ( 100 )
for iEpoch in progress_bar:
  l = gp.train ( X,y ) 
  progress_bar.set_description ( "Loss: %.1f " % l ) 

## Sample the obtained parametrization
gp.sample (X) 
```

### Author
Lucio Anderlini (Istituto Nazionale di Fisica Nucleare)