jkeifer / pyHytemporal

An in-progress python library and command line tools for hypertemporal image classification
MIT License
0 stars 0 forks source link

Classify fails using a single temporal signature #5

Open jkeifer opened 10 years ago

jkeifer commented 10 years ago

I believe this must have something to do with the best fit logic, though the error is as such:

Traceback (most recent call last): File "commands.py", line 207, in cli() File "/Users/phoetrymaster/.virtualenvs/pyHytemporal/lib/python2.7/site-packages/click/core.py", line 488, in call return self.main(_args, _kwargs) File "/Users/phoetrymaster/.virtualenvs/pyHytemporal/lib/python2.7/site-packages/click/core.py", line 474, in main self.invoke(ctx) File "/Users/phoetrymaster/.virtualenvs/pyHytemporal/lib/python2.7/site-packages/click/core.py", line 752, in invoke return self.invoke_subcommand(ctx, cmd, cmd_name, ctx.args[1:]) File "/Users/phoetrymaster/.virtualenvs/pyHytemporal/lib/python2.7/site-packages/click/core.py", line 761, in invoke_subcommand return cmd.invoke(cmd_ctx) File "/Users/phoetrymaster/.virtualenvs/pyHytemporal/lib/python2.7/site-packages/click/core.py", line 653, in invoke ctx.invoke(self.callback, _ctx.params) File "/Users/phoetrymaster/.virtualenvs/pyHytemporal/lib/python2.7/site-packages/click/core.py", line 325, in invoke return callback(_args, **kwargs) File "commands.py", line 198, in classify threshstep=tstep, threshstepcount=tstepcount, singlethresh=nocombo) File "/Users/phoetrymaster/Development/Python/Projects/pyHytemporal/pyhytemporal/classification.py", line 618, in classify_and_assess_accuracy nodata) File "/Users/phoetrymaster/Development/Python/Projects/pyHytemporal/pyhytemporal/classification.py", line 429, in classify_with_threshold array[array > thresh[i]] = 10000 # Make all values in the array greater than the thresh equal 10000 IndexError: string index out of range

I am not sure of the utility of the classifier if only a single signature is used. However, I feel as though this function still should work with only a single sig. Perhaps the function needs to test for this edgecase and change the flow to something else. Or, perhaps this will become a wontfix.

jkeifer commented 10 years ago

Thinking about this...this really needs to be fixed. Even with a single signature, One is classifying two classes: that signature and other. Therefore, allowing a single signature has utility.