• No results found

The enriching of a CP-net by asymmetric merging

N/A
N/A
Protected

Academic year: 2021

Share "The enriching of a CP-net by asymmetric merging"

Copied!
31
0
0

Bezig met laden.... (Bekijk nu de volledige tekst)

Hele tekst

(1)

The enriching of a CP-net

by asymmetric merging

(2)

Layout: typeset by the author using LATEX.

(3)

The enriching of a CP-net

by asymmetric merging

a (non-)monotonic revision method for conditional preferences

Stijn Henckens 10716645

Bachelor thesis Credits: 18 EC

Bachelor Kunstmatige Intelligentie

University of Amsterdam Faculty of Science

Science Park 904 1098 XH Amsterdam

Supervisors

Mostafa Mohajeri Parizi & Giovanni Sileno Informatics Institute Faculty of Science University of Amsterdam Science Park 904 1098 XG Amsterdam 26 June, 2020

(4)

Abstract

Conditional preference networks (CP-nets) are commonly used to capture qualitative con-ditional preferences of a user (Boutilier, Brafman, Domshlak, Hoos, & Poole, 2004). Recent work researched building recommender systems using CP-nets (Ahmed, 2017). However, CP-nets are often incomplete or under-specified. Earlier work shows methods to symmetri-cally merge multiple incomplete CP-nets using voting semantics (Rossi, Venable, & Walsh, 2004; Grandi, Luo, Maudet, & Rossi, 2014). The merged CP-net can be used to fill in missing preference relations. However, the merged CP-net can contain averaged preference relations that do not fit in a user’s preference profile.

This thesis proposes an asymmetric merging (or enriching) method to obtain and fill in undefined preference relations in a CP-net. One CP-net preserves its preference relations, while obtaining new preference information from another CP-net. This notion of merging is shown to support both monotonic and non-monotonic preference revision.

Structure and merging rules are defined to detect merging conflicts and to describe the asymmetric merging approach. Besides completely merging conditional preference relations, the enriching method also supports the partially merging of single feature values.

(5)

Contents

1 Introduction 3

2 Background 4

2.1 Preference orderings . . . 4

2.2 Conditional preference orderings . . . 4

2.3 Conditional preference network . . . 4

2.4 Stronger conditional preferences . . . 6

3 Related work and theory 6 3.1 Merging CP-nets . . . 6

3.2 Enriching a CP-net . . . 7

3.3 Preference revision . . . 8

4 CP-net structure 8 4.1 CP-net structure rules . . . 8

5 Asymmetric merging 11 5.1 Notation . . . 12

5.2 Merging rules . . . 12

5.3 Partial merge . . . 13

5.4 Asymmetric merging approach . . . 14

5.5 Algorithm and complexity . . . 18

5.5.1 Algorithm . . . 18

5.5.2 Worst-case time complexity . . . 18

5.6 Monotonic and non-monotonic preference revision . . . 20

5.6.1 Contraction . . . 20

5.6.2 Expansion . . . 20

5.6.3 Revision . . . 21

6 Development and proofs 22 6.1 Prototype program development for asymmetric merging CP-nets . . . 22

6.2 Proof of correctness . . . 23

7 Conclusion 25

8 Discussion and Future work 25

References 27

Appendices 28

(6)

1

Introduction

In the contemporary digital age, the internet continuously gets enriched with products, services and social networks. Whether it is buying the product that you want, using a service that you need, or finding a person that you like or you share interests with, all these things often rely on personal choices and preferences. Preferences can be based on or influenced by a wide variety of conditions.

Managing these (conditional) preferences is an aspect of growing interest in Computer Science and Artificial Intelligence (Walsh, 2007; Brafman & Domshlak, 2009). The conditional preference network (CP-net) is a model to capture the qualitative conditional preferences of a user (Boutilier, Brafman, Hoos, & Poole, 1999; Boutilier et al., 2004). In recent work research is done to build recommender systems using CP-nets (Ahmed, 2017).

However, it is common that recommender systems using CP-nets assume that a user com-pletely defines his or her preferences over all variables (Purrington & Durfee, 2009). In reality, this assumption might not work out, as this explicitation can be a tedious task and can be prone to inconsistency errors. Also, users might simply be unable to specify their preferences over a continuously growing number of variables (Wang, Shao, Zhou, Wan, & Bouguettaya, 2016). This leads to having incomplete CP-nets that can not be accurately used in recommender systems. In principle, this problem can be solved by creating an automated process that fills in missing or incomplete preferences in a CP-net. To do this, however, the filled-in preferences must remain true to the preference profile of the associated user.

This thesis focuses on tackling the problem of filling in undefined user preferences. Exist-ing aggregation methods are limited to the mergExist-ing of multiple (incomplete) CP-nets (Rossi et al., 2004; Haret, Novaro, & Grandi, 2018). In these merging methods preference structures are weighted equally. The aim of this thesis is to provide and research a method for enriching a user’s CP-net with preferences coming from a second CP-net, using either complete or partial preference relations. In stead of merging symmetrically, equally weighting both preference struc-tures, the enriching method considers one preference structure more important than the other. This asymmetric merging approach allows for the addition of new preference information, while preserving existing preference relations.

The enriching method proposed here also allows for both monotonic and non-monotonic pref-erence revision based on belief revision semantics (Chomicki & Song, 2005; Gärdenfors, Rott, Gabbay, Hogger, & Robinson, 1995). In the former, the initial preference relation’s conclusions are consistent with the conclusions coming from the enriched preferences. In the latter, conclu-sions coming from the enriched preference relations are inconsistent with earlier preferences. The enriching method is captured in an algorithm to test its functionality, from which the enriching results will be analysed. The enriching method could also be executed repeatedly, using different preference structures every time, until a desired enrichment is reached.

The remainder of the thesis is structured as follows. Section 2 will provide some background information on preference orderings and CP-nets. Section 3 will describe related work and theory on filling in undefined preference orderings in CP-nets and (non-)monotonic preference revision. This section also shows why the asymmetric merging approach as considered in this thesis might be a considerable alternative compared to the previously described methods. After that, section 4 provides several CP-net structure assumptions. These assumptions are used to both explain and conduct the asymmetric merging approach of this thesis, followed by a complexity analysis and an evaluation on preference revision. This is described in Section 5. The coded implementation of the asymmetric merging approach is described and tested in Section 6. Finally, a general conclusion on this thesis is provided in Section 7, followed by a brief discussion including suggestions on future work in Section 8.

(7)

2

Background

This section briefly explains the notions of preference orderings, conditional preferences, con-ditional preferences networks (CP-nets), and a method for representing stronger concon-ditional preference statements.

2.1

Preference orderings

A preference, as considered in this thesis, is the notion of a subjective comparative evaluation in the form of “User A prefers X to Y”. Here, the evaluation concerns practical reasoning on matters of value. Furthermore, the comparative evaluation refers to expressing this evaluation on an item X relative to another item Y (Hansson & Grüne-Yanoff, 2018). Expressing these comparative evaluations is based on two fundamental concepts; strict preference () and indifference (∼) (Halldén, 1957). A strict preference describes a notion of an item being ‘better’ than another item, whereas an indifference corresponds to the notion of items being equal in value and therefore equally preferred. These concepts are also the two fundamentals in a preference ordering as considered in this thesis.

A preference ordering happens when a user defines his or her comparative evaluations over a set of values (items). Values of the same sort are collected in a set, represented as a feature. If a preference ordering over values in a feature is defined, a user has sorted values found in that feature, separated by either a strict preference or an indifference. Assume there exists a feature F consisting of the two values f1 and f2. A preference ordering over these values can

