Skip to main content

Identify top factors that predict rates of adoption

Project description

TechAdoption

version 1.0 released on May 30, 2020

Description

TechAdoption allows for the identification of top features predictive of technology adoption and creates a model to predict adoption. The software package interfaces with Magpi generated datasets created using the Ethnographic Decision Model (EDM) methodology. The model can also be tested uses other datasets not used to build the model. For more information on the EDM methodology, please refer to "Ethnographic Decision Tree Modeling" Book by Christina H. Gladwin and the fifth edition of "Research Methods in Anthropology: Qualitative and Quantitative Methods" by H. Russel Bernard.

Requirements

TechAdoption is a python software package. I recommend downloading Miniconda that includes python and all necessary dependencies to run TechAdoption.

Installation

Use the package manager pip to install TechAdoption from the Anaconda command prompt.

pip install TechAdoption

Usage

To build the model, run Build_Model.py from your current working directory (cwd) with the number of devices or options in your dataset (nd) and number of questions asked per device or option (nq) which are mandatory inputs. Example below for 4 devices/options and 30 questions.

cwd\python Build_Model.py -nd 4 -nq 30

For other optional inputs, use the help command.

cwd\python Build_Model.py -help

After running the above line, a window will pop up allowing you to select the Magpi csv file to build the model.

Outputs from running this code include:

  1. the accuracy of the model
  2. a printed list of features influencing adoption in descending order of importance
  3. bar chart with the features in descending order of important (Plot_Variable_Importance.png)
  4. scatter plot with predicted versus actual data and corresponding accuracy (Plot_Predicted_Actual.png)
  5. one random forest tree for illustrative purposes (Plot_tree.png) - model and variable importances are based on the average of 1000 (default) of these trees

To test the model using an independent dataset, run Predict_Model.py from your current working directory with the number of devices in your dataset (nd) and number of questions asked per device (nq) which are mandatory inputs. Example below for 4 devices and 30 questions. Again, the same optional inputs are available for input at this time as well.

cwd\python Test_Model.py -nd 4 -nq 30

After running the above line, a window will pop up allowing you to select the Magpi csv file to build the model. A second window will then pop up allowing you to then select the Magpi csv file to test the model.

Example

To try running an example, run the following line of code.

cwd\python Build_Model.py -nd 8 -nq 12

When the window pops up to select a csv file, choose "Magpi_Dummy_data.csv" from the "example" folder inside the software package. The outputs of the model and plots should be similar to those in the "example" folder. It is important to note that random forests are "random" so results may vary a bit, but overall trends should be consistent.

Testing

The Test folder contains the Test_Build_Model.py. This file runs various tests on the functions in the Build_Model.py file. If any changes are made to the code, please varify that all tests pass. To run tests, set your working directory to the outermost level of the package and run the below line of code.

cwd\pytest

Support

Please email peiffer.erin@gmail.com if you have any questions or would like further support.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

Authorship

Created by Erin Peiffer, Spring 2020

To cite: Peiffer, E (2020) TechAdoption (Version 1.0) [Software package].

  • Web address or publisher (e.g. program publisher, URL)

License

MIT

Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning.

Unreleased

0.1.0 - 2020-06-15

Added/Changed/Fixed

  • Answer "Should you ever rewrite a change log?".

''' add github link to each change '''

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TechAdoption-0.1.0.tar.gz (9.1 kB view details)

Uploaded Source

Built Distributions

TechAdoption-0.1.0-py3.6.egg (22.4 kB view details)

Uploaded Source

TechAdoption-0.1.0-py3-none-any.whl (12.5 kB view details)

Uploaded Python 3

File details

Details for the file TechAdoption-0.1.0.tar.gz.

File metadata

  • Download URL: TechAdoption-0.1.0.tar.gz
  • Upload date:
  • Size: 9.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.5

File hashes

Hashes for TechAdoption-0.1.0.tar.gz
Algorithm Hash digest
SHA256 11d787f1cf388ded5cb601db74987bdc5fefded64c316f02de32a92fb7ff47dc
MD5 6dc699044d830a0896dcf3aea8942fd6
BLAKE2b-256 73632879ee8c66bbed796fb8f3f1561c3ec6aaba47c21560288e570b24e25207

See more details on using hashes here.

File details

Details for the file TechAdoption-0.1.0-py3.6.egg.

File metadata

  • Download URL: TechAdoption-0.1.0-py3.6.egg
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.5

File hashes

Hashes for TechAdoption-0.1.0-py3.6.egg
Algorithm Hash digest
SHA256 6ac42d2af70e126b0cb28eba3b28c4fb44b52bf9ac69eb25e40514d7d418b6b1
MD5 985467c4e43729e9ebd20587e82e1b76
BLAKE2b-256 7a4c85b8e4c6b5d897fe59e484736902ff51de761b1212c83c3ce4833f5ad4f7

See more details on using hashes here.

File details

Details for the file TechAdoption-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: TechAdoption-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 12.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.6.5

File hashes

Hashes for TechAdoption-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54b84134bcd9dd70fa9d653a37e9198032adbb44310275eabb961b6abf53f465
MD5 54d168efec7840074c3bdb80f1ca05ff
BLAKE2b-256 c0c09ba9e1ad35e522ca7113a05dbe5915849f9bd9dbc4fe1be83eb0e22a4935

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page