Keras Consistency Callback
A Keras callback that calculates your model’s consistency during training at each epoch. The callback prints the consistency and also adds the consistency at the end of each epoch to the training history under the consistency key.
Usage
Here is a usage example:
import pandas as pd
from numeraicb import Consistency
from keras.models import Sequential
from keras.layers.core import Dense
train = pd.read_csv('numerai_training_data.csv')
tourn = pd.read_csv('numerai_tournament_data.csv')
validation = tourn[tourn.data_type == 'validation']
features = ['feature{}'.format(i) for i in range(1, 51)]
X = train[features].values
Y = train.target.values
X_validation = validation[features].values
Y_validation = validation.target.values
model = Sequential()
model.add(Dense(30, kernel_initializer='uniform', input_dim=X.shape[1], activation='relu'))
model.add(Dense(1, activation='sigmoid'))
model.compile(optimizer='adamax', loss='binary_crossentropy')
cb = Consistency(tourn)
# Now your models consistency will be printed at each epoch
history = model.fit(X, Y, callbacks=[cb], validation_data=(X_validation, Y_validation))
# Consistency is stored in the history as well
for epoch, consistency in enumerate(history.history['consistency']):
print('consistency at epoch {}: {:.2%}'.format(epoch, consistency))
Metadata
Release files for numeraicb 1.0.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| numeraicb-1.0.1.tar.gz | 15.5 kB | Without provenance | Details for numeraicb-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| numeraicb-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for numeraicb-1.0.1-py3-none-any.whl |
Total release size: 19.6 kB
Release files / numeraicb-1.0.1.tar.gz
| Download URL | numeraicb-1.0.1.tar.gz |
|---|---|
| Size | 15.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0aaeab3b860581d7cb347357e407a9fe9b1278e0c372184d0699d7090ffaf9b3
|
|
BLAKE2b-256 checksum How to use checksums |
7f8abf5f60a161f3fcbd1424ea5304d2077c0120e66c83f0d14a3ac357261ccf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Release files / numeraicb-1.0.1-py3-none-any.whl
| Download URL | numeraicb-1.0.1-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
6cbbf5b911f42468eaa310527dc618a236d4df05cf773cfa1359a089e86428a3
|
|
BLAKE2b-256 checksum How to use checksums |
18b284a1b756aa1418d2f1579a7399056448720cce1f103c6b30518b82734f72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for numeraicb 1.0.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.