Description Usage Arguments Details Value Examples
This function gives you an interface to all weight calculating functions in
this package. The different methods and functions are:
weight.differenceToIdeal
, weight.entropy
,
weight.differenceToIdeal
, weight.highAndStandard
,
weight.standard
. You also have the ability to enter your own
weights for each userid
. This can be done through a list with the
exacht same length as the number of users you input. If you want to use the
same weight vector for all users you can enter it as a numeric vector, ideally
with length(weight) == length(attr)
.
1 2 3 |
dataset |
data.frame with the user generated data from a product
configurator. See |
userid |
a vector of integers that gives the information of which users the matrix should be calculated. Vectorised. |
weight |
numeric vector. Represents the importance or relevance that an
attribute has and the weight it should have in the calculation of the
prospect value. Alternatively, you can enter a list of numeric vectors, each
element of the list corresponding to one user in |
attr |
attributes IDs, vector of integer numbers corresponding to the attributes you desire to use; attr are assumed to be 1-indexed. This function will calculate with all attributes and do the subsetting a posteriori. If you want to get the weights for only two attributes you will have to
first use |
rounds |
integer vector or text option. Which steps of the configuration
process should be taken into account? Defaults are "all" in order to have
more data to calculate with. If |
cost_ids |
argument used to convert selected cost attributes into benefit attributes. Integer vector. |
weightFUN |
indicated which weight function should be used to calculate
the weight vector, the options are |
gamma |
numeric and between 0 and 1. It is a parameter used for the function
|
The function is vectorised on userid
. If you decide to enter your own
weights, and not calculating them, note that the function accepts a weight
vector with negative values and not adding up to 1. It is up to the user to
check if that makes sense.
Lastly, this function is called from within overallPV
and as in
that function, the attr
parameter does not sort its input, so check
that if and when inputting your weights they correspond to the order you
entered the attributes.
Default value of FUN uses differenceToIdeal
to get the
weight
vector.
attr
This function does handles different amount of attributes.
cost_ids
Are passed along to the function you chosee, not directly
handled here.
If you want to know more about the other parameters, look at
decisionMatrix
.
Calculated weights according to the chosen weight function
1 2 3 4 5 6 | #Not Runnable yet
getAttrWeights(pc_data, 11)
getAttrWeights(myData, 11, weightFUN = "entropy")
getAttrWeights(my_data, userid = 10:10, attr=1:3, cost_ids = 3)
getAttrWeights(monitor_data, 50, rounds="all", weightFUN="highAndStandard", gamma=0.8)
getAttrWeights(myData, userid = 9, attr= 1:5, weight=c(0.20, 0.10, 0.05, 0.40, 0.25))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.