-
Notifications
You must be signed in to change notification settings - Fork 53
Conversation
Pull Request Test Coverage Report for Build 4009571746Warning: This coverage report may be inaccurate.This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.
Details
💛 - Coveralls |
the elbow curve plot fits the models internally and generates the plot, but in some cases the user might want to train the model themselves and then pass the data for plotting. at first I thought
I think it's valuable to have let me know if this explanation is clear! |
Yes it's clear. So, basically, for silhouette plot the user would be interested in comparing plots for different values of number of clusters it would be better to have a function that takes a list of values corresponding to multiple In the PR |
took a look at the code. I think if you move the for loop over range_n_clusters to the |
So there'll be two methods now :
|
correct! and also, let's rename |
I have made the changes discussed above. |
can you rebase? I've introduced some changes in the docs so the binder links use your code, but I still see the old version. you can do:
if you need help with the rebase command let me know |
I did the rebase but I'm not sure if anything got updated. Below is what I see:
There weren't any conflicts |
did you pull from master first? what's the output of this?
|
Were we able to solve the issue? Is it ready for merge? |
we were, I'll review the code now |
cluster_labels = kmeans.fit_predict(X) | ||
cluster_labels.append(kmeans.fit_predict(X)) | ||
kmeans = KMeans(n_clusters=5, random_state=1, n_init=5) | ||
cluster_labels.append(kmeans.fit_predict(X)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's move the _from_results
methods (elbow and silhouette) out of this and put them as docstring examples (if we don't have them). then, let's link from here to the docstring so people know they exist. something like:
```{tip}
If you want to train the models yourself, you can use `from_results` to plot.
```
there's a way to link directly to a class definition without a hardcoded link, I think :class:
, but I'm unsure if that will work with the markdown format,let's try and see. if it doesn't work, we can use raw rst format: https://jupyterbook.org/en/stable/file-types/restructuredtext.html
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think :class: directive works with classes but this one's a function.
I was able to link using heading labels like so
.. _silhouette-analysis-from-results-label:
silhouette_analysis_from_results
--------------------------------
.. autofunction:: sklearn_evaluation.plot.silhouette_analysis_from_results
and then using this label to create a link in the user guide using :ref:
. But the tip
or note
directives are not working along with this reference. Still trying to find the issue
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Edit: it was an indentation issue. Will push the change
@neelasha23 please fix conflicts |
fixed axes issue deprecation added revert img changes version update removed from docs
Added in docs Review comments
Lint Empty commit doc fix
Fixed the review comments |
great! I think there is an equivalent |
btw, there is no need to include the github link in the changelog, we'll automatically add them with the deployment script |
figsize
parameter from clustering tests and replaced baseline images with correct size.silhouette_analysis_from_results
function and converted it to an internal function_silhouette_analysis_one_cluster
.silhouette_analysis_from_results
example from clustering user guide.silhouette_analysis_from_results
.Issue ticket number and link
Closes #150
Checklist before requesting a review
📚 Documentation preview 📚: https://sklearn-evaluation--213.org.readthedocs.build/en/213/