feat: improve worksheet
This commit is contained in:
+4
-4
@@ -444,7 +444,7 @@ pub fn fit(matrix: &Matrix, opts: &Options) -> Fit {
|
||||
for iteration in 0..opts.max_iterations {
|
||||
iterations = iteration + 1;
|
||||
|
||||
// ---- E step: expected counts at each quadrature point ----
|
||||
// --- E step: expected counts at each quadrature point ----
|
||||
// Counts are accumulated per item rather than globally, so an item
|
||||
// administered to only some examinees is not charged for the others.
|
||||
let mut n_kj = vec![vec![0.0f64; j_count]; n_quad];
|
||||
@@ -473,7 +473,7 @@ pub fn fit(matrix: &Matrix, opts: &Options) -> Fit {
|
||||
}
|
||||
}
|
||||
|
||||
// ---- M step: one two-parameter Newton solve per item ----
|
||||
// --- M step: one two-parameter Newton solve per item ----
|
||||
let mut delta = 0.0f64;
|
||||
for j in 0..j_count {
|
||||
let counts: Vec<(f64, f64)> = (0..n_quad).map(|k| (n_kj[k][j], r_k[k][j])).collect();
|
||||
@@ -529,7 +529,7 @@ pub fn fit(matrix: &Matrix, opts: &Options) -> Fit {
|
||||
));
|
||||
}
|
||||
|
||||
// ---- Standard errors and per-item notes ----
|
||||
// --- Standard errors and per-item notes ----
|
||||
let (grid_final, weight_final) = (grid.clone(), base_weight.clone());
|
||||
let mut p_grid = vec![vec![0.0f64; j_count]; n_quad];
|
||||
for k in 0..n_quad {
|
||||
@@ -601,7 +601,7 @@ pub fn fit(matrix: &Matrix, opts: &Options) -> Fit {
|
||||
});
|
||||
}
|
||||
|
||||
// ---- Abilities, expected a posteriori ----
|
||||
// --- Abilities, expected a posteriori ----
|
||||
let mut abilities = Vec::with_capacity(n);
|
||||
let mut log_likelihood = 0.0f64;
|
||||
for i in 0..n {
|
||||
|
||||
Reference in New Issue
Block a user