Giter Site home page Giter Site logo

inuyasha2012 / pypsy Goto Github PK

View Code? Open in Web Editor NEW
208.0 19.0 71.0 194 KB

psychometrics package, including MIRT(multidimension item response theory), IRT(item response theory),GRM(grade response theory),CAT(computerized adaptive testing), CDM(cognitive diagnostic model), FA(factor analysis), SEM(Structural Equation Modeling) .

License: MIT License

Python 97.54% Makefile 2.46%
psychometrics item-response-theory factor-analysis structural-equation-modeling computerized-adaptive-testing cognitive-diagnostic-models classical-test-theory psychology survey questionnaire education

pypsy's Introduction

image

image

image

image

pypsy

中文

psychometrics package, including structural equation model, confirmatory factor analysis, unidimensional item response theory, multidimensional item response theory, cognitive diagnosis model, factor analysis and adaptive testing. The package is still a doll. will be finished in future.

unidimensional item response theory

models

  • binary response data IRT (two parameters, three parameters).
  • grade respone data IRT (GRM model)

Parameter estimation algorithm

  • EM algorithm (2PL, GRM)
  • MCMC algorithm (3PL)

Multidimensional item response theory (full information item factor analysis)

Parameter estimation algorithm

The initial value

The approximate polychoric correlation is calculated, and the slope initial value is obtained by factor analysis of the polychoric correlation matrix.

EM algorithm

  • E step uses GH integral.
  • M step uses Newton algorithm (sparse matrix is divided into non sparse matrix).

Factor rotation

Gradient projection algorithm

The shortcomings

GH integrals can only estimate low dimensional parameters.


Cognitive diagnosis model

models

  • Dina
  • ho-dina

parameter estimation algorithms

  • EM algorithm
  • MCMC algorithm
  • maximum likelihood estimation (only for estimating skill parameters of subjects)

Structural equation model

  • contains three parameter estimation methods(ULS, ML and GLS).
  • based on gradient descent

Confirmatory factor analysis

  • can be used for continuous data, binary data and ordered data.
  • based on gradient descent
  • binary and ordered data based on Polychoric correlation matrix.

Factor analysis

For the time being, only for the calculation of full information item factor analysis, it is very simple.

The algorithm

principal component analysis

The rotation algorithm

gradient projection


Adaptive test

model

Thurston IRT model (multidimensional item response theory model for personality test)

Algorithm

Maximum information method for multidimensional item response theory


Require

  • numpy
  • progressbar2

How to use it

install

pip install psy

See demo

TODO LIST

  • theta parameterization of CCFA
  • parameter estimation of structural equation models for multivariate data
  • Bayesin knowledge tracing (Bayesian knowledge tracking)
  • multidimensional item response theory (full information item factor analysis)
  • high dimensional computing algorithm (adaptive integral, etc.)
  • various item response models
  • cognitive diagnosis model
  • G-DINA model
  • Q matrix correlation algorithm
  • Factor analysis
  • maximum likelihood estimation
  • various factor rotation algorithms
  • adaptive
  • adaptive cognitive diagnosis
  • other adaption model
  • standard error and P value
  • code annotation, testing and documentation.

Reference

pypsy's People

Contributors

inuyasha2012 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

pypsy's Issues

slop, thresholds,What do they mean?

  • pypsy version:
  • Python version:
  • Operating System:

Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

请求帮助与合作

您好,我寻找了很久的IRT包,惊讶的发现是**人写的。我想把IRT应用到教育测评领域,希望能得到您的帮助与支持!
我的微信:zcj1987 电话:18096018789 希望能和您深度交流与合作。
盼回复!

ImportError: cannot import name 'Irt'

I do as the demo,but get the error
Type "help", "copyright", "credits" or "license" for more information.

from future import print_function, division, unicode_literals
from psy import Irt, data
Traceback (most recent call last):
File "", line 1, in
ImportError: cannot import name 'Irt'

有关MCMC_dina模型的问题

老师您好,最近在使用您的pypsy包做实验,目前有两个问题想请教一下:
1、请问老师是如何实现程序占用cpu多核?我自己写认知诊断模型时只能占用CPU的单核导致速度太慢。
2、我在测试MCMC方法的DINA模型时会出现当数据规模增长到一定程度,执行时间从几十秒骤增到几千秒的问题,这是因为内存不够导致的嘛(因为我发现在内存的占用会随着训练数据集规模的增大而增大)?

how to use the pypsy?

您好,看到您写的这个irt算法,想使用下,可是不知道从哪里下手,不清楚源数据是哪些,都是什么格式,输出数据是什么,是什么格式,希望您有时间可以帮助下,谢谢。

about 2pl irt demo return value ,What do they mean?

  • pypsy version:
  • Python version:
  • Operating System:

Description

Describe what you were trying to get done.
Tell us what happened, what went wrong, and what you expected to happen.

What I Did

Paste the command(s) you ran and the output.
If there was a crash, please include the traceback here.

关于DINA的EM算法传入参数问题

老师您好,我在看了您的demo后使用自己的数据去做实验,但是报错:ConvergenceError: no Convergence
image
我使用的数据Q是3个属性28个项目的numpy矩阵,score.values是2922个样本28项目的作答数据
image

使用您demo里随机生成的attrs就没问题,使用我自己的数据就会报错,请问是什么原因呢?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.