Linear Algebra

evalica.eigen(xs, ys, winners, index=None, weights=None, win_weight=1.0, tie_weight=0.5, solver='pyo3', tolerance=1e-06, limit=100, **kwargs)[source]

Compute the eigenvalue-based scores.

Parameters:
  • xs (Collection[T_contra]) – The left-hand side elements.

  • ys (Collection[T_contra]) – The right-hand side elements.

  • winners (Collection[Winner]) – The winner elements.

  • index (Index | None) – The index.

  • weights (Collection[float] | None) – The example weights.

  • win_weight (float) – The win weight.

  • tie_weight (float) – The tie weight.

  • solver (Literal['naive', 'pyo3']) – The solver.

  • tolerance (float) – The convergence tolerance.

  • limit (int) – The maximum number of iterations.

  • **kwargs (Any) – The additional arguments.

Returns:

The eigenvalue result.

Return type:

EigenResult

class evalica.EigenResult(scores, index, win_weight, tie_weight, solver, tolerance, iterations, limit)[source]

The eigenvalue result.

Parameters:
scores

The element scores.

Type:

pandas.Series

index

The index.

Type:

pandas.Index

win_weight

The win weight.

Type:

float

tie_weight

The tie weight.

Type:

float

solver

The solver.

Type:

Literal[‘naive’, ‘pyo3’]

tolerance

The convergence tolerance.

Type:

float

iterations

The actual number of iterations.

Type:

int

limit

The maximum number of iterations.

Type:

int

evalica.pagerank(xs, ys, winners, index=None, damping=0.85, weights=None, win_weight=1.0, tie_weight=0.5, solver='pyo3', tolerance=1e-06, limit=100, **kwargs)[source]

Compute the PageRank scores.

Note

Brin, S., Page, L.: The anatomy of a large-scale hypertextual Web search engine. Computer Networks and ISDN Systems. 30, 107–117 (1998). <https://doi.org/10.1016/S0169-7552(98)00110-X>.

Parameters:
  • xs (Collection[T_contra]) – The left-hand side elements.

  • ys (Collection[T_contra]) – The right-hand side elements.

  • winners (Collection[Winner]) – The winner elements.

  • index (Index | None) – The index.

  • damping (float) – The damping (alpha) factor.

  • weights (Collection[float] | None) – The example weights.

  • win_weight (float) – The win weight.

  • tie_weight (float) – The tie weight.

  • solver (Literal['naive', 'pyo3']) – The solver.

  • tolerance (float) – The convergence tolerance.

  • limit (int) – The maximum number of iterations.

  • **kwargs (Any) – The additional arguments.

Returns:

The PageRank result.

Return type:

PageRankResult

class evalica.PageRankResult(scores, index, damping, win_weight, tie_weight, solver, tolerance, iterations, limit)[source]

The PageRank result.

Parameters:
scores

The element scores.

Type:

pandas.Series

index

The index.

Type:

pandas.Index

damping

The damping (alpha) factor.

Type:

float

win_weight

The win weight.

Type:

float

tie_weight

The tie weight.

Type:

float

solver

The solver.

Type:

Literal[‘naive’, ‘pyo3’]

tolerance

The convergence tolerance.

Type:

float

iterations

The actual number of iterations.

Type:

int

limit

The maximum number of iterations.

Type:

int