SwitchableMiner
, WeightedMiner
public abstract class SocialGraphMinerCombination extends SocialGraphMiner
SocialGraphMiner
instances to combine
their functionality. After initializing it, add miners using its
createMiner(String, Class)
method.SocialGraphMiner.InteractionType, SocialGraphMiner.SocialGraphMinerParameters
Constructor | Description |
---|---|
SocialGraphMinerCombination(eu.h2020.helios_social.core.contextualegonetwork.ContextualEgoNetwork contextualEgoNetwork) |
Modifier and Type | Method | Description |
---|---|---|
SocialGraphMiner.SocialGraphMinerParameters |
constructModelParameterObject(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction) |
|
<SocialGraphMinerClass extends SocialGraphMiner> |
createMiner(java.lang.String minerName,
java.lang.Class<SocialGraphMinerClass> minerClass) |
Creates a miner of the given name for the given
SocialGraphMiner class by calling its constructor that takes
a social ego network as parameter. |
java.util.Set<java.lang.String> |
getCreatedMinerNames() |
Retrieves the names of all miners created through
createMiner(String, Class) calls. |
SocialGraphMiner |
getMiner(java.lang.String minerName) |
Retrieves a miner previously created with
createMiner(String, Class) by its given name. |
void |
newInteractionParameters(eu.h2020.helios_social.core.contextualegonetwork.Interaction interaction,
SocialGraphMiner.SocialGraphMinerParameters neighborModelParameters,
SocialGraphMiner.InteractionType interactionType) |
|
void |
registerMiner(java.lang.String minerName,
SocialGraphMiner miner) |
Registers a miner instance with the given name (see
createMiner(String, Class) for details on
registered miners). |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getContextualEgoNetwork, getModelParameterObject, getModelParameters, newInteraction, predictNewInteraction, recommendInteractions, setSendPermision
public SocialGraphMinerCombination(eu.h2020.helios_social.core.contextualegonetwork.ContextualEgoNetwork contextualEgoNetwork)
public <SocialGraphMinerClass extends SocialGraphMiner> SocialGraphMinerClass createMiner(java.lang.String minerName, java.lang.Class<SocialGraphMinerClass> minerClass)
SocialGraphMiner
class by calling its constructor that takes
a social ego network as parameter. The created miner is stored in this object and is notified for new interactions
alongside all other SocialGraphMiner.newInteraction(Interaction, String, InteractionType)
miners, regardless of whether it
is set as the currently active miner by this class's respective method or not. Parameters of created miners are
aggregated in this class through its SocialGraphMiner.getModelParameters(Interaction)
implementation and are de-aggregated at
the receiving end of interactions.
To manually instantiate a miner, use registerMiner(String, SocialGraphMiner)
instead.SocialGraphMinerClass
- The implicitly understood class of the created miner.minerName
- The name to be assigned at the miner.minerClass
- The class of the created miner (should have a constructor with exactly one SocialEgoNetwork argument).getMiner(String)
public void registerMiner(java.lang.String minerName, SocialGraphMiner miner)
createMiner(String, Class)
for details on
registered miners). The provided miner instance should have the same same SocialGraphMiner.getContextualEgoNetwork()
instance as the SwitchableMiner.minerName
- The name to be assigned at the miner.miner
- The implicitly understood class of the created miner.getMiner(String)
public java.util.Set<java.lang.String> getCreatedMinerNames()
createMiner(String, Class)
calls.public SocialGraphMiner getMiner(java.lang.String minerName)
createMiner(String, Class)
by its given name.minerName
- The name of the created miner.getCreatedMinerNames()
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)