-
Notifications
You must be signed in to change notification settings - Fork 42
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
Generalising class names #167
Comments
Hi @daffidwilde yes currently Ciw needs classes to be called 'Class 0', 'Class 1' etc. in order to force an ordering (unfortunatelt I think ciw's insides rely on this currently). I agree it would be much nicer to define own names, and would be more than happy for this to be changed. |
Remind me @geraintpalmer, is there a purpose to class names? What about not having names at all and instead of dictionaries you'd just have lists? (Essentially the names just become the indices of the list) |
I think lists of lists were the original idea, but became difficult to read. Compare the current (from the tutorial:
To the possibility of lists of lists (there may be a better way to present this, but I think it does reduce readability):
It also makes setting priority classes more readable:
I think the idea of strings to represent customer classes. I like @daffidwilde's idea of allowing any string to represent a customer class, I think thta would make things much more reabable and meaningful to the user. What do you both think @daffidwilde? @drvinceknight? |
I prefer — from a usability perspective — to have a dictionary rather than nested lists. Internally, if the names are just being treated like indices then I imagine the dictionary could be iterated over in another way so |
Sorry @geraintpalmer, it appears we replied at the same time. I concur with everything you’ve said. |
Yes I like this. Shouldn't be too many changes - and would still be back compatible 👍 |
I'm not sure I see the improved readability using dictionaries but:
👍 (FYI, depending on how it's implemented given that internally lists are in fact just dictionaries it could be possible to do this in such a way where you could pass lists without it actually needing special consideration.) |
That would be jolly nice to have both. I suspect that my suggestion would be implemented in a very similar way. |
When defining classes of individuals in the system, their names must be of the form
"Class <i>"
wherei
is an integer. For example:Is this a necessary condition for
ciw
to function as it stands? If not, I don't see why the class names can't be recorded when the network is created and then placed when a record is created.It isn't a major problem except when you have a number of external classes that you'd like to extract from
ciw
.The text was updated successfully, but these errors were encountered: