Comments (5)
There may be NaN
's or empty values in the SNR column. I'd print out the column to inspect it.
from clustr.
It does, I have found a few. Jose suggested removing the NaNs before making the flag cuts, but I am having some issues getting that to work. This is the error I'm getting for that:
IndexError: boolean index did not match indexed array along dimension 0; dimension is 205 but corresponding boolean dimension is 1092
I'm trying to figure out if I should try to change the NaNs in the catalog, or keep trying to find a way to remove them before the SNR cut.
from clustr.
Ok I just checked - the NaN check was only in place for get_data()
: https://github.com/sweverett/CluStR/blob/master/clustr.py#L267
The flag cuts don't currently have this check. So if you are creating a "mask" which contains 1
for things that you want to cut, then it would look something like this:
mask |= (flag_condition) | (np.isnan(catalog[flag_column]))
What this does is take the existing mask and add new mask values for this specific flag (mask |=
corresponds to mask = mask | ...
) . Instead of just having the flag condition that you usually have, you also look to see if there are NaN
's for flag values. This says a cluster should be flagged if the condition is met or if there is a NaN
.
from clustr.
I don't make the mask until after the greater than statement, so I get the same error when I put that in. I believe it is working and just ignoring the NaNs. Should I just suppress the error and move on for now? or try to figure it out?
from clustr.
Works for version 2c3f335
clustr.py.
The issue came from using NaNs with comparison operators.
NaNs are dealt with by equating them to dummy variables then comparing them to cut_off_value.
from clustr.
Related Issues (20)
- Fix incorrect scatter plot legend
- Make PEP 8 compatible
- Don't hard-code flags HOT 1
- Switch flag type to enum HOT 1
- Use warnings module
- x axis wrong? HOT 8
- CluStR rewrite!
- Rewrite branch needs to consolidate code HOT 6
- fitter class HOT 6
- getting rid of R HOT 6
- using parts other peoples code? HOT 4
- plotting HOT 4
- Complete first-pass run of updated pipeline HOT 12
- run_options HOT 1
- Keyerror Raised HOT 2
- fit function of fitter class won't run HOT 30
- Plotlib.py Rework HOT 7
- Flags for Rewrite HOT 7
- to do 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 clustr.