-
-
Notifications
You must be signed in to change notification settings - Fork 261
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Request for improved/updated beginner examples #378
Comments
I'm not sure that I fully understand what the ask here is, but will attempt to answer some of these one at a time:
Rust crates don't necessarily track the latest release of a crate, but instead use versions pinned via the
You can take a look at some simple examples on how to load
Most of this is pretty standard terminology within the data science/machine learning field, and there's a number of resources available across the internet that can help you with these terms. In order to stay tractable,
I'm not sure I follow here. Clustering algorithms, including K-Means, typically find clusters within a dataset, and those clusters are parameterized by centroids.
As mentioned, we're happy to review good-faith contributions from the greater community. In order to be most effective at this, I'd suggest taking a few minutes to review the contributing guide. |
@quietlychris I'm another newbie and I'm wondering something similar, but regarding the OPTICS algorithm. The documentation for that is extremely sparse to a point that I have to look at source code to figure out what I'm supposed to do. Please don't take it personally/the wrong way, I am also posting this in good faith. But I've been looking at OPTICS since yesterday now and I'm still unsure. Especially I don't know why the implementation expects Array2 when I'm supplying my own distance function. I'm not a Rust expert either, btw. I'm looking at the |
As a suggestion, it's generally easier for someone to help with something like this by referencing a piece of actual code, rather than back out your particular situation from prose.
If you could create and link a repository with the code you have, and link to the lines that you're having trouble with, that would be helpful--for example, I'm not exactly sure where you're trying to pass in your own distance function, or what that looks like. This is, in general, good practice and:
If you have something like |
@quietlychris Thanks for the reply. I didn't really mean to share actual code, because I didn't want to bother others trying to help me debug my code. I only wanted to support OP by giving my own perspective. I wanted to stress out how difficult it is to get into using this library (I'm not saying it's bad, it's just difficult to get going). Anyway, if your offer to help stands, here's the code I'm currently struggling with. I've already managed to translate the Vec into Array2, that's fine. But I struggle with the dist function.
I'm struggling with the type parameter D and Ix2. Notice that parameters I wanted to provide a MWE, but I don't even know how to compile your optics example and I can't share my codebase (proprietary). I'm hoping I won't need to set up an entire new project just to produce a MWE. Edit: Edit2: In case someone finds this, the previous paragraph is correct. I was able to implement generic GlobeDist by iterating over individual elements of the first (and only) row in the arrayviews. I would panic if there was less than two items and would ignore any after the first two. |
I'm looking to use
linfa
for k-means clustering, and the current k-means example is pretty incomprehensible to a newbie. It may be that this makes perfect sense to someone steeped in this API or even inndarray
, but to me, the issues are:rand
(0.9.0 as of Feb 2025) appears to be incompatible with the version used in the exampleDatasetBase
indicates that it contains records and maybe targets, weights, and feature names. I have no clue what the target/weights are when I'm trying to create input.Ultimately, my ideal is to do something like:
I realize this may diverge drastically from what currently exists, but I'd like to determine how to bridge this gap. Thanks!
The text was updated successfully, but these errors were encountered: