35
How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist [email protected]

How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist [email protected]

Embed Size (px)

Citation preview

Page 1: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

How MVQCA works

A short Introduction to the Ideas of the Algorithm used in MVQCA

Lasse [email protected]

Page 2: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

2

MVQCA vs. QCA

• The algorithms used in QCA can‘t be used for medium or large size MV-Datasets:

• Size restriction

• All variables are treated as nominal scaled variables (but MVQCA cares about ordinal scales)

• Inputs and Outputs are not elegant with Dummy Variables.

Page 3: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

3

MVQCA vs. QCA

» We could build a MV-Interface for classical QCA-Algorithms to ease things up. But this has shown to be less successful (Brayton/Khatri 1999: 9)

» Important theoretical work has been made by the Electronic Engineers at the University of Berkeley. But their procedures are specialised on EE‘Applications:

° no ordinal scales possible

° only one solution found

° (no easy to use User Interface)

Page 4: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

4

MVQCA

• Due to this, a new algorithm has been developed and is included in Tosmana, the Tool for Small-N Analysis.

In this presentation,

1. special conditions of MVQCA Analysis in the Social Science will be presented.

2. the basic Ideas of the Algorithm will be introduced

3. a sample calculation will be done on a (small) data set

Page 5: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

5

Social Science and MVQCA

• There are several special conditions of Small-N Analysis, which have to be observed when creating an Algorithm for MVQCA:

• The number of cases is small.

• The number of variables is also rather small (no fishing expeditions..)

• Variables may be of ordinal scale

• We want more than one (working) solution.

Page 6: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

6

An Algorithm for MVQCA

• The main problem of Multi Value Datasets is their complexity.

• Having a data set with ten variable with a range of five possible values leaves us with a mass of 9765625 possible configurations to deal with.

• => it is not possible to build a configuration tree with all configuration to calculate with as it is used in some Boolean Minimization Algorithms.

Page 7: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

7

Calculation in MVQCA• The Calculation is done on a Matrix in MVQCA:

Variables

Sta

tes

of e

ach

Var

iabl

e

Page 8: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

8

Calculation in MVQCA (2)• Each case is placed in the matrix as a link between the fields:

Variables

Sta

tes

of e

ach

Var

iabl

e

•cases with the outcome to minimize are called „good cases“ and are drawn with a green line in this presentation

•cases with a different outcome to outcome to minimize are called „bad cases“ and are drawn with a blue line in this presentation

Page 9: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

9

Calculation in MVQCA (3)• When all cases are placed in the matrix, the Implicants are indicated by single fields or paths between

fields of one or more „good“ cases, which are not completely followed by one or more „bad“ cases.

Variables

Sta

tes

of e

ach

Var

iabl

e

• Some Terms are marked with a red line or a filled red circle on the next page.

Page 10: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

10

Calculation in MVQCA (4)• When all cases are placed in the matrix, the Implicants are indicated by single fields or paths between

fields of one or more „good“ cases, which are not completely followed by one or more „bad“ cases.

Variables

Sta

tes

of e

ach

Var

iabl

e

Page 11: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

11

Calculation in MVQCA (5)• Only Prime Implicants are of interest: All term-paths that are non shortable and all single field

terms are Prime Implicants.

Variables

Sta

tes

of e

ach

Var

iabl

e The red path is not a representing a prime implicant, as the upper half of the line is a implicant it self.

Page 12: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

12

Calculation in MVQCA (6)• Problem: Not all (most actually) Terms are consisting of states of variables „next to each other“.

Variables

Sta

tes

of e

ach

Var

iabl

e

Page 13: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

13

Calculation in MVQCA (7)• To solve this, a null-field is introduced to all variables, and each case has also a path to this null-

field.

Variables

Sta

tes

of e

ach

Var

iabl

e

Page 14: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

14

Calculation in MVQCA (7)• When all paths are set, a agent is send out from a root field to all fields of the first variable

(including the zero-field)

The agent is having to sets with it: A set of good cases still represented by the agent and a set of bad cases still represented by the agent.

Page 15: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

15

Calculation in MVQCA (8)• In each field there a various calculations on the agent:

