Comments (7)
Great! That looks like what I was originally envisioning. Basically the approach we're taking is to "trust" that the user is passing a valid column name, but to have it fail loudly if it isn't so that they are aware they did something wrong. This will make it much easier for future people down the line to make cuts based off of new columns we haven't thought of yet, while also keeping a history of config files that show exactly how each run was done.
from clustr.
(UPDATE)
First flag test was successful. I used the merger
flag to test out the function and 61 out of 1092 rows were accepted for analysis.
I'll need to cross verify If I'm actually removing the correct rows using pandas in a separate session. Once that is finished I'll continue working to include other flag types and update when that works.
from clustr.
Check out 0d935a3 as a possible final draft for clustr.py
.
This is the output of the above version.
from clustr.
Removed 89 clusters due to Serendipitous
flag of type True
Removed 62 clusters due to merger
flag of type True
NOTE: Removed
counts may be redundant, as some data fail multiple flags.
Accepted 245 data out of 1092
mean x error: 5.60469675e+42
mean y error: 3.874964
Using Kelly Algorithm...
Making Plots...
Done!
We just need to find out if cutoff refers to detected or not in the catalog I think.
from clustr.
(Update)
What I've done is completely reworked how the boolean flag was done in the version referenced by me above. Boolean flags are explicitly in the config.yml
file and not hard coded in clustr.py
. I will upload both files as soon as I'm done reworking the cutoff flags
in clustr.py
(later tonight).
from clustr.
(Update 2)
Okay so I've uploaded clustr.py
with its newly and improved create_cuts()
method. This was done to avoid hard coding the flags in the source code as @sweverett advised. To replace the previous strategy of having to referencing a list to know which flags to apply, I've created nested dictionaries for both the boolean flags and range flags in the new config.yml
file. The content in the config.yml
file is exactly the same as param.config
file with the following dictionary structure.
For example,
Boolean: {
key1: value1,
key2: value2,
key3: value3,
key4: value4
}
Range: {
keyA: {
keyB: {
keyC: valueC,
keyD: valueD,
keyE: valueE}},
keyF: {
keyG: {
keyH: valueH,
keyI: valueI,
keyJ: valueJ}}
}
Doing this gives the user the freedom of adding in a new flag type into the config file without having to mess with the source code.
Below is the result I get when running the code:
The cutoff section in create_cuts()
is not finished yet. I'm hoping to have it done by tomorrow afternoon.
from clustr.
Went ahead and did some further changes to config.yml
. The notation I used in the example above was not the correct for a YAML file so I went ahead and simplified it 😅 along with some instructions on how to add new flags.
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
- SNR flag HOT 5
- 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.