MaxInfluence#
- class ioh.iohcpp.problem.MaxInfluence#
Bases:
GraphProblem
Max-Influence problems
The maximum influence problem in social networks is an important submodular optimization problem that has been widely studied in the literature from various perspectives. Let a directed graph G(V, E) represent a social network, where each node is a user and each edge (u, v) ∈ E has a probability pu,v representing the strength of influence from user u to v.
A fundamental propagation model is independence cascade. Starting from a seed set X, it uses a set At to record the nodes activated at time t, and at time t + 1, each inactive neighbor v of u ∈ At becomes active with probability pu,v. This process is repeated until no nodes get activated at some time. The set of nodes activated by propagating from X is denoted as IC(X), which is a random variable.
The goal is to maximize the expected value of IC(X). Note that the computation of the expected value is done by running a simulation of the influence process several times and averaging its results. In this sense, the computation of the objective function value is stochastic.
For a given search point x ∈ {0, 1}^n where n = |V|, we have V’(x) = {vi | xi = 1} and c(x) = SUM_{v∈V 0(x)} c(v).
Reference#
[Neumann23] Neumann, Frank, Aneta Neumann, Chao Qian, Viet Anh Do, Jacob de Nobel, Diederick Vermetten, Saba Sadeghi Ahouei, Furong Ye, Hao Wang, and Thomas Bäck. “Benchmarking Algorithms for Submodular Optimization Problems Using IOHProfiler.” arXiv preprint arXiv:2302.01464 (2023).
Attributes Summary
The bounds of the problem.
The constraints of the problem.
The data is that being sent to the logger.
The static meta-data of the problem containing, e.g., problem id, instance id, and problem's dimensionality
The optimum and its objective value for a problem instance
The current state of the optimization process containing, e.g., the current solution and the number of function evaluated consumed so far
Methods Summary
Evaluate the problem.
add a constraint
Attach a logger to the problem to allow performance tracking.
create
(*args, **kwargs)Overloaded function.
Remove the specified logger from the problem.
Enforced the bounds (box-constraints) as constraint :param weight: :type weight: The weight for computing the penalty (can be infinity to have strict box-constraints) :param how: :type how: The enforcement strategy, should be one of the 'ioh.ConstraintEnforcement' options :param exponent: :type exponent: The exponent for scaling the contraint
load_instances
([path])remove a constraint
Reset all state variables of the problem.
update the problem id
update the problem instance
update the problem name
Attributes Documentation
- bounds#
The bounds of the problem.
- constraints#
The constraints of the problem.
- log_info#
The data is that being sent to the logger.
- meta_data#
The static meta-data of the problem containing, e.g., problem id, instance id, and problem’s dimensionality
- optimum#
The optimum and its objective value for a problem instance
- problems#
- state#
The current state of the optimization process containing, e.g., the current solution and the number of function evaluated consumed so far
Methods Documentation
- __call__()#
Evaluate the problem.
- Parameters:
x (list) – the search point to evaluate. It must be a 1-dimensional array/list whose length matches search space’s dimensionality
- Returns:
The evaluated search point
- Return type:
float
Evaluate the problem.
- Parameters:
x (list[list]) – the search points to evaluate. It must be a 2-dimensional array/list whose length matches search space’s dimensionality
- Returns:
The evaluated search points
- Return type:
list[float]
- add_constraint()#
add a constraint
- attach_logger()#
Attach a logger to the problem to allow performance tracking.
- Parameters:
logger (Logger) – A logger-object from the IOHexperimenter logger module.
- static create(*args, **kwargs)#
Overloaded function.
create(problem_name: str, instance_id: int, dimension: int) -> ioh.iohcpp.problem.GraphProblem
Create a problem instance
- problem_name: str
a string indicating the problem name.
- instance_id: int
an integer identifier of the problem instance
- dimension: int
the dimensionality of the search space
create(problem_id: int, instance_id: int, dimension: int) -> ioh.iohcpp.problem.GraphProblem
Create a problem instance
- problem_name: int
a string indicating the problem name.
- instance_id: int
an integer identifier of the problem instance
- dimension: int
the dimensionality of the search space
- detach_logger()#
Remove the specified logger from the problem.
- enforce_bounds()#
Enforced the bounds (box-constraints) as constraint :param weight: :type weight: The weight for computing the penalty (can be infinity to have strict box-constraints) :param how: :type how: The enforcement strategy, should be one of the ‘ioh.ConstraintEnforcement’ options :param exponent: :type exponent: The exponent for scaling the contraint
- static load_instances(path: ioh.iohcpp.logger.Path | None = None) None #
- remove_constraint()#
remove a constraint
- reset()#
Reset all state variables of the problem.
- set_id()#
update the problem id
- set_instance()#
update the problem instance
- set_name()#
update the problem name