Skip to main content

the simulation of Thurstone Item Response Theory, include fixed forced test and adaptive forced test.

Project description

the simulation of Thurstone Item Response Theory, include fixed forced test and adaptive forced test. 模拟瑟斯顿项目反应理论,包括固定测验和自适应测验。





from tirt import SimFixedTirt

fixed_tirt = SimFixedTirt(subject_nums=100, trait_size=30, items_size_per_dim=10)
theta_list = fixed_tirt.sim()
score_list = fixed_tirt.scores

for i, theta in enumerate(theta_list):
    print score_list[i]
    print theta



from tirt import SimAdaptiveTirt

sat = SimAdaptiveTirt(subject_nums=1, item_size=600, trait_size=30, max_sec_item_size=40)

for key, value in sat.thetas.items():
    print sat.scores[key]
    print value



from tirt import irt_consistency_score, sim_scores, BayesProbitModel, gen_item_dict, SimFixedTirt
from tirt.utils import random_params

# 生成试题字典
item_dict = gen_item_dict(30, 10, block_size=3)
# 生成试题参数
a, b = random_params(item_dict, 30, block_size=3)
# 生成随机得分
scores = sim_scores(30, 10, 10)

for score in scores:
    model = BayesProbitModel(a, b, score=score)
    # 打印一致性
    print irt_consistency_score(model)

model = SimFixedTirt(trait_size=30, items_size_per_dim=10, subject_nums=100, model='bayes_probit')
print model.get_consistency_scores()

Project details

Download files

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

Files for tirt, version 0.0.6
Filename, size File type Python version Upload date Hashes
Filename, size tirt-0.0.6.tar.gz (10.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page