either be f1  f2 (meaning that f1 is strictly preferred to f2), f2  f1 (f2 strictly preferred

to f1) or f1 ∼ f2 (both values f1 and f2 equally preferred). Strict preferences are considered

strong preferences which are irreflexive and transitive. Indifferent preferences are considered weak preferences which are reflexive and negatively transitive.

To complete the notion mentioned in the beginning of the paragraph, a preference is consid-ered as a subjective comparative evaluation. Having a user define a preference makes it personally bound to that user, distinguishing it from the “objective” sense that the item considered in the preference is actually better than another item (Hansson & Grüne-Yanoff, 2018). Using this notion of a preference, a preference ordering can be seen as a concatenation of subjective com-parative evaluations.

2.2

Conditional preference orderings

Since constructing a preference order relies heavily on a user’s personal evaluations and isons, it is imaginable that there also exist personally bound factors that influence the compar-ative evaluation towards a preference. These factors are referred to as conditions. It is possible for a preference ordering rely entirely on a given condition.

Consider two features F and X containing the values f1, f2 and x1, x2 respectively. It is

possible for a user to define the preference ordering: f1 f2 if, and only if, it is given that x1

is ’true’. If x2 is ’true’, then the user prefers f2  f1. This shows two conditional preference

orderings, where the choice of preference ordering is dependent on a previous condition.

2.3

Conditional preference network

The conditional preference network is a compact graphical model that can specify the qualitative and conditional relations of preference orderings under ceteris paribus semantics (Boutilier et al., 1999, 2004).

(8)

Definition 2.1. Ceteris paribus, freely translated to ‘all else equal’. When describing relations between values in a set of features, one assumes that all other values in are held constant. There-fore one disregards the effects they might have on changing the defined preference relation.

A CP-net N consists of a finite set of features F = {F1, . . . , Fn}. For every feature Fi ∈ F

there exists of a domain of values, noted by D(F ). These values can be preferentially ordered by a user. For example, if there exists a feature Drink, containing the values D(Drink) = {cof f ee, tea}, a user can define his or her preference over the two drinks (cof f ee  tea, tea  cof f ee or cof f ee ∼ tea). In general, if it is assumed there exists a feature domain D(F ), containing the values fi, fj and fk, there exists a preference order in the form of fi fj  fk,

ideally consisting of all three values in D(F ). The complete ordering of all values in all domains can be expressed in a finite set of possibilities. The set of possible orderings over F is defined as OF =QFi∈FD(Fi) (Wicker & Doyle, 2007). For example, given a feature set F = {A, B, C},

the set of possible outcomes will be OF= D(A) × D(B) × D(C). Here, every partial outcome in

OF is represented in the form aibjck, where ai, bj and ck are values that exist in D(A), D(B)

and D(C) respectively.

Since a CP-net holds conditional preferences, two notions must be defined. The first notion is that of preferential independence. Assume there exist two subset features X ⊂ F and its complement Y = F − X, with F ∈ F . Let x1, x2 ∈ OX and y1, y2 ∈ OY be partial outcomes

of X and Y and let x1y1 be the form in which a outcome x1y1∈ OF is represented. The set of

features X is preferentially independent if, and only if, for all x1, x2, y1, y2 it holds that

x1y1 x2y1⇔ x1y2 x2y2.

The relation above says that the preference relation over the values of feature X, given that all other feature values remain equal, is the same no matter what values the other features take. Thus, if the relation above holds, we say that x1 is preferred to x2 ceteris paribus, from which

the preference relation x1 x2 can be expressed.

The second notion is that of a conditional preferential independence. To define this notion a third set of features Z is considered, such that X, Y and Z divide up the set F (assuming that they are all non-empty). Let z ∈ OZ be the ordered set of Z. The feature sets X and Y are

conditionally preferentially independent given z if, and only if, for all x1, x2, y1, y2 it holds that

x1y1z  x2y1z ⇔ x1y2z  x2y2z.

This relation says that the preferential independence of X and Y only holds when Z is assigned z (Wicker & Doyle, 2007; Boutilier et al., 2004). If this happens, X and Y are conditionally preferentially independent. From here the conditional preference relation z : x1  x2 can be

expressed, where the part before the colon (:) represents the condition. If a preference ordering relies on multiple conditions, the conditions get separated by a semicolon (;).

In a CP-net each feature Fi∈ F is graphically represented by a node. Next to every feature

node, the (conditional) preference ordering of the feature values are noted in the conditional preference table (CPT). If the ordering of feature values in node F1 depend on feature values

in node F2, the CPT of feature F1 contains conditional preference orderings. In that case, F2

is also in the parent set of F1 (noted as F2∈ P a(F1)). Graphically this means that for the set

P a(F1) there exists a directed edge going from each feature node in P a(F1) to F1 (Boutilier et

al., 2004).

For example, consider a CP-net N , consisting of feature A, with D(A) = {a1, a2, a3}, feature

B, with D(B) = {b1, b2} and feature C, with D(C) = {c1, c2}. The preference order of B relies

on A, and the preference order of C relies on B. Therefore, P a(C) = B and P a(B) = A. The example CP-net is visualised in Figure 1.

(9)

A B C a1 a2 a3 a1; a3: b1 b2 a2: b2 b1 b1: c1 c2 b2: c2 c1

Figure 1: Example CP-net.

Definition 2.2. (Boutilier et al., 2004) A CP-net N over features

F = {F1, . . . , Fn} is a directed graph over {F1, . . . , Fn}, whose nodes are annotated with

condi-tional preference tables CP T (Fi) for each Fi ∈ F . Every CP T (Fi) associates the conditional

preference orderings of values ui∈ U , where P a(Fi) = U .

2.4

Stronger conditional preferences

Regardless of the attractive properties a CP-net contains, the ceteris paribus houses a downside, as it restricts the use of more stronger preference expressions. While the ceteris paribus semantics make it possible for a user to define a preference relation in the form ’f1 is preferred to f2, all

else equal’, it is imaginable that in some cases a user wants to define a preference relation where all else is not equal (e.g. "I prefer f1 over f2 regardless of the values of other features"). These

expressions prove to be important, as they enable a user to define when a feature F is considered the most important feature. On the other hand, they also capture the importance of value preferences by saying that, whenever possible, value f2should be avoided. This is something the

CP-net representation in Section 2.3 can not do.

Therefore, an extended CP-net is formalised, providing this form of stronger conditional preference statements while maintaining the existing ceteris paribus semantics, and also allowing locally partially ordered preferences (Wilson, 2004). A conditional preference in Section 2.3 is represented in the form x1 : f1  f2 (given x1, f1 is strictly preferred to f2, ceteris paribus).

Now consider a conditional preference in the form x1: f1 f2[W ] (given x1, f1 is strictly more

preferred to f2, regardless of the value(s) in W ). Where W is a subset of feature values. In this

thesis the W is referred to as the regardless part of the stronger conditional preference statement. Using this preference representation, a ceteris paribus statement remains possible to express and will look like x1 : f1  f2 [∅], where W = ∅. Emphasising a conditional preference statement

corresponds to > : f1 f2[V − {F }]. Where > represents any given condition and V represents

the set of all features (Wilson, 2004).

3

Related work and theory

3.1

Merging CP-nets

