Giter Site home page Giter Site logo

rosefun / weaklysupervisedlearning Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 14 KB

Weakly supervised learning framework for classification.

Home Page: https://pypi.org/project/weaklysupervised/

License: MIT License

Python 100.00%
weakly-supervised-learning weak-supervision deep-learning weakly-supervised framework

weaklysupervisedlearning's Introduction

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.

weaklysupervisedlearning's People

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.