#include <swig_etirm.h>
Public Member Functions | |
estep (int_vector *ilist1=0) | |
Initialize estep object. | |
~estep () | |
Release memory allocated in constructor. | |
double | compute (bool compute_prior=TRUE, bool store_prior=FALSE, int_vector *ilist4=0) |
Calls mEStep->DoEStep to perform E-step. | |
estep_type * | GetEStep () |
Returns EStepDiscrete object. | |
Private Attributes | |
estep_type * | mEStep |
EStepDiscrete object. | |
ItemVector * | mItems |
List of items used to initialize mEStep. |
Definition at line 344 of file swig_etirm.h.
etirm::estep::estep | ( | int_vector * | itemno = 0 |
) |
Initialize estep object.
[in] | *itemno | Pointer to list of item numbers to use for computing examinee posteriors distribution in E-Step. If itemno = NUL, use all items (default). |
Definition at line 380 of file swig_etirm.cpp.
References etirm::CheckRunInit(), etirm::gEtirmRun, etirm::SwigEtirmRun::items, etirm::ItemSubset(), etirm::SwigEtirmRun::latentDist, mEStep, and mItems.
00381 { 00382 CheckRunInit(); 00383 00384 if (itemno) 00385 { 00386 mItems = new ItemVector(ItemSubset(itemno,gEtirmRun->items,"new_estep")); 00387 00388 mEStep = new estep_type(mItems->begin(), mItems->end(), gEtirmRun->latentDist); 00389 } 00390 else 00391 { 00392 mItems = 0; 00393 mEStep = new estep_type((gEtirmRun->items).begin(), (gEtirmRun->items).end(), gEtirmRun->latentDist); 00394 } 00395 }
etirm::estep::~estep | ( | ) |
double etirm::estep::compute | ( | bool | compute_post = TRUE , |
|
bool | store_post = FALSE , |
|||
int_vector * | estep_items = 0 | |||
) |
Calls mEStep->DoEStep to perform E-step.
Returns marginal loglikelihood of examinees' responses (sum over examinees of the marginal loglikelihood of an examinee's responses) plus sum of prior likelihoods over all item parameters. This is the value of the marginal posterior density that the EM algorithm is maximizing at the values of the item parameters computed in the last M-step.
[in] | compute_post | Flag: If compute_post == TRUE, then compute posterior distributions for all examinees. If compute_post == FALSE, then use previously stored posteriors for examinees. (Default: TRUE). |
[in] | store_post | Flag: If store_post == TRUE, then store the posterior distribution computed for each examinee. These posterior distributions are stored as part of the examinee objects. (Default: FALSE). |
[in] | *estep_items | Pointer to list of items for which n and r are updated. If a null pointer is passed then n arnd r are updated for all items used in the E-step to compute examinee posterior distributions. |
Definition at line 433 of file swig_etirm.cpp.
References etirm::SwigEtirmRun::CheckExaminees(), etirm::CheckRunInit(), etirm::EStepDiscrete< E, I, II, D >::DoEStep(), etirm::SwigEtirmRun::examinees, etirm::gEtirmRun, etirm::SwigEtirmRun::items, etirm::ItemSubset(), and mEStep.
00434 { 00435 const char *fname = "estep_compute"; 00436 CheckRunInit(); 00437 gEtirmRun->CheckExaminees(fname); 00438 00439 if (estep_items) 00440 { 00441 if (estep_items->size() > 0) 00442 { 00443 ItemVector itemsub = ItemSubset(estep_items, gEtirmRun->items, fname); 00444 return mEStep->DoEStep((gEtirmRun->examinees).begin(), (gEtirmRun->examinees).end(), itemsub.begin(), itemsub.end(), compute_post, store_post); 00445 } 00446 else // do not update n and r for any items 00447 { 00448 return mEStep->DoEStep((gEtirmRun->examinees).begin(), (gEtirmRun->examinees).end(), (gEtirmRun->items).begin(), (gEtirmRun->items).begin(), compute_post, store_post); 00449 } 00450 } 00451 else 00452 { 00453 return mEStep->DoEStep((gEtirmRun->examinees).begin(), (gEtirmRun->examinees).end(), compute_post, store_post); 00454 } 00455 }
estep_type* etirm::estep::GetEStep | ( | ) | [inline] |
Returns EStepDiscrete object.
Do not create SWIG wrapper for this member function!
Definition at line 362 of file swig_etirm.h.
References mEStep.
Referenced by etirm::mstep_dist().
00363 { return mEStep;}
estep_type* etirm::estep::mEStep [private] |
EStepDiscrete object.
Definition at line 368 of file swig_etirm.h.
Referenced by compute(), estep(), GetEStep(), and ~estep().
ItemVector* etirm::estep::mItems [private] |