Using the conditional preference relations represented in CP-nets, previous work has shown methods to merge multiple (incomplete) CP-nets into a single CP-net (Rossi et al., 2004; Haret

(10)

et al., 2018). Both these methods are based on voting semantics. Merging through the use of voting semantics is a way to equally include preferences from each CP-net, therefore considering every CP-net as equally important. From here on, this notion of merging is being referred to as a symmetric merge. Effectively, performing a symmetric merge means that the merged CP-net being constructed contains the conditional preference relations of the ‘average user’ over a set of CP-nets. The conditional preference relations found in the merged CP-net can be used whenever a user has no preferences specified over a given feature. However, using these preferences might conflict with the user’s personal preference profile, considering the CP-nets are arbitrarily chosen. Furthermore, using voting semantics disables the merging of two CP-nets, since most voting semantics become insignificant when using only two voters. Even though symmetrically merging multiple CP-nets does not directly contribute towards enriching a CP-net, it can prove useful in future work, which will be discussed in Section 8.

3.2

Enriching a CP-net

Instead of using symmetric merging methods described above, the focus of this thesis lies on the enriching of a CP-net by asymmetric merging.

The enriching of a CP-net freely translates to adding new preference information, while preserving existing preference information. If CP-nets were to merge symmetrically, the resultant CP-net would represent the average of all the CP-nets included in the merge. This merging approach does not fully support the translation of enriching a CP-net. Moreover, the process of averaging CP-nets using symmetric merging methods might cause preference information to get lost. To solve this, the notion of an asymmetric merge is introduced.

An asymmetric merge takes place between two CP-nets. In asymmetric merging the two CP-nets are not treated as equally important. In stead, one CP-net is assumed to be the most important CP-net of the two. This assumption acts as the cornerstone of the enriching method explained in this thesis. The enriching method does not find or construct average preference relations between two CP-nets. Enriching a CP-net by an asymmetric merge inserts as many preferences as possible coming from one CP-net into the other. Here, the most important CP-net is the preferential structure to receive new preference information and therefore is the CP-net that gets enriched. The less important CP-net is the preferential structure providing the preference information. This notion of an asymmetric merge enables the CP-net that gets enriched not to lose existing preference information. At the same time it gains preference information from the CP-net it is merged with.

Correctly implementing the enriching by asymmetric merging requires two things. The first requirement is a method to distinguish wanted preference information from unwanted preference information. Preserving all existing preference relations and adding new preference information at the same time might cause a CP-net to become inconsistent. For example, consider a user preferring x1 to x2. New preference information gets added saying that x2 is preferred to x1.

This does not support the earlier defined preference that x1 is preferred to x2, which makes it

unwanted preference information. On the other hand, if the added preference information would say that x2 is preferred to x3, the information is wanted. This preference information can be

used to enrich the earlier defined preference. This immediately raises the second requirement, which is a method for reorganising the newly gained preference information. The newly added preference information must be inserted in the right preference relation under the right feature. Both these requirements are met in the construction of asymmetric merging rules. The merging rules are based on a set of CP-net structure rules. The structure rules explicitly define how preference relations are presented. This helps to detect if the merging of two preference relations causes a conflict. Furthermore, the structure rules describe how preference information

(11)

in a CP-net can be organised (Section 4). The merging rules are used to detect conflicts and to describe two main merging methods (Section 5). One of the methods is the complete merge. The other one is the partial merge.

Enriching a CP-net leads to the addition of preference information. Adding preference infor-mation to a CP-net might cause the CP-net to become larger and therefore more specific. This means that ideally a preference relation has to be revised.

3.3

Preference revision

Previous work has shown that user preferences are unlikely to be static (Pu, Faltings, & Torrens, 2003; Chomicki & Song, 2005). Over time, or as new features or values are added to the preference network, a user’s preference can get refined or change. Preference revision can be used to perform these changes as new information enters a CP-net. Two types of preference revision are generally distinguished. These are separated in monotonic and non-monotonic preference revision, both based on classical belief revision semantics (Gärdenfors et al., 1995; Chomicki & Song, 2005).

Belief revision describes the process of how an agent’s belief can change when new information is taken into account (Hansson, 2017). The AGM model, named after its authors, forms the core of belief revision theory (Alchourrón, Gärdenfors, & Makinson, 1985; Hansson, 2017). In the AGM model, beliefs are represented by formal language sentences. The entire belief of an agent is represented by the set of these formal sentences (Hansson, 2017). In preference revision, these formal language sentences are represented by the conditional preference relations expressed in CP-nets. The CP-net itself can be seen as the set of all conditional preference relations, with every CPT being a subset.

The AGM model specifies three forms of change in beliefs (Hansson, 2017). The first one is contraction. In contraction a belief is removed from the complete set of beliefs. The second is expansion. In expansion, instead of removing, a belief is added to the set of beliefs. The third is revision. In revision a new belief is added to the set of beliefs, while at the same time earlier beliefs are removed to preserve an overall belief consistency.

This thesis will use the idea of three forms of belief change to express preference change (Section 5). These preference changes are used in the merging of two CP-nets, resulting in a changed, enriched network containing revised preferences. In the enriched CP-net the conclusion drawn from the preferences can either remain consistent with preferences coming from the initial CP-net (monotonic preference revision) or prove to be inconsistent with earlier conclusions (non-monotonic preference revision).

4

CP-net structure

This section describes the structure of a CP-net as considered in this thesis. Defining struc-ture rules for a CP-net aids in defining a conflict (Section 3). Defining conflicts is essential in determining whether or not a merge of two conditional preference statements is valid. If an invalid CP-net structure is generated by a merge, the merging of that preference relation can be (partially) ignored to preserve overall consistency in a CP-net.

4.1

CP-net structure rules

As seen in Section 2.4, using stronger conditional preference statements allows for more detail in a CP-net. Furthermore, when merging two CP-nets with arbitrarily sized feature domains, the regardless part of the stronger conditional preference relation also allows for the exclusion of any unused or unconsidered feature values. This can also be used in future work to expand the

(12)

preference revisions of merging two CP-nets even further. Therefore, the CP-net representation as described by Wilson (2004) is used as the backbone for the structure of a CP-net. For all structure rules below, consider a CP-net N . Let x1 : f1  f2 [W ] (condition : preference

ordering [regardless]) be the form in which conditional preferences in the CPTs are written. The first structure rule that is constructed is the preference conflict rule. Since preferences can either be strict or indifferent, it is possible for several indifferent preferences to coexist, but it is not possible for a strict preference to coexist with another strict preference.

Rule 4.1 (Preference conflict rule). For every conditional preference relation in CP T (F ), there exists only one strict preference ordering given a condition. If there exist multiple different strict preference orderings of feature values given the same condition, this is defined as a conflict.

Example 4.1. Consider CP T (F ) containing the strict conditional preference relations x1: f1

f2 [∅] and x1 : f2  f1 [∅]. These preference relations can not exist in a single CPT as they

would conflict. On the other hand, the two indifferent preference relations x1 : f1 ∼ f2 [∅] and

x1: f1∼ f3 [∅] can coexist.

The second rule is creating a notion of defining an independent conditional preference relation. This proves useful in defining its disconnectivity towards other features and preference relations.

Rule 4.2 (Independence rule). If a feature F in a CP-net is independent of other features, there exists no feature X in the CP-net that has a directed edge going from X to F . In other words, if F is independent, there exists no feature in the parent set of F .

Next a notion of having multiple equal preference orderings with varying conditions is defined. This is done by the disjunction rule. It states that a single conditional preference relation can contain multiple conditions, effectively representing multiple single condition preference relations in a single line.

Rule 4.3 (Disjunction rule). Consider a CP T (F ). If in two or more conditional preferences the preference orderings are identical, whereas the conditions are different, the conditional preferences can be combined in a single conditional preference. Here the conditions get sepa-rated by a disjunction, represented by a semicolon (;). The preference ordering is shared.

Example 4.2. Consider CP T (F ) containing the conditional preference relations x1: f1 f2[∅]

and y1 : f1  f2 [∅]. These preference relations share an identical preference ordering and can

