Skip to main content

Big 5 IPIP-NEO Personality Traits

Project description

Five Factor E Library 📦 🌊

version 1.7.0 python 3.7 | 3.8 | 3.9 | 3.10 | 3.11 PyPi Downloads PyPi Monthly Downloads Code style: Black

Representation of the Big Five

This project assesses a person's 🗣 personality based on an inventory of questions. The project uses the Big Five theory using the IPIP-NEO-300 model created by Lewis R. Goldberg and IPIP-NEO-120 the shorter version developed by Professor Dr. John A. Johnson, this is a free representation of the NEO PI-R™.

👉 "The IPIP-NEO is not identical to the original NEO PI-R, but in my opinion it is close enough to serve as a good substitute. More and more people are beginning to use it in published research, so its acceptance is growing." - Dr. Johnson

The main idea of the project is to facilitate the use of Python developers who want to use IPIP-NEO in their projects. The project is also done in pure Python, it doesn't have any dependencies on other libraries.

👉 "That is wonderful, ...! Thank you for developing the Python version of the IPIP-NEO and making it publicly available. It looks like a great resource." - Dr. Johnson

Note 🚩: The project is based on the work of Dhiru Kholia, and is an adaptation of Neural7 for a version that can be reused in other projects of the company.

Synopsis 🌐

A little theory, The Big Five or Five Factor is made up of 5 great human personalities also known as the 🌊 O.C.E.A.N. Are they:

  • Openness
  • Conscientiousness
  • Extraversion
  • Agreeableness
  • Neuroticism

To compose each great personality there are 6 traits or facets, totaling 30 traits. The user must answer a questionnaire of 120 or 300 single choice questions with 5 options:

  • Very Inaccurate
  • Moderately Inaccurate
  • Neither Accurate Nor Inaccurate
  • Moderately Accurate
  • Very Accurate

For more information to demystify the Big Five, please see the article: Measuring the Big Five Personality Domains.

User-selected answers follow the position:

Option Array
Very Inaccurate 1
Moderately Inaccurate 2
Neither Accurate Nor Inaccurate 3
Moderately Accurate 4
Very Accurate 5

Note 🚩: Some answers have the order of the score reversed, the algorithm treats the questions with the score inverted by (question_id).

Releases 🎈

News about each version please look here:

Installation 🚀

From PyPI:

$ python3 -m pip install --upgrade five-factor-e

From source:

$ git clone https://github.com/neural7/five-factor-e.git
$ cd five-factor-e
$ python3 -m pip install .

How to use 🔥

The construtor requires the questions model, whether it is the 300 model or short model with 120 questions. It also has the version to do simulations with the questions that are reversed. For this, you must turn the test variable from false to true, for more details on reverse scoring tests see section Experiments with reverse scoring questions.

Parameters Type Description
question int Question type, 120 or 300.
test boolean Used to simulate reverse scoring questions, only used for studies.

Example:

from ipipneo import IpipNeo

ipip = IpipNeo(question=120)

The 120 item version is a short version of the inventory, but you can use the full 300 item version. Example:

from ipipneo import IpipNeo

ipip = IpipNeo(question=300)

The answers must be in a standardized json, you can insert this template in the data folder of the project. This dictionary contains random answers, used for testing purposes only. As an example, you can load the file with the 120 test responses:

import json, urllib.request

data = urllib.request.urlopen("https://raw.githubusercontent.com/neural7"\
   "/five-factor-e/main/data/IPIP-NEO/120/answers.json").read()

answers120 = json.loads(data)

For the long inventory version with 300 items.

import json, urllib.request

data = urllib.request.urlopen("https://raw.githubusercontent.com/neural7"\
   "/five-factor-e/main/data/IPIP-NEO/300/answers.json").read()

answers300 = json.loads(data)

Compute the data 🏁

The compute method is used to evaluate the answers, see the table below with the parameters:

