Skip to content

Commit

Permalink
fix: fix issue with iterator for svc search (#182)
Browse files Browse the repository at this point in the history
  • Loading branch information
morenol authored Oct 2, 2022
1 parent f8210d0 commit 12df301
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/svm/svc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ impl<T: RealNumber, M: Matrix<T>, K: Kernel<T, M::RowVector>> Iterator
&& self.current_c == self.svc_search_parameters.c.len()
&& self.current_tol == self.svc_search_parameters.tol.len()
&& self.current_kernel == self.svc_search_parameters.kernel.len()
&& self.current_seed == self.svc_search_parameters.kernel.len()
&& self.current_seed == self.svc_search_parameters.seed.len()
{
return None;
}
Expand Down Expand Up @@ -201,7 +201,7 @@ impl<T: RealNumber, M: Matrix<T>, K: Kernel<T, M::RowVector>> Iterator
self.current_c = 0;
self.current_tol = 0;
self.current_kernel += 1;
} else if self.current_kernel + 1 < self.svc_search_parameters.kernel.len() {
} else if self.current_seed + 1 < self.svc_search_parameters.seed.len() {
self.current_epoch = 0;
self.current_c = 0;
self.current_tol = 0;
Expand Down Expand Up @@ -972,7 +972,6 @@ mod tests {

// x can be classified by a straight line through [6.0, 0.0] and [0.0, 6.0],
// so the score should increase as points get further away from that line
println!("{:?}", y_hat);
assert!(y_hat[1] < y_hat[2]);
assert!(y_hat[2] < y_hat[3]);

Expand Down

0 comments on commit 12df301

Please sign in to comment.