be expressed in a single preference relation x1; y1: f1 f2 [∅].

With the disjunction rule stated, it is possible for a CPT to hold a conditional preference relation where the condition consists of the disjunction of all feature values in every other feature. This corresponds to an independent preference relation, since having an identical preference ordering over every possible condition is the same as having an unconditional preference relation.

Rule 4.4 (Complete disjunction rule). If the condition of a conditional preference relation in CP T (F ) contains the complete disjunction of all feature values in F − {F }, the conditional preference relation is preferentially independent. This means that the conditional disjunction can get replaced by >.

Example 4.3. Consider a CP-net with features F = {F, X}, where D(X) = {x1, x2}. If

CP T (F ) contains the conditional preference relation x1; x2: f1 f2 [∅], this describes a

(13)

Whenever a user specifies his or her strict preferences over a domain of values, it is assumed that the preference remains static until specified differently. As mentioned in Section 3, in reality preferences rarely remain static. However, in the asymmetric merging approach the assumption is made that a strict preference ordering defined by a user does not change directly as a result of adding values and therefore remains absolute. A strict preference relation can only change completely if the user manually re-specifies the order. This statement plays a crucial part in the monotonic preference revision.

Rule 4.5 (Strict preference rule). If in a CPT a conditional preference relation is defined by a user, any strict preference ordering is absolute, meaning that a user’s strict preference relation (given a condition) will not change, unless specifically redefined differently by the user.

On the other hand indifferent preference relations exist as well. To allow for non-monotonic preference revision, it is assumed that weak indifferent preference relations can change as a result of adding new values and preferences among them. This allows for weak indifferent preferences such as x1: f1∼ f2[∅] to change to a strict preference (e.g. x1: f1 f2[∅]).

Rule 4.6 (Indifferent preference rule). If in a CPT a conditional preference relation is defined by a user, any weak preference ordering is changeable, meaning that a user’s indifferent preference relation (given a condition) can change, as it is not strictly defined by a user.

In order to further support non-monotonic preference revision, the notion of transitivity within strict preference orderings is stated. Transitivity allows for strict preferences to be re-organised, while preserving relative preference orderings amongst values. Despite Rule 4.5, this enables a strict preference relation to change its ordering. This notion will act as the cornerstone for the partial merge approach and allows for the non-monotonicity amongst strict preference orderings. Note here that transitivity does not hold for indifferent preference relations.

Rule 4.7 (Transitivity rule). Given a conditional or independent preference relation in a CPT. If there exists a strict preference ordering in the preference relation, the strict preference remains existent relative of the values in that preference. When adding new values in a strict preference, the initial strict preference ordering can remain existent through transitivity.

Example 4.4. Consider the conditional preference relation x1 : f1  f2  f3 [∅]. Adding an

additional value f4and changing the conditional preference relation to x1: f4 f1 f2 f3[∅]

is considered valid, since the preference ordering f1 f2 f3still holds. Note that on the other

hand it’s visible that f1 now no longer is the most preferred value in feature domain.

Next is the notion of the stronger statement as mentioned in Section 2.4. If a user has specified a preference relation regardless of some features or feature values, this is considered as a stronger preferential statement. Therefore the regardless part of the preference relation remains existent, unless re-specified. This allows the regardless part to discard any possible added features or values.

Rule 4.8 (Stronger statement rule). If a conditional preference relation contains a regardless part, this is considered as a stronger, unconditional preference definition. The regardless part therefore will not change unless specified by the user.

Furthermore, it is possible for a conditional preference relation to have its condition based on a combination of feature values. If there exists a conditional preference relation where the condition is based on multiple constraints in the form of feature values, the condition is connected by a conjunction. This assures that the conjunctive condition is being handled as a single and unique condition.

(14)

Rule 4.9 (Conjunction rule). If a condition consists of a conjunction, the entire conjunction is being treated as a unique condition. The conjunctive condition is not adopted into the feature domain.

This leads towards the statement that in a CPT every condition can only occur once (with exception of the multiple condition rule). This ensures that a CPT does not contain duplicates.

Rule 4.10 (Unique condition rule). Every condition in a CPT is unique and occurs only once.

As a final rule, there are two exceptions to the unique condition rule. It might occur that two preference relations share the same condition, but have preference orderings where every value is unique. If this happens, it is not possible to represent them both in a single preference relation. This is one exception for having a condition occur multiple times inside a CPT. The other exception is when two conditional preference relations sharing the same condition are indifferent. In this case, there is no logical way to connect the indifferent relations.

Rule 4.11 (Multiple condition rule). Despite the unique condition rule, a condition can exist multiple times in a CPT if, and only if, (1) every value in the preference ordering given a condition is unique compared to any other value in a preference ordering given the same condition, (2) the preference ordering given the same condition is indifferent.

Example 4.5. Consider the feature F with D(F ) = {f1, f2, f3, f4} and CP T (F ) containing the

conditional preference relations x1: f1 f2[∅] and x1: f3 f4[∅]. In this situation, having two

identical conditions in the same CPT is considered valid since there is no possibility of expressing the two conditional preference relations in a single relation.

Example 4.6. Consider the feature F with D(F ) = {f1, f2, f3} and CP T (F ) containing the

conditional preference relations x1: f1∼ f2[∅] and x1: f1∼ f3[∅]. In this situation, having two

identical conditions in the same CPT is considered valid since there is no logical way to connect the two conditional preference relations in a single relation.

The structure rules stated above can now act as guidelines for the merging approach. This is explained in the next Section.

5

Asymmetric merging

The enriching of a CP-net by asymmetric merging is explained in this Section. The asymmetric merging will follow the structure rules mentioned in the previous Section, ensuring that a CP-net is being enriched while maintaining its initial preferences, rather than averaging between two different preference relations.

After explaining the notations used in the asymmetric merging approach, this section will bring forward several merging rules. These rules are used to define when two conditional prefer-ence relations have to merge, as well as how the two conditional preferprefer-ence relations are going merge. A notion of inheriting new features is described, as well as two notions for merging condi-tional preference relations. One of them is the notion of a complete merge, the other of a partial merge. Afterwards, a general approach on merging two CP-nets will be explained, followed by several examples. These examples will be about both monotonic and non-monotonic preference revisions.

(15)

5.1

Notation

Consider a set of CP-nets N . A CP-net N ∈ N is indexed using a subscript label. A superscript label indexes the amount of enrichment iterations a CP-net has had, starting from 0. For example, a non-enriched CP-net can be noted as N1(= N10).

To distinguish equal features coming from different CP-nets, a feature is labelled with a subscript number displaying the CP-net that feature is in. For example, AN3

1 corresponds to

feature A, present in CP-net N1after it has undergone 3 enrichments.

Just as seen earlier, feature values in a domain get labelled with an index (D(F ) = {f1, f2, f3}).

Preference orderings are again either strict () or indifferent (∼). In a conditional preference relation both > and [∅] are not written in the CP-net representation.

5.2

Merging rules

For the remainder of this Section, two CP-nets, N1 and N2, are considered, both satisfying the

structure rules. In this section, the enriching of N1with features and/or values coming from N2

is considered.

To preserve the structure of a CP-net as defined in Section 4, it is important that during the merging of any two CP-nets each structure rule remains true. In other words, if merging a conditional preference relation from N2to N1will violate a structure rule, it causes N1to become

inconsistent. Therefore, it is needed to formulate a rule that ensures, for every conditional preference relation, it can only be merged according to this method as long as it follows the structure rules.

Rule 5.1 (Invalid merging rule). Consider feature F in both N1 and N2. The (partial)

merging of a conditional preference relation found in CP T (FN2) to CP T (FN1) becomes invalid

