iQual#

MIT license PyPI version Docs - GitHub.io

This repository contains the code and resources necessary to implement the techniques described in the paper A Method to Scale-Up Interpretative Qualitative Analysis, with an Application to Aspirations in Cox’s Bazaar, Bangladesh. The iQual package is designed for qualitative analysis of open-ended interviews and aims to extend a small set of interpretative human-codes to a much larger set of documents using natural language processing. The package provides a method for assessing the robustness and reliability of this approach. The iQual package has been applied to analyze 2,200 open-ended interviews on parent’s aspirations for children from Rohingya refugees and their Bangladeshi hosts in Cox’s Bazaar, Bangladesh.

With iQual, researchers can efficiently analyze large amounts of qualitative data while maintaining the nuance and accuracy of human interpretation.


Installation#

  • To install iQual using pip, use the following command:

pip install -U iQual

Getting Started#

For a quick introduction to using iQual, check out our Getting Started notebook. This tutorial provides:

  • A complete overview of the basic workflow

  • Step-by-step examples using real-world data

  • Clear explanations of key concepts

  • Code you can run immediately

This notebook is perfect for new users who want to understand iQual’s core functionality without diving into the technical details.


Model Training#

The Model Training notebook demonstrates advanced training techniques including cross-validation and hyperparameter optimization using the same politeness dataset from Getting Started.


Features#

iQual is a package designed for qualitative analysis of open-ended interviews. It allows researchers to efficiently analyze large amounts of qualitative data while maintaining the nuance and accuracy of human interpretation.


Basic Usage#

The following code demonstrates the basic usage of the iQual package:

from iqual import iqualnlp     # Import `iqualnlp` from the `iqual` package

iqual_model = iqualnlp.Model() # Initiate the model class

# Add text features (using TF-IDF vectorization by default)
iqual_model.add_text_features('question', 'answer')

# Add a classifier (Logistic Regression by default)
iqual_model.add_classifier()

# Add a threshold layer for improved performance on imbalanced data
iqual_model.add_threshold()

# Compile the model
iqual_model.compile()

# Fit the model to your data
iqual_model.fit(X_train, y_train)

# Make predictions
y_pred = iqual_model.predict(X_test)

For a more detailed introduction, check out our Getting Started notebook.


Notebooks#

The notebooks folder contains detailed examples on using iQual:

  • Getting Started A complete introduction to iQual with a self-contained example for new users.

  • Basic Modelling These notebooks demonstrate the basic usage of the package, the pipeline construction, and the vectorization and classification options.

  • Advanced Modelling These notebooks demonstrate advanced pipeline construction, mixing and matching of feature extraction and classification methods, and model selection.

  • Interpretability These notebooks demonstrate the interpretability and related tests for measurement and comparison of interpretability across human and enhanced (machine + human) codes.

  • Bias and Efficiency These notebooks demonstrate the bias and efficiency tests for determining the value and validity of enhanced codes.


Citation & Authors#

If you use this package, please cite the following paper:

A Method to Scale-Up Interpretative Qualitative Analysis, with an Application to Aspirations in Cox’s Bazaar, Bangladesh

Ashwin,Julian; Rao,Vijayendra; Biradavolu,Monica Rao; Chhabra,Aditya; Haque,Arshia; Khan,Afsana Iffat; Krishnan,Nandini.
A Method to Scale-Up Interpretative Qualitative Analysis, with an Application to Aspirations in Cox’s Bazaar, Bangladesh (English). (Policy Research Working Paper No. WPS 10046)
Paper is funded by the Knowledge for Change Program (KCP) Washington, D.C. : World Bank Group.
http://documents.worldbank.org/curated/en/099759305162210822/IDU0a357362e00b6004c580966006b1c2f2e3996

Maintainers#

Please contact the following people for any queries regarding the package:#