weight.highAndStandard: Calculates weights using two weighted sub-functions

Description Usage Arguments Details Value Examples

Description

This function calculates two separate weight vectors and merges them together with a weighted parameter gamma.

Usage

1
2
weight.highAndStandard(dataset, userid = NULL, attr = NULL,
  rounds = "all", cost_ids = NULL, gamma = 0.5)

Arguments

dataset

a data.frame with the user generated data from a product configurator. See Details of decisionMatrix for more information about which data should included in this argument.

userid

an integer vector indicating for which user the output of this function should be calculated. This functions is vectorised in this argument, i.e. you may enter more userIDs simultaneously.

attr

attribute IDs, vector of integer numbers corresponding to the attributes (columns) you desire to use.

rounds

integer vector, text option or a list of integer vectors. Which steps of the configuration process should be shown? Defaults are first and last step. Text options are all, first, last. Alternatively, a vector of arbitrarily chosen rounds can be entered as well.

cost_ids

argument used to convert selected cost attributes into benefit attributes. Integer vector. Cost type attributes have the characteristic, that a lower value means the user is better off than with a higher value. E.g. price is often considered a cost type attribute. Should be equal to attr input or a subset of it.

gamma

numeric and between 0 and 1. It is a parameter used for the function weight.highAndStandard and highAndStandard, please the former to know its use.

Details

The first weight function weight.highestValue rewards those attributes which have values (consistenly) closer to the highest possible value. The second function weight.standard uses the standard deviation to assign weights. The more the values differ from one another within an attribute, the better the assigned weight will be.

The gamma parameter measures the importance you want to give to the first function. It acts also as a weight since the final weight vector is given by result = gamma * weight.highestValue + (1-gamma) * weight.standard

Value

a list of weight vectors (one per user)

Examples

1
2
3
4
5
#Not runnable yet
weight.highAndStandard(myData, userid=10)
weight.highAndStandard(someData, 11, rounds="all")
weight.highAndStandard(laptop_data, 15, cost_ids=4, gamma = 0.3)
weight.highAndStandard(myData, 15, attr=1:4, "all", cost_ids=4, gamma = 0.75)

avilesd/productConfig documentation built on May 11, 2019, 4:08 p.m.