Comments (3)
The cluster_ids don't be used in utils.py, it seems work when you insert following code to the raw code.
if cluster_ids is not None:
# the feature matrix(n_samples,n_features) of different cluster
X = X[cluster_ids]
if X.shape[0] < size:
raise RuntimeError(
f"Size of samples to be selected is greater than existing the number of samples; "
f"{size} > {X.shape[0]}."
)
# set the limits on # of selected points according to the tolerance percentage
if cluster_ids is not None:
# the feature matrix(n_samples,n_features) of different cluster
X = X[cluster_ids]
error = size * obj.tol
lower_size = round(size - error)
upper_size = round(size + error)
An other question is the tol of class optisim in dissimilarity.py is wrong, I think it can be 0.05. The iteration in ultis.py will not execute due to the huge tolerance.
def __init__(self, r=None, k=10, tol=5.0, eps=0, p=2, start_id=0, random_seed=42, n_iter=10):
I get the following pictures after doing these.
optisim
DirectedSphereExclusion
It is strange that I get thirteen points in the second picture but it looks like the points are selected by thier cluster_labels.
from diverseselector.
Thanks @xychem, this 183e253 fixes one of the issues you reported in #154 (comment). I also encountered it when putting together the quick_start.ipynb
notebook in PR #186. Don't know why this item was not addressed before closing the issue.
from diverseselector.
This issue was closed because #155 attempted to fix the problem. Accodring to @xychem's code, it seemed working. I will take a closer look at the quick_start.ipynb
.
from diverseselector.
Related Issues (20)
- [Features module] Fix failed tests and improve code/coverage HOT 9
- [Distance Module] Bitstring functionality already covered by non-bitstring functions HOT 3
- [Diversity module] Add Formulas to Docstrings, Add Tests, & Polish Module HOT 2
- [Utils] Utils.py has unfinished to-do and lacks testing HOT 4
- [method.distance module] HOT 4
- [methods.partition DirectedSphereExclusion] HOT 1
- [methods.partition GridPartitioning] HOT 4
- Construct Evil Example HOT 27
- A few more questions regarding #147 HOT 1
- GridPartitioning fails with odd number of samples to select HOT 7
- some point view for DirectedSphereExclusion selested number relate to #152 HOT 5
- GSoC 2024: Interactive web interface for `Selector` HOT 24
- Update in Docs/Code necessary HOT 10
- Fix the spelling errors in documentation of "Getting Started"
- `Codecov` action failed to upload coverage report
- dissimilarity.py missing from methods folder HOT 1
- Refactoring the jupyter notebook
- Cleaning up the new similarity based methods
- Overflow issue with `logdet` function for computing the diversity HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from diverseselector.