-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Processing of input data with a different number of categories #60
base: master
Are you sure you want to change the base?
Processing of input data with a different number of categories #60
Conversation
…s via the LR model
…s via the LR model
11614bf
to
ac7508d
Compare
I Mixing of code levels and diffusion of responsibilityTry do not mix different levels of code too much. Currently, the interface (neuralnetworkwidget.py) knows too much about the internal structure of the algorithmic modules. See for example
Here the interface part analyzes how many categories are stored in the initial/final rasters and 'it knows' that these categories should be combined with each other. As a result, the processing logic is "spread out" across several modules. Ideally, all the logic should be kept in one place, for example, by put the code into a separate function/method A remark (this is already a matter of taste). In my opinion, there is no need to check whether the categories in the rasters are the same, since they are processed through II Duplication of codeThe same code is placed in several different locations, for example:
(also may be others examples; I haven't looked at all of them) I strongly recommend create a special function/method for calculating categories. Otherwise, if we decide to recalculate the categories using a new scheme, we will have to go through the code to catch errors — we will need to remember all the places where these categories are calculated and make corrections in all those places. |
Related issues: #47