Skip to main content

Weakly Supervised Learning

Description

This is a Python framework for weakly supervised learning. This package can be used for weak supervised learning classification tasks.

Installation

You can install it by pip method.

pip install weaklysupervised

API

We have implemented following weakly-supervised learning algorithm.

  • bootstrapping

Examples

from examples_utils import get_data, DNN
from sklearn import metrics
from weaklysupervised import BootstrappingNeuralNetworkClassifier

if __name__ == "__main__":
    X_train, X_test, y_train, y_test = get_data()
    DNN = DNN()
    clf = DNN.build_model(input_dim=30, output_dim=2)
    model = BootstrappingNeuralNetworkClassifier(clf, batch_size=128, epochs=40, bootstrapping_type="soft",
    beta=0.95, patience=5, best_model_name="model_check_point_best_model")
    model.fit(X_train, y_train, validation_data=(X_test, y_test), )
    predict = model.predict(X_test)
    acc = metrics.accuracy_score(y_test, predict)
    print("bootstrapping accuracy", acc)

Please see examples folder for more examples.

Metadata

Release files for weaklysupervised 0.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for weaklysupervised 0.0.5
File Size Uploaded
weaklysupervised-0.0.5.tar.gz 4.5 kB Details

Release files / weaklysupervised-0.0.5.tar.gz

Download URL weaklysupervised-0.0.5.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
aa8905c096f37c9449def0c569dd8b37e65e71dbad267750e993cce672168a3a
BLAKE2b-256 checksum
How to use checksums
baa459ba38f40607988e731b584d2548e8d21a94c2431d0b13de0bcc795a0d96
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release history Release notifications | RSS feed

This release

0.0.5 This release

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page