Skip to content

jgbrenner/psychometrics

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Psychometrics Project

Overview

This project replicates Hudson Golino's workflow for generating psychometric test items using AI and performing Exploratory Graph Analysis (EGA) with R. It integrates both Python and R to create, analyze, and validate psychometric scales.

Table of Contents

Project Structure

PsychometricsC9/ │ ├── data/ │└── rigid_perfectionism_items.csv # Generated test items │ ├── scripts/ │ └── main.py # Main Python script │ ├── notebooks/ │ └── analysis.ipynb # Jupyter Notebook for analysis │ ├── .env # Environment variables ├── .gitignore # Specifies files to ignore in Git ├── environment.yml # Conda environment configuration ├── requirements.txt # Python dependencies └── README.md # Project documentation

Features

  • AI-Generated Test Items: Utilizes Groq and OpenAI APIs to generate psychometric test items.
  • Embeddings: Obtains embeddings for generated items using OpenAI's API.
  • Exploratory Graph Analysis (EGA): Performs EGA using R's EGAnet package to validate psychometric scales.
  • Python and R Integration: Seamlessly integrates Python and R using rpy2.
  • Secure API Key Management: API keys are managed securely using environment variables.

Prerequisites

Installation

1. Clone the Repository

git clone https://github.com/yourusername/PsychometricsC9.git cd PsychometricsC9

conda env create -f environment.yml conda activate psychometrics_env

pip install -r requirements.txt

R

Install devtools if not already installed

if (!requireNamespace("devtools", quietly = TRUE)) { install.packages("devtools") }

Install EGAnet from GitHub

devtools::install_github("hfgolino/EGA")

Install any other required packages

install.packages("EGAnet")

conda activate psychometrics_env python scripts/main.py

What the Script Does:

Generates Test Items: Uses Groq and OpenAI APIs to create psychometric test items. Saves Items to CSV: Stores the generated items in data/rigid_perfectionism_items.csv. Obtains Embeddings: Fetches embeddings for each item using OpenAI's API. Performs EGA: Conducts Exploratory Graph Analysis using R's EGAnet package and prints the results.

License

This project is licensed under the MIT License.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published