Description Usage Arguments Details Value Examples
This function calculates two separate weight vectors and merges them together
with a weighted parameter gamma
.
1 2 |
dataset |
a |
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 |
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
|
gamma |
numeric and between 0 and 1. It is a parameter used for the function
|
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
a list of weight vectors (one per user)
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.