as soon as one or more structure rules will be violated.

During the merging of conditional preference relations from N2 to N1it might occur that N2

contains a feature not existing in N1. To ensure a maximised enriching of N1, it is desirable to

inherit the undefined feature.

The different feature rule contributes heavily towards the possibility of non-monoticity in a revised and enriched CP-net, since inheriting features can reconstruct a CP-net. With this rule it is possible for an enriched CP-net to obtain one or more features in the parent set of previously existing features, resulting in the possible addition or removal of conditional statements.

Rule 5.2 (Different feature rule). If N2 contains a feature not found in N1, the feature gets

adopted by N1.

Next is the merging of preference relations which exist in both networks. Consider both N1

and N2 contain feature F . It is possible for CP T (FN2) to contain a preference relation, given

a condition, that is not present in CP T (FN1). In that case, enriching CP T (FN1) would mean

copying the conditional preference relation from CP T (FN2) to CP T (FN1). This form of merging

is from here on referred to as complete merging. Performing a complete merge corresponds to a maximised enrichment, as it completely inherits a conditional preference relation coming from another CP-net.

Rule 5.3 (Complete merging rule). Given a feature F in both N1 and N2. If a conditional

preference relation pN2∈ CP T (FN2) (1) contains a condition which is not found in any

condi-tional preference relation pN1∈ CP T (FN1), or (2) passes the multiple condition rule (Rule 4.11);

(16)

Example 5.1. Consider feature F in both N1and N2and containing values D(F ) = {f1, f2, f3}.

In both CP-nets the preference ordering of F depends on a value xi, coming from another feature

X. Assume CP T (FN1) only contains the conditional preference relation x1 : f1 f1  f3 [∅].

Now assume that CP T (FN2) contains two conditional preference relations; x1: f1 f2 f3[∅]

and x2: f3 f1 f2[∅]. It is apparent that CP T (FN1) does not contain condition x2, therefore

the entire conditional preference relation x2: f3 f1 f2[∅] is inherited by CP T (FN1).

On the other hand, it is also possible for CP T (FN2) to contain a conditional preference

relation where there already exist a preference in CP T (FN1), given that same condition.

Disre-garding the merging of such an occurrence, could potentially discard any valuable information, as the preference ordering in CP T (FN2) could hold more detail than the one in CP T (FN1).

Therefore a method called partial merging is constructed. Besides inheriting a more detailed preference ordering, a partial merge is able to inherit single feature values from a preference ordering in CP T (FN2) and insert them in the preference ordering found in CP T (FN1) while

maintaining previously defined preferences.

Rule 5.4 (Partial merging rule). Consider a feature F in both N1 and N2. Given are a

conditional preference relation pN1 ∈ CP T (FN1) and a conditional preference relation pN2 ∈

CP T (FN2). Both pN1 and pN2 share the same condition. If there exists at least one feature

value fj in pN1 and pN2 and there exists at least one unique feature value fi in pN2, not found

in pN1, a partial merge is performed.

5.3

Partial merge

Assume two conditional preference relations pN1 and pN1 satisfying the partial merging rule. It

is possible that pN2 is significantly different from pN2. This means that a possible conflict might

occur, even though pN2 might hold parts that are useful in enriching a preference relation. Since

creating a new preference relation is not possible according to the structure rules, the partial merging method is created.

The partial merge method checks for every value in a preference relation pN2 to which values

it is more preferred, and to which values it is less preferred. Here pN2 might hold values that

are not in pN1. These values are not shared by both CP-nets, therefore they are not taken into

account. This means that for every unique value fi in pN2 the feature values which are in pN2,

that also exist in pN1, are preferentially organised relative to fi. This results in obtaining a

new preference relation pfi. This preference relation can now be used to check for any possible

structure violations when merging with pN1. If there are no violations, value fi can be added

to pN1 at the corresponding position. If violations do occur, value fi is not added. This repeats

until all unique values in pN2 are checked.

Example 5.2. Assume there are two conditional preference relations that are partially merged. These relations are

b1: a1 a2 a3 [∅] (pN1)

b1: a5 a3 a4 a1 a2 [∅] (pN2).

It is clear that pN1 and pN2 can not merge entirely, as the preferences would conflict, since

the preference ordering a1  a2  a3 in pN1 is not found in pN2. However, it is also apparent

that pN2 holds the value a5. This value is preferred over all other values in pN2, including a1, a2

and a3. Following the partial merging approach, a5 can be turned into a new preference relation

(17)

to a5 is checked. This results in the preference relation below.

b1: {∅}  a5 {a3, a1, a2} [∅] (pa5)

Having pa5 now provides a clear indication on where a5 can be placed inside pN1. This results

in a temporarily merged pN1. For now, it is called p

0 N1.

b1: a5 a1 a2 a3 [∅] (p0N1)

Furthermore, pN2 also holds the unique value a4. Repeating the process above for this value

obtains a new preference relation pa4.

b1: {a5, a3}  a4 {a1, a2} [∅] (pa4)

Important to note is that a5 is now part of p0N1, as it was merged earlier. However, if pa4 is

compared to p0N

1 to determine where a4should be positioned, it becomes clear that this yields a

conflict. There is no way to insert a4, since in p0N1 it is not true that a3is strictly more preferred

over a1and a2, which pa4 suggests. Therefore it is concluded that a4will not be included in the

merging process. The final enriched result for pN1

1 will be:

b1: a5 a1 a2 a3[∅] (pN1 1).

Besides inserting feature values on which a preferential consensus exists as shown in Example 5.2, the partial merging method also allows for inserting a value at a position in the preference relation where there already exists a value. In that case, the values sharing that position obtain an indifferent relation relative to each other.

5.4

Asymmetric merging approach

Having provided all structure and merging rules, the general approach for enriching a CP-net by asymmetric merging can now be described. The way two CP-nets will merge is explained in three phases. The first phase is the decomposing of the CP-nets into single condition preference relations. The second phase inherits feature domains and executes the merging for every condi-tional preference relation found in the CPTs. Finally, the third phase recomposes the merged results to ensure a compact representation of the enriched CP-net.

A B b1: a1 a2 b1 b2 (a) CP-net N1 A B C a4 a1 a5 a2 a3 a2: b2 b1 a4; (a1, c1) : b1 b2 c2 c1 c3 (b) CP-net N2

(18)

Example 5.3. Again, consider two CP-nets N1 and N2, displayed in Figure 2, where N1 is

enriched by merging it with N2. It is assumed that in CP-net N1 the feature domains cover the

values D(AN1) = {a1, a2} and D(BN1) = {b1, b2}. Whereas in CP-net N2 the feature domains

cover the values D(AN2) = {a1, a2, a3, a4, a5}, D(BN2) = {b1, b2} and D(CN2) = {c1, c2, c3}. The

CP-nets in Figure 2 are used as a leading example for the merging approach. First, as mentioned above, both CP-nets are decomposed into single condition preference relations. By doing so, it is ensured that any independent preference relation is now represented in terms of conditions it is independent over. Furthermore, it also ensures that conditional preference relations containing a disjunction of conditions get represented in single condition preference relations. This allows for a much clearer merging process. Looking at CP-net N1, it becomes clear that BN1 represents

an independent preference relation. Knowing the domains of both features, this means that the preference relation in BN1 is independent over the feature values in D(AN1) = {a1, a2}.

Therefore the preference relation can be decomposed in two separate single condition preference relations; a1: b1 b2[∅] and a2: b1 b2[∅]. The same can be done in CP-net N2for the features

AN2 and CN2. Knowing the domains of these features, the independent preference relations can

be rewritten to single condition preference relations. However, in CP-net N2 there also exists a

conditional preference relation containing a disjunction of conditions. These are also separated into single condition preference relations. Figure 3 shows the decomposed CP-nets.

A

B

b1: a1 a2

a1: b1 b2

a2: b1 b2

(a) CP-net N1 (decomposed)

A B C b1: a4 a1 a5 a2 a3 b2: a4 a1 a5 a2 a3 c1: a4 a1 a5 a2 a3 c2: a4 a1 a5 a2 a3 c3: a4 a1 a5 a2 a3 a2: b2 b1 a4: b1 b2 (a1, c1) : b1 b2 a1: c2 c1 c3 a2: c2 c1 c3 a3: c2 c1 c3 a4: c2 c1 c3 a5: c2 c1 c3 b1: c2 c1 c3 b2: c2 c1 c3 (b) CP-net N2 (decomposed)

Figure 3: CP-net N1 (a) and CP-net N2(b) in their decomposed states.

Continuing with the second phase, the decomposed CP-nets can now be merged according to the merging rules. To do this, every CPT in CP-net N2 is considered one by one. The CPT

in N2 merges with the corresponding CPT in N1. If the CPT’s feature is not present in CP-net

N1, a new feature with an empty CPT is created (Rule 5.2). First, if the domain of the CPT’s

feature in N2 holds values which are not found in the domain of the corresponding CPT feature

in N1, these values are added to the domain of N1. Next, every conditional preference relation

(19)

rules. This is repeated until all CPTs are considered.

Example 5.4. Proceeding from the decomposed CP-nets in Figure 3, the CPTs are merged as follows. First CP T (AN2) is considered. Important to note is that feature domain D(AN2)

holds values which are not in D(AN1). These values are added to D(AN1), now holding the

values {a1, a2, a3, a4}. Next, every conditional preference relation in CP T (AN2) is merged with

CP T (AN1). The first conditional preference relation found in CP T (AN2) is b1: a4 a1 a5

a2 a3 [∅]. However, CP T (AN1) already holds a conditional preference relation b1 : a1 a2

a3 [∅]. Both preference relations share the same condition and at least one feature value in the

preference ordering. Furthermore, b1 : a4  a1  a5  a2  a3 [∅] holds unique feature values

(not found in the other preference relation) in its preference ordering as well. Therefore a partial merge is performed (Rule 5.4). Performing the partial merge does not lead to conflicts, meaning that all unique feature values are inserted in the preference relation coming from CP T (AN1).

Looking at the other conditional preference relations in CP T (AN2), it is visible that every

conditional preference relation holds a condition not found in any conditional preference relation in CP T (AN1). This means that for all these cases a complete merge is performed (Rule 5.3).

Now that CP T (AN2) is merged with CP T (AN1), the merging continues for CP T (BN2). For

CP T (BN2) the conditional preference relation a2 : b2  b1 [∅] is not merged, as this would

conflict with a structure rule (Rule 4.5). The other conditional preference relations are being merged completely. As for CP T (CN2), since CP T (CN1) is still empty, all conditional preference

relations are being completely merged as well, completing the merging process.

A B C b1: a4 a1 a5 a2 a3 b2: a4 a1 a5 a2 a3 c1: a4 a1 a5 a2 a3 c2: a4 a1 a5 a2 a3 c3: a4 a1 a5 a2 a3 a1: b2 b1 a2: b2 b1 a4: b1 b2 (a1, c1) : b1 b2 a1: c2 c1 c3 a2: c2 c1 c3 a3: c2 c1 c3 a4: c2 c1 c3 a5: c2 c1 c3 b1: c2 c1 c3 b2: c2 c1 c3 (a) CP-net N1 1 (decomposed) A B C a4 a1 a5 a2 a3 a1; a2; a4; (a1, c1) : b1 b2 c2 c1 c3 (b) CP-net N1 1 (recomposed)

Figure 4: Two enriched CP-nets. The decomposed (a) and recomposed (b) resultant CP-net N1

(20)

The last phase focuses on recomposing the merged CP-net N1

1. Even though decomposing the

CP-nets allowed for a clearer merging process, it also caused the CP-net to become less compact and therefore less clear on a graphical level. To solve this, every CPT in N1

1 is recomposed as far

as possible. This is done according to the structure rules mentioned in Section 4.1. The results of the enriched CP-net N1

1 in both its decomposed and recomposed state are displayed in Figure

4.

A second merging example between CP-net N3and CP-net N4is shown in Figure 5. In this

Figure a partial merge between b1: a1 a2 a3 a4and b1: a5 a2 a8 a4 a6 a3 a7

is performed. Besides showing that value a6 in CP T (AN4) is not inserted in CP T (AN3) as a

result of the partial merge approach, it also shows an example of a weak indifferent preference relation created during the partial merge. Preforming a partial merge for the value a5 coming

from CP T (AN4) results in assigning a5to the same position in CP T (AN3)’s preference ordering

as a1. The user has no preferences specified on which value is preferred. Therefore, a new weak

indifferent preference relation containing both a1 and a5is created.

A B b1: a1 a2 a3 a4 b2 b1 (a) CP-net N3 A B C b1: a5 a2 a8 a4 a6 a3 a7 b1 b2 b1: c2 c1 (b) CP-net N4 A B C b1: a1 a2 a8 a3 a4 a7 b1: a1∼ a5 a1; a2; a3; a4: b2 b1 a5; a6; a7; a8; c1; c2: b1 b2 b1: c2 c1 (c) CP-net N1 3

Figure 5: Three CP-nets. CP-net N3(a) is enriched by merging with CP-net N4(b), resulting

in the enriched CP-net N1 3 (c).

(21)

5.5

Algorithm and complexity

Before testing, a general algorithm of the enriching by asymmetric merging concept is described. The worst-case time complexity of the algorithm is analysed afterwards.

5.5.1 Algorithm

Before starting the asymmetric merging algorithm, a deep copy of N1, known as N11, is created.

This ensures that the original CP-net N1 is safely preserved. Both CP-nets get decomposed

into CP-nets containing only single condition preference relations. The algorithm follows the asymmetric merging approach and starts a first loop through all features in N2. If the feature

does not appear in N11, it is added to N11 and an empty CPT for the corresponding feature is created. Next in the loop, every unique value in the feature domain of N2is copied to the feature

domain of N11.

A second loop starts checking every preference relation inside the CPT of N2’s feature to

determine if it has to be completely or partially merged with the corresponding CPT inside N11.

First it is checked if the condition of the preference relation is not yet found in the CPT of N11.

If so, a complete merge is performed. If the condition already exists in the CPT of N1

1, a check

is performed to determine if the preference relation contains only unique values or an indifferent preference. If so, a complete merge is performed. Otherwise, the conditional preference relation is partially merged with N1

1.

The partial merging needs an update after every inserted value. This ensures that during the partial merge of the next value the last added value is also taken into account. This causes the partial merge algorithm to be recursive and therefore more time complex. The partial merging algorithm is provided separately.

The algorithm recomposes the enriched CP-net after every feature is merged. Lastly, the enrichment counter is increased.

5.5.2 Worst-case time complexity

The worst-case time complexity of the asymmetric merging algorithm is calculated by going over the algorithm step by step. For every step in the algorithm the time complexity is determined. In the case of conditional statements, the time complexity of the worst-case condition is considered. Afterwards the total time complexity is calculated.

The algorithm starts with deep copying a CP-net. It is assumed that every level in the CP-net structure is copied in linear time. This means that for every feature n, every preference needs to be copied n times. In a worst-case the deep copy is executed in quadratic time (O(n2)). The decomposing of a CP-net needs an extra level of linear time in its worst case, since every multi-conditional preference could be decomposed into n single conditional preferences. The decomposing a CP-net is therefore executed in cubic time (O(n3)). Important to note is that this assumes simplistic linear search. The search time can be reduced with better data structures. The algorithm continues with a for-loop going through all features in the CP-net. All statements inside the first for-loop can run in linear time. The first for-loop runs O(n) times. The second for-loop runs O(n2) times. The second for-loop contains a set of conditional statements. The

worst-case statement to be executed is a partial merge. The partial merge holds yet another for-loop going through all n values in a conditional preference relation. If a value is partially merged, the algorithm recalls itself, producing yet another for-loop. In the worst case this means that the partial merge algorithm runs O(n2) times.

The last steps in the asymmetric merging algorithm is recomposing the CP-net and increasing the enrichment count. Just as decomposing, the recomposing in the worst case is done in cubic

(22)

Algorithm 1 Asymmetric merge Require: CP-nets structures N1, N2

Deep copy N1to N11 Decompose CP T (FN1 1) Decompose CP T (FN2) for feature F ∈ N2 do if F /∈ N1 1 then Add F tp N11 end if

Add unique values in D(FN2) to D(FN1 1)

for preference relation pN2∈ CP T (FN2) do

if condition(pN2) /∈ CP T (FN1 1) then

Complete merge pN2

else if condition(pN2) ∈ CP T (FN1 1) then

if preference(pN2) is unique or indifferent then

Complete merge pN2 else Partial merge pN2 end if end if end for end for Recompose CP T (FN1 1) Increase enrichments N1 1 return N11

Algorithm 2 Partial merge

Require: Conditional preference relation pN2

Take conditional preference relation pN1

1, where condition(pN2) = condition(pN11)

for value f ∈ pN2 and /∈ pN1 1 do

Take the set of values in (pN2 and pN1

1) to which f is less preferred

Take the set of values in (pN2 and pN1

1) to which f is more preferred

Construct preference relation pf

if pf does not conflict with pN1 1 then Add f to pN1 1 Partial merge pN2 end if end for

(23)

time. Increasing the enrichment count can be done in linear time. Putting this together yields the worst-case time complexity of the asymmetric merging algorithm, shown in Equation 1.

Tmerge= O(n2) + O(2n3) + O(n) × O(n2) × Tpartial + O(n3) + O(1)

Tpartial= O(n2)

Ttotal= O(n2) + O(2n3) + O(n) × O(n2) × O(n2) + O(n3) + O(1) (1)

= O(n5)

5.6

Monotonic and non-monotonic preference revision

After merging a CP-net with a second CP-net and observing the resultant enriched CP-net, it becomes clear that the structure of the enriched CP-net can significantly change compared to its initial state. The changed structure might suggest changes in (conditional) preferences as well. Some preference changes might lead to different preference conclusions, while others might stay nearly unchanged. These changes are further analysed in this Section.

Earlier, the notion of belief revision was mentioned, where a belief can change after adding new belief information (Section 3.3). Three forms of belief change were stated; contraction, expansion and revision. In preference revision, preference relations are revised with other prefer-ence relations, yielding new preferprefer-ence relations (Chomicki & Song, 2005). Since this is exactly what happened during the enriching of a CP-net, the three forms of belief changes are translated to preference change. These will be used to show the monotonic and non-monotonic nature of the enriching method described during this thesis.

5.6.1 Contraction

In contraction, a specific belief is removed from the entire set of beliefs resulting in a contracted set of beliefs (Hansson, 2017). Removing a notion of belief corresponds to believing new information that is the negation of the previous belief. This would correlate strongly with non-monotonic reasoning. However, the enriching method in this thesis specifically states that a user’s strict preference relations are absolute. Therefore, conflicting preference relations are being ignored during the enriching process. This means that preference contraction does not happen as a direct result of enriching a CP-net. However, indirectly preference information can be negated, as described in Section 5.6.3.

5.6.2 Expansion

Instead of removing a belief, expansion adds a belief to a user’s set of beliefs without removing any previous beliefs (Hansson, 2017). Mapping belief expansion to preference expansion would mean that a new conditional preference relation is added to an existing set of conditional prefer-ence relations. In other words, a conditional preferprefer-ence relation is completely added to a CP-net (or CPT). This corresponds to the inheriting of a new feature and the complete merge of a con-ditional preference relation, both present in the enriching method. A clear example of preference expansion can be seen in Figure 4. Here CP-net N1

1 was expanded with feature C, as well as an

independent preference relation (over expanded feature domains).

Adding new preference information, while maintaining previous preference information, is a clear example of monotonic preference revision and the monotonic nature existent in the enriching method.

(24)

5.6.3 Revision

Belief revision happens when a new belief is added to a set of beliefs, while at the same time another belief is removed if this is needed to ensure that the resulting set of beliefs remains consistent (Hansson, 2017). This notion of belief change correlates strongly with non-monotonic reasoning.

When translated to preference revision, it would correspond to adding a new conditional preference relation to a set of preference relations (CP-net), while at the same time changing a preference relation to maintain consistency. This is what happens in the enriching method in several occasions.

The first and most clear example is the removal of an indifferent preference relation through preference revision. This means that after obtaining a new preference relation, a previously existing indifferent preference relation is removed in order to stay consistent with the newly obtained preference. For example, consider the two conditional preference relations as seen in CP T (AN1

3) in Figure 5(c).

b1: a1 a2 a8 a3 a4 a7

b1: a1∼ a5

Assume CP T (AN1

3) is merged with the conditional preference relation b1: a5 a1[∅]. According

to the new preference information gained, there no longer exists a weak indifference between the values a1and a5. The new preference is inherited, while an earlier preference relation is negated,

resulting in a non-monotonic preference revision.

Besides completely removing an entire conditional preference relation, preference revisions can also occur on a smaller scale. Instead of removing a conditional preference relation as a result of a newly added preference relation, it might also occur that the structure of the CP-net needs to be changed in order to maintain consistency. In other words, adding new features and/or values to a CP-net, can result in either gaining or losing feature independence. This is clearly visible in the enriched CP-net N1

1 in Figure 4, where both independence is gained and lost

compared to CP-net N1 in Figure 2(a). In CP-net N1, feature AN1 shows a single conditional

preference relation, dependent on a value coming from BN1. However, after enriching it with the

independent preference relation in AN2, feature AN11 no longer shows an dependency over the

other features in the CP-net. The dependent characteristic of feature AN1 is removed as a result

of adding new preference information.

On the other hand, there is the example of feature BN1. In CP-net N1, this feature shows

an independence over the other feature in the CP-net. Remarkably, after enriching, feature BN1

not only lost its independent character, but also became dependent on not one, but two features. The possibility of enriching a CP-net with new features therefore can influence the structure of a CP-net.

This shows a simple example of how adding preference information can lead to a revision of earlier preference information, which has the potential to not only remove earlier preference relations, but also to drastically change the structure and therefore the dependency of features in a CP-net.

To conclude, the enriching method suggested in this thesis might prove useful in both mono-tonic and non-monomono-tonic preference reasoning research.

(25)

6

Development and proofs

For the project to be complete, the concept of enriching a CP-net by asymmetric merging needs to be tested in practical terms and/or validated by some more formal means. This section will elaborate on the prototype development conducted during the project as well as providing additional proofs of correctness.

6.1

Prototype program development for asymmetric merging CP-nets

