Skip to content

Commit

Permalink
verbose uncommented
Browse files Browse the repository at this point in the history
  • Loading branch information
douglasrizzo committed Sep 27, 2016
1 parent e5de968 commit 4a9b82b
Showing 1 changed file with 14 additions and 10 deletions.
24 changes: 14 additions & 10 deletions catsim/simulation.py
Expand Up @@ -6,6 +6,7 @@

import json_tricks.np as jsnp
import numpy

from catsim import cat, irt
from catsim.estimation import Estimator
from catsim.initialization import Initializer
Expand Down Expand Up @@ -170,18 +171,21 @@ def simulate(
if stopper is not None:
self._stopper = stopper

# if verbose:
print((
'Starting simulation: {0} {1} {2} {3}'.format(
self._initializer.__class__, selector.__class__, self._estimator.__class__,
self._stopper.__class__
if verbose:
print(
(
'Starting simulation: {0} {1} {2} {3}'.format(
self._initializer.__class__, selector.__class__, self._estimator.__class__,
self._stopper.__class__
)
)
)
))

start_time = int(round(time.time() * 1000))
for current_examinee, true_theta in enumerate(self.examinees):

# if verbose:
print(('{0}/{1} examinees...'.format(current_examinee + 1, len(self.examinees))))
if verbose:
print(('{0}/{1} examinees...'.format(current_examinee + 1, len(self.examinees))))

est_theta = self._initializer.initialize()
response_vector, administered_items, est_thetas = [], [], []
Expand Down Expand Up @@ -232,8 +236,8 @@ def simulate(

self._duration = int(round(time.time() * 1000)) - start_time

# if verbose:
print(('Simulation took {0} milliseconds'.format(self._duration)))
if verbose:
print('Simulation took {0} milliseconds'.format(self._duration))

self._bias = cat.bias(self.examinees, self.estimations)
self._mse = cat.mse(self.examinees, self.estimations)
Expand Down

0 comments on commit 4a9b82b

Please sign in to comment.