semvec/pypi-packages huggingface dataset:
keras-metrics 1.1.0
Metrics for Keras model evaluation
Keywords: keras metrics evaluation

# Keras Metrics

[![Build Status][BuildStatus]](https://travis-ci.org/netrack/keras-metrics)

This package provides metrics for evaluation of Keras classification models.
The metrics are safe to use for batch-based model evaluation.

## Installation

To install the package from the PyPi repository you can execute the following
command:
```sh
pip install keras-metrics
```

## Usage

The usage of the package is simple:
```py
import keras
import keras_metrics as km

model = models.Sequential()
model.add(keras.layers.Dense(1, activation="sigmoid", input_dim=2))
model.add(keras.layers.Dense(1, activation="softmax"))

model.compile(optimizer="sgd",
              loss="binary_crossentropy",
              metrics=[km.binary_precision(), km.binary_recall()])
```

Similar configuration for multi-label binary crossentropy:
```py
import keras
import keras_metrics as km

model = models.Sequential()
model.add(keras.layers.Dense(1, activation="sigmoid", input_dim=2))
model.add(keras.layers.Dense(2, activation="softmax"))

# Calculate precision for the second label.
precision = km.binary_precision(label=1)

# Calculate recall for the first label.
recall = km.binary_recall(label=0)

model.compile(optimizer="sgd",
              loss="binary_crossentropy",
              metrics=[precision, recall])
```

Keras metrics package also supports metrics for categorical crossentropy and
sparse categorical crossentropy:
```py
import keras_metrics as km

c_precision = km.categorical_precision()
sc_precision = km.sparse_categorical_precision()

# ...
```

## Tensorflow Keras

Tensorflow library provides the ```keras``` package as parts of its API, in
order to use ```keras_metrics``` with Tensorflow Keras, you are advised to
perform model training with initialized global variables:
```py
import numpy as np
import keras_metrics as km
import tensorflow as tf
import tensorflow.keras as keras

model = keras.Sequential()
model.add(keras.layers.Dense(1, activation="softmax"))
model.compile(optimizer="sgd",
              loss="binary_crossentropy",
              metrics=[km.binary_true_positive()])

x = np.array([[0], [1], [0], [1]])
y = np.array([1, 0, 1, 0]

# Wrap model.fit into the session with global
# variables initialization.
with tf.Session() as s:
    s.run(tf.global_variables_initializer())
    model.fit(x=x, y=y)
```

[BuildStatus]: https://travis-ci.org/netrack/keras-metrics.svg?branch=master
decode-datastore-client 0.2.0
Python client for the DECODE encrypted datastore

# decode-datastore-client

This library contains a minimal client library developed as part of the DECODE
project in order to provide a Python client for the encrypted datastore
component.

The purpose of this library is to enable a Python based client application to
easily read from and write to the datastore.

The datastore API is implemented using a simple RPC framework called
[Twirp](https://github.com/twitchtv/twirp). This framework uses protocol
buffers as a transport layer, and provides a suite of tools for generating
server stubs as well as client bindings in a number of programming languages
and can be thought of as being akin to a simpler version of
[GRPC](https://grpc.io).

## Documentation

Documentation for this library has been published to:
https://decode-datastore-client.readthedocs.io/en/latest/

Please have a look there for some more detailed installation instructions and
usage examples.