LukeMathWalker / LukeMathWalker/ndarray-koans
Passing number of centroids unused
Nobody has claimed this yet.
- Dominant language
- Jupyter Notebook
- Stars
- 116
- Forks
- 20
- PR merge metrics
- No merged PRs in 30d
Description
In update koan there is
pub fn compute_centroids(
n_centroids: usize,
// (n_observations, n_features)
observations: &ArrayBase<impl Data<Elem = f64>, Ix2>,
// (n_observations,)
cluster_memberships: &ArrayBase<impl Data<Elem = usize>, Ix1>,
) -> Array2<f64> {
but here the n_centroids is not being used for anything in the solution, and thus it doesn't seem necessary. Maybe there is a bug here?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Open src/koans/06_update/02_centroids_array2.rs and inspect compute_centroids, focusing on whether n_centroids is needed for the intended centroid calculation. Compare the function signature with the surrounding koan and determine whether the argument should affect the result or be removed; the issue is done when that behavior is resolved consistently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100