Skip to content

Commit 920cd88

Browse files
author
Frankie Robertson
committed
item_response_function => item_response_functions
1 parent a419d90 commit 920cd88

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/Stateful.jl

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ module Stateful
77

88
using DocStringExtensions
99

10-
using FittedItemBanks: AbstractItemBank, ResponseType, ItemResponse, resp
10+
using FittedItemBanks: AbstractItemBank, ResponseType, ItemResponse, resp_vec
1111
using ..Aggregators: TrackedResponses, Aggregators
1212
using ..CatConfig: CatLoopConfig, CatRules
1313
using ..Responses: BareResponses, Response, Responses
@@ -135,13 +135,14 @@ function item_bank_size end
135135

136136
"""
137137
```julia
138-
$(FUNCTIONNAME)(config::StatefulCat, index::IndexT, response::ResponseT, ability::AbilityT) -> Float
138+
$(FUNCTIONNAME)(config::StatefulCat, index::IndexT, ability::AbilityT) -> AbstractVector{Float}
139139
````
140140
141-
Return the probability of a `response` to item at `index` for someone with
142-
a certain `ability` according to the IRT model backing the CAT.
141+
Return the vector of probability of different responses to item at
142+
`index` for someone with a certain `ability` according to the IRT
143+
model backing the CAT.
143144
"""
144-
function item_response_function end
145+
function item_response_functions end
145146

146147
## Running the CAT
147148
function Sim.run_cat(cat_config::CatLoopConfig{RulesT},
@@ -243,10 +244,10 @@ function item_bank_size(config::StatefulCatConfig)
243244
return length(config.tracked_responses[].item_bank)
244245
end
245246

246-
function item_response_function(config::StatefulCatConfig, index, response, ability)
247+
function item_response_functions(config::StatefulCatConfig, index, ability)
247248
item_bank = config.tracked_responses[].item_bank
248249
item_response = ItemResponse(item_bank, index)
249-
return resp(item_response, response, ability)
250+
return resp_vec(item_response, ability)
250251
end
251252

252253
## TODO: Implementation for MaterializedDecisionTree

0 commit comments

Comments
 (0)