CentralizedGNNMiner
, DifferenceMiner
, GNNMiner
, MemoryMiner
, PPRMiner
, ProbabilityMiner
, RandomMiner
, RepeatAndReplyMiner
, SocialGraphMinerCombination
, TFMiner
public abstract class SocialGraphMiner
extends java.lang.Object
Modifier and Type | Class | Description |
---|---|---|
static class |
SocialGraphMiner.InteractionType |
|
static class |
SocialGraphMiner.SocialGraphMinerParameters |
Modifier and Type | Method | Description |
---|---|---|
eu.h2020.helios_social.core.contextualegonetwork.ContextualEgoNetwork |
getContextualEgoNetwork() |
|
SocialGraphMiner.SocialGraphMinerParameters |
getModelParameterObject(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction) |
Retrieves the parameters of the mining model that will be sent alongside the created interaction.
|
java.lang.String |
getModelParameters(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction) |
Retrieves the parameters of the mining model that will be sent alongside the created interaction.
|
void |
newInteraction(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction,
java.lang.String neighborModelParameters,
SocialGraphMiner.InteractionType interactionType) |
Makes the graph miner aware that a user received an interaction from another user with
getModelParameters(eu.h2020.helios_social.core.contextualegonetwork.Interaction) . |
abstract void |
newInteractionParameters(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction,
SocialGraphMiner.SocialGraphMinerParameters neighborModelParameters,
SocialGraphMiner.InteractionType interactionType) |
|
abstract 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.
|
java.util.HashMap<eu.h2020.helios_social.core.contextualegonetwork.Node,java.lang.Double> |
recommendInteractions(eu.h2020.helios_social.core.contextualegonetwork.Context context) |
Calls
predictNewInteraction(Context, Node) to score the likelihood of interacting with all nodes
of the given context. |
SocialGraphMiner |
setSendPermision(boolean sendPermision) |
Sets whether the miner is permitted to send parameters when asked to, thus helping write seamless code, especially
when multiple miner parameters are simultaneously send by
SocialGraphMinerCombination instances. |
public eu.h2020.helios_social.core.contextualegonetwork.ContextualEgoNetwork getContextualEgoNetwork()
public abstract void newInteractionParameters(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction, SocialGraphMiner.SocialGraphMinerParameters neighborModelParameters, SocialGraphMiner.InteractionType interactionType)
public final void newInteraction(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction, java.lang.String neighborModelParameters, SocialGraphMiner.InteractionType interactionType)
getModelParameters(eu.h2020.helios_social.core.contextualegonetwork.Interaction)
.interaction
- A new interaction the user initiates expressed in terms of the contextual ego networkneighborModelParameters
- The neighbor parameters. May be null for when interactionType==SEND.interactionType
- The type of the interaction (SEND, RECEIVE or RECEIVE_REPLY corresponds to acknowledging the receive).public SocialGraphMiner setSendPermision(boolean sendPermision)
SocialGraphMinerCombination
instances.
Setting send permissions to true
makes miners work as intended, but setting them to false
would force them to not send parameters
that would improve recommendations for others.sendPermision
- Whether to allow the miner to send parameters.this
minerpublic final SocialGraphMiner.SocialGraphMinerParameters getModelParameterObject(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction)
getModelParameters(Interaction)
to guarantee correct serialization, though
the two methods can used interchangeably.
This functionality can be reduced to sending a null
by setSendPermision(boolean)
interaction
- The new interaction the user receives expressed in terms of the contextual ego networkSocialGraphMiner.SocialGraphMinerParameters
object of miner parameters.public final java.lang.String getModelParameters(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction)
getModelParameterObject(Interaction)
to a string representation. The two methods can used interchangeably.
This functionality can be reduced to sending a serialized null
by setSendPermision(boolean)
interaction
- The new interaction the user receives expressed in terms of the contextual ego networkpublic abstract double predictNewInteraction(eu.h2020.helios_social.core.contextualegonetwork.Context context, eu.h2020.helios_social.core.contextualegonetwork.Node destinationNode)
context
- The context in which to perform the prediction.destinationNode
- The destination node of the interaction.public java.util.HashMap<eu.h2020.helios_social.core.contextualegonetwork.Node,java.lang.Double> recommendInteractions(eu.h2020.helios_social.core.contextualegonetwork.Context context)
predictNewInteraction(Context, Node)
to score the likelihood of interacting with all nodes
of the given context.context
- The context for which to recommend interactions.