Implementation of latent factor model with subgroup penalty for crowdsourcing
Project description
Package Documentation:
Description:
Crowdsourcing Utilizing Subgroup Structure of Latent Factor Modeling
In our project, we issue a Python implementation for learning from crowdsourcing data using a Latent Factor Gaussian Process (LFGP) model to predict the true labels for multicategory classification tasks. The Latent Factor Gaussian Process model is a powerful way to deal with the noise in crowdsourced labels. The class includes methods for initializing task members, worker members, and various model parameters. It also provides functionalities for binary and multi-categorical crowdsourcing.
Features
The class LFGP
includes the following methods:
- Initialization of task members
- Initialization of worker members
- Initialization of binary parameters
- Initialization of orthogonal matrices
- Update of A and B (latent factors) for binary crowdsourcing
- Binary fit for model training
Installation
You can install this python package by first making sure that you have the Python 3.6 version or later. You can check your Python version by running the following command:
python --version
Install with pip The easiest way to install lfgp is by using pip, Python's package installer. Run the following command in your terminal:
pip install lfgp
Furthermore, the following packages are required for installation in order to use our code:
- operator - a built-in Python module providing functions corresponding to intrinsic operators.
- numpy - for numerical computations.
- ray - for parallel and distributed computing. The default chord for the ray package is 1.
- scipy - specifically scipy.stats for statistical computations.
- numpy_indexed - for advanced operations on numpy arrays.
- sklearn.cluster - specifically sklearn.cluster.KMeans for the k-means clustering algorithm.
Our code also imports several functions (logistic_reg
, label_swap
, data_converter
, multinominal_reg1
, multinomial_reg2
, cayley_transform
) from a src.util module and DawidSkeneModel from src.dawid_skene_model
Usage
Here's an example of how to use the LFGP
class:
from lfgp import LFGP
model = LFGP()
model._binary_fit(data, scheme="mv", maxiter=100, epsilon=1e-3, verbose=0)
Please refer to the in-code documentation and comments for more detailed information on how to use each method.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.