InfluenceDiffusion 0.0.4__tar.gz → 0.0.6__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- InfluenceDiffusion-0.0.6/InfluenceDiffusion/__init__.py +4 -0
- InfluenceDiffusion-0.0.6/InfluenceDiffusion/estimation_models/__init__.py +3 -0
- InfluenceDiffusion-0.0.6/InfluenceDiffusion/utils.py +16 -0
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion.egg-info/PKG-INFO +1 -1
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/PKG-INFO +1 -1
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/setup.py +1 -1
- InfluenceDiffusion-0.0.4/InfluenceDiffusion/__init__.py +0 -4
- InfluenceDiffusion-0.0.4/InfluenceDiffusion/estimation_models/__init__.py +0 -3
- InfluenceDiffusion-0.0.4/InfluenceDiffusion/utils.py +0 -29
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion/Graph.py +0 -0
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion/Trace.py +0 -0
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion/estimation_models/BaseWeightEstimator.py +0 -0
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion/estimation_models/EMEstimation.py +0 -0
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion/estimation_models/OptimEstimation.py +0 -0
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion/influence_models.py +0 -0
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion.egg-info/SOURCES.txt +0 -0
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion.egg-info/dependency_links.txt +0 -0
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion.egg-info/requires.txt +0 -0
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion.egg-info/top_level.txt +0 -0
- {InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/setup.cfg +0 -0
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import numpy as np
|
|
2
|
+
from typing import Iterable, Set
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
def multiple_union(set_list: Iterable[Set]):
|
|
6
|
+
final_set = set()
|
|
7
|
+
for cur_set in set_list:
|
|
8
|
+
final_set = final_set.union(cur_set)
|
|
9
|
+
return final_set
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
def invert_non_zeros(array):
|
|
13
|
+
out = np.array(array, dtype=float)
|
|
14
|
+
non_zero_mask = array != 0
|
|
15
|
+
out[non_zero_mask] = 1. / out[non_zero_mask]
|
|
16
|
+
return out
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import numpy as np
|
|
2
|
-
from typing import Iterable, Set, List
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
def multiple_union(set_list: Iterable[Set]):
|
|
6
|
-
final_set = set()
|
|
7
|
-
for cur_set in set_list:
|
|
8
|
-
final_set = final_set.union(cur_set)
|
|
9
|
-
return final_set
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
def invert_non_zeros(array):
|
|
13
|
-
out = np.array(array, dtype=float)
|
|
14
|
-
non_zero_mask = array != 0
|
|
15
|
-
out[non_zero_mask] = 1. / out[non_zero_mask]
|
|
16
|
-
return out
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
def random_vector_inside_simplex(dim, ub=1):
|
|
20
|
-
U = np.random.uniform(low=0, high=ub, size=dim)
|
|
21
|
-
U_sorted = np.sort(U)
|
|
22
|
-
U_sorted = np.concatenate(([0], U_sorted))
|
|
23
|
-
x = np.diff(U_sorted)
|
|
24
|
-
return x
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
def random_vector_on_simplex(dim, ub=1):
|
|
28
|
-
X = random_vector_inside_simplex(dim=dim, ub=1)
|
|
29
|
-
return X / np.sum(X) * ub
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion/influence_models.py
RENAMED
|
File without changes
|
{InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion.egg-info/requires.txt
RENAMED
|
File without changes
|
{InfluenceDiffusion-0.0.4 → InfluenceDiffusion-0.0.6}/InfluenceDiffusion.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|