UniStuttgart-VISUS / damast

Code for the DH project "Dhimmis & Muslims – Analysing Multireligious Spaces in the Medieval Muslim World" (VolkswagenFoundation)
MIT License
10 stars 1 forks source link

Clarification on filtering in "Advanced mode" #48

Closed tutebatti closed 2 years ago

tutebatti commented 2 years ago

In the current info text of the Religion hierarchy view, the following example is given to explain Advanced mode:

For instance, analysis may require to show places where the Syriac Orthodox Church (SYR), the Armenian Church (ARM), and the Church of the East (COE) coexist, but not those where only one of the three is present.

The procedure then described to control the filters mentions three columns, each with two religious group out of the three.

What about a column with all three of them?

In my understanding, there is a difference between:

Correct? If so, I would mention this as briefly as possible in the info text.

mfranke93 commented 2 years ago

Okay, so there is a lot of different variants here. I have made a screenshot for each to make sure we are on the same page:

Variant 1a:

The procedure then described to control the filters mentions three columns, each with two religious group out of the three. image

Variant 1b:

What about a column with all three of them? image

Variant 2a:

checking COE, ARM, and SYR in Simple mode image

Variant 2b:

in Advanced mode, using one column with COE, ARM, and SYR checked image

Variant 2c:

dito [What does that mean here? This would be my best guess.], using three columns with one out of the three checked in each column as described above image

Variant 2d:

dito, using four columns, three as mentioned [I suppose 2c?], the fourth checked with all three religious groups image


The principal thing to understand is how the simple and advanced mode work. From that, these questions can then be answered using Boolean logic and/or set operations:

For variant 1a and 1b, this means:

However, these two statements are equivalent. If a city has all three, it already matches each of the first three statements. And since there is a logical OR between them, matching just one suffices. So no, it is not necessary to have the fourth column in 1b, it does not do anything (except maybe make the filtering slightly slower).

For variants 2a–d, this means:

Variant 2a, 2c and 2d are equivalent:

The OR between the columns means only one column needs to match. And if a place has all three religions (variant 2d, column four), that already matches for each of the previous three columns. So the fourth column again is a (logical) no-op.

Variant 2b is the only differing column (and the same as 1a and 1b), and does what the advanced mode was designed for (2a,c,d can all be done in simple mode (2a)).

tutebatti commented 2 years ago

To clarify (sorry!), "dito" meant "in Advanced mode.

mfranke93 commented 2 years ago

That is how I interpreted it in the end, so my answer remains unchanged :+1:

mfranke93 commented 2 years ago

Come to think of it: Variants 2a, c, d are all equivalent in the end, and 2c does something different. I will edit my response above.

tutebatti commented 2 years ago

Thank you for this extensive clarification. I already had assumed something had slipped "my" logic. If I'm somewhat representative of a user not dealing with Boolean logic on a daily basis, we are well advised to clarify this behaviour. Your answer will serve well for that.

However, note that

For instance, analysis may require to show places where the Syriac Orthodox Church (SYR), the Armenian Church (ARM), and the Church of the East (COE) coexist, but not those where only one of the three is present.

is ambiguous, because 1a/1b OR 2b could be meant. So, an addition such as "all of the three" or "two out of the three" in that sentence would be necessary.

tutebatti commented 2 years ago

Come to think of it: Variants 2a, c, d are all equivalent in the end, and 2c does something different. I will edit my response above.

So Boolean logic is tricky for anyone :wink: (cf. Kahneman's Thinking, Fast and Slow).

mfranke93 commented 2 years ago

However, note that

For instance, analysis may require to show places where the Syriac Orthodox Church (SYR), the Armenian Church (ARM), and the Church of the East (COE) coexist, but not those where only one of the three is present.

is ambiguous, because 1a/1b OR 2b could be meant. So, an addition such as "all of the three" or "two out of the three" in that sentence would be necessary.

Agreed. Right now it sounds like all three need to coexist.

And regarding Boolean logic, that is an important point. Especially since there a critical difference between inclusive and exclusive or that is sometimes hard to make out in language. In Boolean logic and programming, "or" usually refers to an inclusive or (X or Y, or both), but when used in language, depending on context, it could be exclusive (either X or Y, but not both). Think of "Do you want red wine or white wine with your dinner?", which is a logical place for an exclusive or. But when we say "Show places with COE or ARM" (simple mode), we probably mean it inclusively, and not as "don't show places where both are present".

tutebatti commented 2 years ago

Good point. Probably the "equations" (1a = (COE AND ARM)...) provided in your extensive answer can be included in the description in some form.