1 개요[ | ]
- Python 문항반응 생성
2 이분 문항반응 생성[ | ]
Python
CPU
4.1s
MEM
153M
4.9s
Reload
Copy
import numpy as np
from girth import create_synthetic_irt_dichotomous
n_people = 12 # 학생 수
n_items = 4 # 문항 수
discrimination = 0.89 * np.sqrt(-2 * np.log(np.random.rand(n_items)))
difficulty = np.random.randn(n_items)
theta = np.random.randn(n_people)
data = create_synthetic_irt_dichotomous(difficulty, discrimination, theta)
data
array([[1, 1, 1, 1, 1, 0, 1, 1, 1, 0, 1, 1], [0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 1], [1, 1, 0, 1, 0, 1, 1, 1, 1, 1, 1, 1], [1, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0]])
3 다분 문항반응 생성[ | ]
3.1 영점조정 안함 (기본)[ | ]
Python
Reload
Copy
import numpy as np
from girth import create_synthetic_irt_polytomous
n_people = 15 # 학생 수
n_items = 7 # 문항 수
n_categories = 5 # 부분점수 종류 수
zero_point_calibration = 0 # 영점조정 안함 (1~5점)
difficulty = np.random.randn(10, n_categories-1)
difficulty = np.sort(difficulty, 1)
discrimination = 0.96 * np.sqrt(-2 * np.log(np.random.rand(10)))
theta = np.random.randn(150)
data = create_synthetic_irt_polytomous(difficulty, discrimination, theta)-zero_point_calibration
data
Loading
3.2 영점조정[ | ]
Python
Reload
Copy
import numpy as np
from girth import create_synthetic_irt_polytomous
n_people = 15 # 학생 수
n_items = 7 # 문항 수
n_categories = 3 # 부분점수 종류 수
zero_point_calibration = 1 # 영점조정 (0~2점)
difficulty = np.random.randn(10, n_categories-1)
difficulty = np.sort(difficulty, 1)
discrimination = 0.96 * np.sqrt(-2 * np.log(np.random.rand(10)))
theta = np.random.randn(150)
data = create_synthetic_irt_polytomous(difficulty, discrimination, theta)-zero_point_calibration
data
Loading
4 같이 보기[ | ]
편집자 Jmnote
로그인하시면 댓글을 쓸 수 있습니다.