Update app.py
Browse files
app.py
CHANGED
@@ -94,14 +94,14 @@ def counting(wins: npt.NDArray[np.int64], ties: npt.NDArray[np.int64],
|
|
94 |
|
95 |
def eigen(wins: npt.NDArray[np.int64], ties: npt.NDArray[np.int64],
|
96 |
seed: int = 0, tolerance: float = 10e-6, limit: int = 100) -> npt.NDArray[np.float64]:
|
97 |
-
algorithm = partial(nx.algorithms.eigenvector_centrality_numpy, max_iter=limit, tol=tolerance)
|
98 |
|
99 |
return centrality(algorithm, wins, ties)
|
100 |
|
101 |
|
102 |
def pagerank(wins: npt.NDArray[np.int64], ties: npt.NDArray[np.int64],
|
103 |
seed: int = 0, tolerance: float = 10e-6, limit: int = 100) -> npt.NDArray[np.float64]:
|
104 |
-
algorithm = partial(nx.algorithms.pagerank, max_iter=limit, tol=tolerance)
|
105 |
|
106 |
return centrality(algorithm, wins, ties)
|
107 |
|
|
|
94 |
|
95 |
def eigen(wins: npt.NDArray[np.int64], ties: npt.NDArray[np.int64],
|
96 |
seed: int = 0, tolerance: float = 10e-6, limit: int = 100) -> npt.NDArray[np.float64]:
|
97 |
+
algorithm = partial(nx.algorithms.eigenvector_centrality_numpy, max_iter=limit, tol=tolerance, weight='weight')
|
98 |
|
99 |
return centrality(algorithm, wins, ties)
|
100 |
|
101 |
|
102 |
def pagerank(wins: npt.NDArray[np.int64], ties: npt.NDArray[np.int64],
|
103 |
seed: int = 0, tolerance: float = 10e-6, limit: int = 100) -> npt.NDArray[np.float64]:
|
104 |
+
algorithm = partial(nx.algorithms.pagerank, max_iter=limit, tol=tolerance, weight='weight')
|
105 |
|
106 |
return centrality(algorithm, wins, ties)
|
107 |
|