• The Set of Good Cases is recalculated with the Set of good cases passing the field (boolean AND).

• The Bad of Good Cases is recalculated with the Set of good cases passing the field (boolean AND).

Page 16: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

16

Calculation in MVQCA (9)• The agent has following possibilities in each field of the

Variable-Matrix:

• The agent‘s set of good cases is empty: go back

• The agent‘s set of bad cases is empty (and the set of good cases is not): The path walked by the agent is a Term. Report and go back.

• Neither the set of good nor the set of bad cases is empty: Go on to each field of the next variable (if there is one)

Page 17: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

17

Calculation in MVQCA (10)• When the agent has ended its expedition through the

matrix, all Terms have been collected into a set of Terms.

• Terms implied by other Terms are sorted out.

• The remaining Terms (prime implicants) are sorted by length.

• Then the Terms are combined to find the Solutions

Page 18: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

18

Calculation in MVQCA (11)• The solutions are found in a simular way, but there are

some differences in the way of calculation:

• Terms are used instead of variables in the matrix

• There are just two fields for the each Term: „Used“ and the zero-field

• The agent has only one set: The set of non-explained good cases. In each „used“-field this set is recalculated by joining the set of the agent with the non-explained set of a Term (= „good“-Cases not implied by the Term) with boolean AND.

Page 19: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

19

Calculation in MVQCA (12)

• The agent‘s new set of non-explained cases is simular to the one before visiting the field: The Term does not explain any case not explained by the Terms visited by the agent. Go back (then just the path via the zero-field is used).

• The agent‘s set of non- explained cases is empty: The path walked by the agent is a Solution. Report and go back.

The agent has following possibilities in the used field of the Term-Matrix (1).

Page 20: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

20

Calculation in MVQCA (13)

• The length of the Terms on „used“-field visited by the path of the agent is longer than the allowed length: STOP and go back. The allowed length is the size of the shortest solution found + allowed extra length by the user.

• Otherwise: Go on to the zero-field and the used-field of the next Term (if there is one).

The agent has following possibilities in the used field of the Term-Matrix (2).

Page 21: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

21

Calculation in MVQCA (14)• When the agent has ended its expedition through the

Term-matrix, all Solutions have been collected into a set of Solution.

• Solutions longer than allowed are sorted out.

• Solutions implied by other Solutions are sorted out.

• The remaining Solution are sorted by length.

Page 22: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

22

Calculation in MVQCA (15)• To speed up the calculation a maximum length of prime

implicants can be set: If a path is representing more variables (non null) as allowed, the agent is told to go back.

• If this threshold is used, the length of the solution must be less or equal this threshold, as the completeness of the set of solution may be not given else. (In this case the maximum length must be raised and the calculation repeated).

• A maximum prime implicant length of 4 has proven to be sufficient for datasets with a large number of variables.

Page 23: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

23

Sample

• The following sample of the agent‘s way of working is shown with the following MV Data Set

caseID V0 V1 V2 V3 Outcomerange: {0-2} {0,1} {0,1} {0-2} {0,1}a 0 1 0 0 0b 0 1 0 2 0x 0 0 1 0 1y 1 1 1 2 1

Page 24: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

24

Sample (2)

g: a,bb: x

g: a,bb: y

* * * *

g:- b: y

g: - b: -

g: -b: x

g: a,bb: -

g: -b: x,y

g: ab: x

g: -b: -

g: bb: y

All fields are loaded with the good and bad cases represented by the field

Page 25: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

25

Sample (3)

g: a,bb: x

g: a,bb: y

* * * *

g:- b: y

g: - b: -

g: -b: x

g: a,bb: -

g: -b: x,y

g: ab: x

g: -b: -

g: bb: y

Now the agent is created in the root field and the sets are filled with all cases.

Agent Sets:

Good = {a,b}

Bad = {x,y}

Page 26: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

26

Sample (3)

g: a,bb: x

g: a,bb: y

* * * *

g:- b: y

g: - b: -

g: -b: x

g: a,bb: -

g: -b: x,y

g: ab: x

g: -b: -

g: bb: y

Now the agent is created in the root field and the sets are filled with all cases.

