public class PPRMiner extends SocialGraphMiner
getSmoothedPersonalization(Context)
. The miner predicts new interactions based on the cosine
similarity of smoothed attributes.SocialGraphMiner.InteractionType, SocialGraphMiner.SocialGraphMinerParameters
Constructor | Description |
---|---|
PPRMiner(java.lang.String name,
eu.h2020.helios_social.core.contextualegonetwork.ContextualEgoNetwork contextualEgoNetwork,
mklab.JGNN.core.Tensor personalization) |
Modifier and Type | Method | Description |
---|---|---|
SocialGraphMiner.SocialGraphMinerParameters |
constructModelParameterObject(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction) |
|
java.lang.String |
getName() |
|
mklab.JGNN.core.Tensor |
getNormalizedSmoothedPersonalization(eu.h2020.helios_social.core.contextualegonetwork.Context context) |
Retrieves the outcome of
getSmoothedPersonalization(Context) and postprocesses it so that its minimum value is zero
and its elements sum to 1. |
mklab.JGNN.core.Tensor |
getPersonalization(eu.h2020.helios_social.core.contextualegonetwork.Context context) |
Retrieves the ego node's personalization set for the specific context.
|
double |
getRestartProbability() |
Retrieves the restart probability of the equivalent random walk with restart scheme associated
with personalized PageRank.
|
mklab.JGNN.core.Tensor |
getSmoothedPersonalization(eu.h2020.helios_social.core.contextualegonetwork.Context context) |
Retrieves the outcome of smoothing the outcome of the ego's personalization through the social graph.
|
void |
newInteractionParameters(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction,
SocialGraphMiner.SocialGraphMinerParameters neighborModelParameters,
SocialGraphMiner.InteractionType interactionType) |
|
double |
predictNewInteraction(eu.h2020.helios_social.core.contextualegonetwork.Context context,
eu.h2020.helios_social.core.contextualegonetwork.Node destinationNode) |
Predicts the weight of performing a SEND interaction between the given context's ego and a destination node
within a given context.
|
PPRMiner |
setPersonalizationAsGroundTruth(boolean personalizationAsGroundTruth) |
Sets whether personalization should be considered as ground truth.
|
PPRMiner |
setRestartProbability(double restartProbability) |
Sets the restart probability of the personalized PageRank scheme.
|
PPRMiner |
updatePersonalization(eu.h2020.helios_social.core.contextualegonetwork.Context context,
mklab.JGNN.core.Tensor personalization) |
Copies the elements of a given vector to the ego's personalization vector in the provided context.
|
PPRMiner |
updatePersonalization(mklab.JGNN.core.Tensor personalization) |
Wraps the method
updatePersonalization(Context, Tensor) to update all
contexts with the given personalization. |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContextualEgoNetwork, getModelParameterObject, getModelParameters, newInteraction, recommendInteractions, setSendPermision
public PPRMiner(java.lang.String name, eu.h2020.helios_social.core.contextualegonetwork.ContextualEgoNetwork contextualEgoNetwork, mklab.JGNN.core.Tensor personalization)
public java.lang.String getName()
public double getRestartProbability()
setRestartProbability(double)
public PPRMiner setPersonalizationAsGroundTruth(boolean personalizationAsGroundTruth)
getSmoothedPersonalization(Context)
is forcefully snapped to the personalization vector. Making this
depend on the norm helps deployment of models.personalizationAsGroundTruth
- A boolean value on whether personalization should be considered ground truth.this
miner's instance.public PPRMiner setRestartProbability(double restartProbability)
restartProbability
- The restart probability in the range (0,1) (default is 0.1).this
miner's instance.public PPRMiner updatePersonalization(eu.h2020.helios_social.core.contextualegonetwork.Context context, mklab.JGNN.core.Tensor personalization)
context
- The context in which to set the new personalization vector.personalization
- The tensor to set as new personalization vector.this
miner's instance.updatePersonalization(Tensor)
public PPRMiner updatePersonalization(mklab.JGNN.core.Tensor personalization)
updatePersonalization(Context, Tensor)
to update all
contexts with the given personalization. The given personalization is also automatically
initialized for future context generations.personalization
- The tensor to set as new personalization vector in all contexts.this
miner's instance.public mklab.JGNN.core.Tensor getPersonalization(eu.h2020.helios_social.core.contextualegonetwork.Context context)
updatePersonalization(Context, Tensor)
.
However it does not affect the default personalization.
Future calls to updatePersonalization(Tensor)
overwrite setting custom context personalizations.
This means that the PPRMiner's constructor also sets all context personalization to the same values.context
- The context from which to obtain the personalization.getSmoothedPersonalization(Context)
public mklab.JGNN.core.Tensor getSmoothedPersonalization(eu.h2020.helios_social.core.contextualegonetwork.Context context)
context
- The context from which to obtain the smoothed personalization.getPersonalization(Context)
,
getNormalizedSmoothedPersonalization(Context)
public mklab.JGNN.core.Tensor getNormalizedSmoothedPersonalization(eu.h2020.helios_social.core.contextualegonetwork.Context context)
getSmoothedPersonalization(Context)
and postprocesses it so that its minimum value is zero
and its elements sum to 1.context
- The context from which to obtain the smoothed personalization.getSmoothedPersonalization(Context)
public void newInteractionParameters(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction, SocialGraphMiner.SocialGraphMinerParameters neighborModelParameters, SocialGraphMiner.InteractionType interactionType)
newInteractionParameters
in class SocialGraphMiner
public SocialGraphMiner.SocialGraphMinerParameters constructModelParameterObject(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction)
public double predictNewInteraction(eu.h2020.helios_social.core.contextualegonetwork.Context context, eu.h2020.helios_social.core.contextualegonetwork.Node destinationNode)
SocialGraphMiner
predictNewInteraction
in class SocialGraphMiner
context
- The context in which to perform the prediction.destinationNode
- The destination node of the interaction.