Parameters Type Description
sex string The sex of the individual (M or F).
age int The age of the individual (between 18 and 100 years old).
answers dict Standardized dictionary with answers.
compare boolean If true, it shows the user's answers and reverse score.

Calculate the Big Five for a 40-year-old man:

IpipNeo(question=120).compute(sex="M", age=40, answers=answers120)

For the long version of the inventory just change the parameters question to 300.

IpipNeo(question=300).compute(sex="M", age=40, answers=answers300)

Calculating the Big Five for a 25-year-old woman:

IpipNeo(question=120).compute(sex="F", age=25, answers=answers120)

An example of the output of the results:

{
   "personalities":[
      {
         "Openness":{
            "O":24.29091080263288,
            "score": "low",
            "traits":[
               {
                  "trait":1,
                  "Imagination":21.43945888481437,
                  "score":"low"
               },
               {
                  "trait":2,
                  "Artistic-Interests":4.344187760272675,
                  "score":"low"
               },
               {
                  "trait":3,
                  "Emotionality":8.379530297432893,
                  "score":"low"
               },
               {
                  "trait":4,
                  "Adventurousness":30.805235884673323,
                  "score":"low"
               },
               {
                  "trait":5,
                  "Intellect":47.84680512022845,
                  "score":"average"
               },
               {
                  "trait":6,
                  "Liberalism":84.95164346200181,
                  "score":"high"
               }
            ]
         }
      }
   ]
}

Example of the complete output check here: Big 5️⃣ Output

Tests 🏗

For the tests it is necessary to download the repository. To run the unit tests use the command below:

$ ./run-test

Using inventory for testing 📚

If you want to make an assessment by answering the inventory of questions, just run:

$ ipipneo-quiz

In this program you take an assessment for the short version with 120 items as well as the 300 item version, just follow the program's instructions. It is possible to see the basic graphs of your Big-Five via terminal, if you want to see the graphs at the end of the questionnaires you need to run the installation command:

$ pip install five-factor-e[quiz]

Example output with graphics:

Big Five Results

The complete result is saved in the run folder in json format.

About data 📊

Inside the data data directory, there are examples of questions and answers. The most important is the response data entry which must follow the pattern of this file. Example:

{
   "answers":[
      {
         "id_question":50,
         "id_select":5
      },
      {
         "id_question":51,
         "id_select":2
      }
   ]
}

The id question field refers to the question in this file. Obviously if you want you can change the translation of the question, but don't change the ID of the question.

Note 🚩:

  • The order of answers does not affect the result;
  • You can rephrase the questions to your need, but don't change the question IDs, they are used by the algorithm.

Credits 🏆

  • Dr John A. Johnson
  • Dhiru Kholia
  • Chris Hunt

License 🙋

Resources 📗

Authors 👨‍💻

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

five-factor-e-1.7.0.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

five_factor_e-1.7.0-py3-none-any.whl (22.0 kB view details)

Uploaded Python 3

File details

Details for the file five-factor-e-1.7.0.tar.gz.

File metadata

  • Download URL: five-factor-e-1.7.0.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.8

File hashes

Hashes for five-factor-e-1.7.0.tar.gz
Algorithm Hash digest
SHA256 e68fa512e5fc92680948dbddd1d3943d1191cde8a057043f06fc98409e3972a9
MD5 87babcae5fa5aaeee171c3f578ae20f0
BLAKE2b-256 bdb5ad369e5bea2717e43c5a5c44de9c7e09cf72d0ed5a741bd49fcbb2ce1006

See more details on using hashes here.

File details

Details for the file five_factor_e-1.7.0-py3-none-any.whl.

File metadata

File hashes

Hashes for five_factor_e-1.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 11ab07313ee7e6aaa5ef9da96d45b0c8cfd660ed87a63e7fa972c82a92f3ccaa
MD5 b948cf3497512b47bf1827d433c6a16f
BLAKE2b-256 de002ac783a7fa1875b3734e4aedc6bc6646c50db3066af37fbbc7a344ded7e1

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