Agent Sets:

Good = {a,b}

Bad = {x,y}

Page 27: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

27

Sample (4)On the following calculation pages the steps by the agent are shown by a red arrow. On left the agents sets are shown. (The old ones above the new ones).

The Set of found Terms is shown on the right

In this sample we start with the first real field of the first variable. In real, the algorithms allways starts with the zero-field.

Page 28: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

28

Sample (5)

g: a,bb: x

g: a,bb: y

* * * *

g:- b: y

g: - b: -

g: -b: x

g: a,bb: -

g: -b: x,y

g: ab: x

g: -b: -

g: bb: y

Now the agent is created in the root field and the sets are filled with all cases.

Old agent Sets:

Good = {a,b}

Bad = {x,y}

New agent Sets:

Good = {a,b}

Bad = {x}

V1 V2 V3 V4

Terms found:

{Ø}

Page 29: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

29

Sample (6)

g: a,bb: x

g: a,bb: y

* * * *

g:- b: y

g: - b: -

g: -b: x

g: a,bb: -

g: -b: x,y

g: ab: x

g: -b: -

g: bb: y

Now the agent is created in the root field and the sets are filled with all cases.

Old agent Sets:

Good = {a,b}

Bad = {x}

New agent Sets:

Good = Ø

Bad = {x}

V1 V2 V3 V4

Terms found:

Ø

The good-Set is empty. Go Back

Page 30: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

30

Sample (7)

g: a,bb: x

g: a,bb: y

* * * *

g:- b: y

g: - b: -

g: -b: x

g: a,bb: -

g: -b: x,y

g: ab: x

g: -b: -

g: bb: y

Now the agent is created in the root field and the sets are filled with all cases.

Old agent Sets:

Good = {a,b}

Bad = {x}

New agent Sets:

Good = {a,b}

Bad =Ø

V1 V2 V3 V4

Terms found:

V1{0}V2{1}

The bad-Set is empty. We have found a Term. Report and Go Back

Page 31: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

31

Sample (8)

g: a,bb: x

g: a,bb: y

* * * *

g:- b: y

g: - b: -

g: -b: x

g: a,bb: -

g: -b: x,y

g: ab: x

g: -b: -

g: bb: y

Now the agent is created in the root field and the sets are filled with all cases.

Old agent Sets:

Good = {a,b}

Bad = {x}

New agent Sets:

Good = {a,b}

Bad = {x}

V1 V2 V3 V4

Terms found:

V1{0}V2{1}

Zero-Field. Go on.

Page 32: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

32

Sample (9)

g: a,bb: x

g: a,bb: y

* * * *

g:- b: y

g: - b: -

g: -b: x

g: a,bb: -

g: -b: x,y

g: ab: x

g: -b: -

g: bb: y

Now the agent is created in the root field and the sets are filled with all cases.

Old agent Sets:

Good = {a,b}

Bad = {x}

New agent Sets:

Good = {a,b}

Bad = {-}

V1 V2 V3 V4

Terms found:

V1{0}V2{1}

V1{0}V3{0}

The bad-Set is empty. We have found a Term. Report and Go Back

Page 33: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

33

Sample (10)After the agent is finished, we have found the following Terms:

V1{0}V2{1}

V1{0}V3{0}

V1{0}V4{2}

V2{1}V3{0}

V2{1}V4{0}

V3{0}

Page 34: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

34

Sample (11)Two Terms are implied by an other Term and can be deleted.

V1{0}V2{1}

V1{0}V3{0}

V2{1}V3{0}

V3{0}

V1{0}V4{2}

V2{1}V4{0}

Page 35: How MVQCA works A short Introduction to the Ideas of the Algorithm used in MVQCA Lasse Cronqvist lasse@staff.uni-marburg.de

Basic Ideas of a MVQCA Algorithm - Lasse Cronqvist

35

Sample (12)In the End, we are having four Terms (and two Solutions consiting of one Term):

Terms: Solution:

V3{0} yes

V1{0}V2{1} yes

V1{0}V4{2} no

V2{1}V4{0} no

To be complete: V1{0}V4{2} + V2{1}V4{0} is a solution as well.