As a first step for validating the proposal, a prototype program executing the algorithm has been developed along with the project. As a requirement, CP-nets need to be represented in a compact way which is easy to work with. A CP-net consists of a set of ordered preferences, organised by feature; it is therefore important for a preference ordering to maintain that order. The JSON file format provides an intuitive way to gather and sort data. It also allows for the inclusion of strings and arrays, which can ensure that a preference ordering remains ordered. Therefore, the code represents a CP-net in a JSON file format. Besides containing the CP-net, the JSON file also contains the value domains per feature in the CP-net, as well as the amount and names of the CP-nets it already was enriched with. The complete structure of an example CP-net represented in a JSON file is provided in Appendix A.

The JSON CP-nets are converted into a structure datatype. This allows for easier modi-fications to the CP-net. The CP-net structures are fed into the (coded) asymmetric merging algorithm (see Section 5.5). The algorithm returns the enriched CP-net.

The code has been tested with multiple CP-nets. One of this tests concerns for instance the asymmetric merge shown in Figure 5. The results of the test are displayed in Listings 1 and 2. All three CP-nets seen in Figure 5 (N3, N4and N31) are displayed inside the terminal after executing

the code (Listing 1). The enriched CP-net N1

3gets exported to a new JSON file format (Listing 2).

The full code implementation can be visited at https://github.com/shenckens/Enrich-CPnet.

Listing 1: Enriching N3 by asymmetric merge with N4(Linux terminal)

$ python3 e n r i c h . py ’CPN_3 . j s o n ’ ’CPN_4 . j s o n ’ <CPN_3> A : b1 : a1 > a2 > a3 > a4 B : b2 > b1 <CPN_4> A : b1 : a5 > a2 > a8 > a4 > a6 > a3 > a7 B : b1 > b2 C : b1 : c 2 > c 1 <CPN_3> ( 1 x e n r i c h e d ) A : b1 : a1 > a2 > a8 > a3 > a4 > a7 b1 : ( a1 ~ a5 ) B : a4 ; a2 ; a3 ; a1 : b2 > b1 a6 ; a5 ; a8 ; a7 ; c 1 ; c 2 : b1 > b2 C : b1 : c 2 > c 1

(26)

Listing 2: Enriched CP-net N1

3 in JSON file format

{ "name " : "CPN_3" , " e n r i c h e d " : [ "CPN_4" ] , "CPT" : { "A" : { " domain " : [ " a1 " , " a2 " , " a3 " , " a4 " , " a5 " , " a6 " , " a7 " , " a8 " ] , " p r e f _ r e l a t i o n s " : [ { " c o n d i t i o n " : [ " b1 " ] , " p r e f e r e n c e " : [ " a1 " , " a2 " , " a8 " , " a3 " , " a4 " , " a7 " ] , " r e g a r d l e s s " : [ " None " ] } , { " c o n d i t i o n " : [ " b1 " ] , " p r e f e r e n c e " : [ [ " a1 " , " a5 " ] ] , " r e g a r d l e s s " : [ " None " ] } ] } , "B " : { " domain " : [ " b1 " , " b2 " ] , " p r e f _ r e l a t i o n s " : [ { " c o n d i t i o n " : [ " a4 " , " a2 " , " a3 " , " a1 " ] , " p r e f e r e n c e " : [ " b2 " , " b1 " ] , " r e g a r d l e s s " : [ " None " ] } , { " c o n d i t i o n " : [ " a6 " , " a5 " , " a8 " , " a7 " , " c 1 " , " c 2 " ] , " p r e f e r e n c e " : [ " b1 " , " b2 " ] , " r e g a r d l e s s " : [ " None " ] } ] } , "C" : { " domain " : [ " c 1 " , " c 2 " ] , " p r e f _ r e l a t i o n s " : [ { " c o n d i t i o n " : [ " b1 " ] , " p r e f e r e n c e " : [ " c 2 " , " c 1 " ] , " r e g a r d l e s s " : [ " None " ] } ] } } }

6.2

Proof of correctness

To have a more formal proof of the enriching method, correctness will be proven by stating two falsifiable constraints. Both constraints can be directly derived from the asymmetric merging approach (Section 5), as they represent essential desired properties of the output. The constraints are as follows. When enriching CP-net N1with N2;

(1) A strict preference order specified in CP-net N1 is never overwritten by a preference order

coming from N2. Therefore all strict preference orderings in N1exist in N11.

(27)

These constraints can be verified by going through all merging possibilities. The constraints are considered valid if there does not exist an example that can falsify the constraints.

There are two ways a preference relation can merge. The first one is by a complete merge, the second one is by a partial merge.

A complete merge copies an entire conditional preference relation from N2 to N11 if, and

only if, it does not conflict with the complete merging rule (Rule 5.3). This confirms that both constraints remains valid: since (1) a complete merge never overwrites or rearranges an existing preference. A complete merge adds an entire non-conflicting preference relation to a CPT. Therefore (2) a complete merge can only contain non-conflicting preference information.

A partial merge is always executed as soon as it does not pass the requirements for a complete merge. This means that a partial merge can only happen if the condition in pN2 already exists

in pN1

1. The partial merge creates a new preference relation pfi for every value fi in preference

relation pN2 that is not in the corresponding preference relation pN1

1 (Example 5.2). This means

that (1) the values that are partially merged with pN1

1 are never values that already exist in pN11.

This confirms that the first constraint remains valid for partial merging. The newly created pref-erence relation for each value is checked for conflicts with the corresponding prefpref-erence relation pN1

1. This means that (2) only if there is no conflict, the value coming from pN2 is added to pN11.

Since this holds for every unique value in pN2, any partial merge also can not falsify the second

constraint.

As an illustrative example, the two constraints will be checked here in the enriching test with CP-nets N3 and N4 to confirm that the run example is indeed valid (Listings 1 and 2). The

first constraint is confirmed by showing that every preference relation in CP-net N3 is present in

N31. The independent preference relation in CP T (BN3) is decomposed in four single condition

preference relations (with conditions a1. . . a4). Therefore CP-net N3 in total consists of five

single condition preference relations:

b1: a1 a2 a3 a4

a1: b2 b1

a2: b2 b1

a3: b2 b1

a4: b2 b1

The first of these five preference relations is present in CP T (AN1

3) through transitivity (Rule

4.7). The other four preference relations are all explicitly present in CP T (BN1

3). This proves

that the first constraint (1) holds in the coded enriching example.

The second constraint is confirmed by taking all those values in every preference relation in N4 for which holds that they do not exist in any preference ordering in N3. As seen in the

example, this concerns value a6 ∈ CP T (AN4). The preference relation that is created for this

value during the partial merge must conflict with CP T (AN3) for the constraint to be valid. The

recreated preference relation for a6 is as follows.

b1: {a2, a4}  a6 {a3} [∅]

This preference relation indeed conflicts with the preference relation in CP T (AN3), since it does

not hold that a4  a3. This shows that the coded example works for the second constraint (2)

Referenties

GERELATEERDE DOCUMENTEN

The results confirmed that second language learners generally did better regarding core syntactic constraints as the word order of the BA sentence then they were in

With strong data support from the Boulder BCycle bike-sharing system, this study, to our knowledge, for the first time provides a complete research- to-action framework,

This could be done in fulfilment of the mandate placed on it by constitutional provisions such as section 25 of the Constitution of Republic of South Africa,

• To identify, appraise and synthesise qualitative research evidence on healthcare workers’ perceptions and experiences regarding their use of mHealth technologies to provide

The analytical model was verified with finite ele- ment method (FEM) simulations using COMSOL 3 ; the FEM model agrees with the analytical calculations within 0.3 in

The desirable effect of the following parameters on neutralisation (acid and sulphate removal) as well as on sludge characteristics (sludge settling rate, sludge volume and

In dit infor- matieblad wordt aandacht geschonken aan de validatie van INITIATOR2, waarbij de modeluitgangen van INITIATOR2 zijn vergeleken met die van (i) referentiemodellen