All Projects → netrack → Keras Metrics

netrack / Keras Metrics

Licence: mit
Metrics for Keras. DEPRECATED since Keras 2.3.0

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Keras Metrics

Dynamodb Marshaler
Translates sane javascript objects (and JSON) into DynamoDb format and vice versa.
Stars: ✭ 112 (-31.71%)
Mutual labels:  deprecated
React Panels
React.js panel widget with support for tabs, toolbars, buttons and customizable themes
Stars: ✭ 128 (-21.95%)
Mutual labels:  deprecated
Vip Scanner
Deprecated: Scan all sorts of themes and files and things! Use PHPCS and the VIP coding standards instead
Stars: ✭ 143 (-12.8%)
Mutual labels:  deprecated
Mate
Deprecated: Mate manages AWS Route53 and Google CloudDNS records for your Kubernetes services and ingresses. (moved from https://github.com/zalando-incubator/mate)
Stars: ✭ 114 (-30.49%)
Mutual labels:  deprecated
Intern Only Dojo
DEPRECATED - See dojo/meta for the latest on Dojo 2
Stars: ✭ 123 (-25%)
Mutual labels:  deprecated
Cmsplugin Filer
DEPRECATED, this project is no longer maintained, see README for more information.
Stars: ✭ 129 (-21.34%)
Mutual labels:  deprecated
Python Api Client
[discontinued] Python interfaces to the Meetup Web API
Stars: ✭ 111 (-32.32%)
Mutual labels:  deprecated
Sphero Android Sdk
🚫 DEPRECATED REPO: Sphero™ is the amazing robotic ball ( gosphero.com ), this is the repository for the Android SDK for Sphero™. Visit dev site for more information:
Stars: ✭ 160 (-2.44%)
Mutual labels:  deprecated
Ticons Server Php
⛔️ REPLACED BY NODE.JS VERSION:
Stars: ✭ 127 (-22.56%)
Mutual labels:  deprecated
Httpserver.jl
DEPRECATED! Basic, non-blocking HTTP server in Julia.
Stars: ✭ 138 (-15.85%)
Mutual labels:  deprecated
Codeigniter Base Controller
⛔️DEPRECATED CodeIgniter base controller with view autoloading and layout support
Stars: ✭ 115 (-29.88%)
Mutual labels:  deprecated
Go Web3
Ethereum Go Client [obsolete]
Stars: ✭ 120 (-26.83%)
Mutual labels:  deprecated
Nexpose Client
DEPRECATED: Rapid7 Nexpose API client library written in Ruby
Stars: ✭ 134 (-18.29%)
Mutual labels:  deprecated
Atom Esformatter
Beautify JavaScript
Stars: ✭ 113 (-31.1%)
Mutual labels:  deprecated
Jquery Simulate Ext
jQuery simulate extended
Stars: ✭ 144 (-12.2%)
Mutual labels:  deprecated
Keywhiz Fs
A DEPRECATED file-system client for Keywhiz
Stars: ✭ 112 (-31.71%)
Mutual labels:  deprecated
Bselect
DEPRECATED - The select decorator component that was missing for Twitter Bootstrap.
Stars: ✭ 129 (-21.34%)
Mutual labels:  deprecated
Elasto
DEPRECATED: Simple library to query Elasticsearch
Stars: ✭ 163 (-0.61%)
Mutual labels:  deprecated
Redditkit.rb
[Deprecated] A Ruby wrapper for the reddit API
Stars: ✭ 156 (-4.88%)
Mutual labels:  deprecated
Gh
(DEPRECATED) GitHub CLI made with NodeJS
Stars: ✭ 1,701 (+937.2%)
Mutual labels:  deprecated

Keras Metrics

Deprecation Warning

Since Keras version 2.3.0, it provides all metrics available in this package. It's preferrable to use metrics from the original Keras package.

This package will be maintained for older version of Keras (<2.3.0).

Build Status

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:

pip install keras-metrics

Usage

The usage of the package is simple:

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:

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:

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:

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)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].