signals
signals
¶
Signal generation modules for player scoring.
FixtureSignal
¶
Bases: BaseSignal
Generate signals based on fixture difficulty and schedule.
Initialize with team difficulty ratings.
| PARAMETER | DESCRIPTION |
|---|---|
difficulty_ratings
|
Team strength ratings (1-5, higher = harder opponent)
TYPE:
|
Source code in fplx/signals/fixtures.py
generate_signal
¶
Generate fixture-based signal.
Source code in fplx/signals/fixtures.py
set_difficulty_ratings
¶
Set or update difficulty ratings.
| PARAMETER | DESCRIPTION |
|---|---|
ratings
|
Team strength ratings
TYPE:
|
compute_fixture_difficulty
¶
compute_fixture_difficulty(
team: str,
upcoming_opponents: list[str],
is_home: list[bool],
) -> float
Compute fixture difficulty score for upcoming games.
| PARAMETER | DESCRIPTION |
|---|---|
team
|
Player's team
TYPE:
|
upcoming_opponents
|
List of upcoming opponent teams
TYPE:
|
is_home
|
Whether each fixture is home
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Difficulty score (lower = easier fixtures) |
Source code in fplx/signals/fixtures.py
compute_fixture_advantage
¶
compute_fixture_advantage(
team: str,
upcoming_opponents: list[str],
is_home: list[bool],
) -> float
Compute fixture advantage (inverse of difficulty).
Higher score = easier fixtures = better for player.
| PARAMETER | DESCRIPTION |
|---|---|
team
|
Player's team
TYPE:
|
upcoming_opponents
|
List of upcoming opponent teams
TYPE:
|
is_home
|
Whether each fixture is home
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Advantage score (0-1, higher = better fixtures) |
Source code in fplx/signals/fixtures.py
compute_fixture_congestion
¶
Compute fixture congestion (number of games in short period).
| PARAMETER | DESCRIPTION |
|---|---|
fixtures
|
Fixtures dataframe
TYPE:
|
team
|
Team name
TYPE:
|
days_window
|
Days to look ahead
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Congestion score (0-1, higher = more congested) |
Source code in fplx/signals/fixtures.py
batch_compute_advantages
¶
batch_compute_advantages(
players_teams: dict[str, str],
fixtures_data: dict[str, tuple],
) -> dict[str, float]
Compute fixture advantages for multiple players.
| PARAMETER | DESCRIPTION |
|---|---|
players_teams
|
Mapping of player ID to team
TYPE:
|
fixtures_data
|
Mapping of team to (opponents, is_home) tuples
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict[str, float]
|
Dictionary of player fixture advantage scores |
Source code in fplx/signals/fixtures.py
NewsParser
¶
Parse and interpret FPL news text into structured signals.
parse_availability
¶
Parse availability from news text.
| PARAMETER | DESCRIPTION |
|---|---|
news_text
|
News text
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Availability score (0-1) |
Source code in fplx/signals/news.py
parse_minutes_risk
¶
Parse minutes risk from news text.
| PARAMETER | DESCRIPTION |
|---|---|
news_text
|
News text
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Minutes risk score (0-1, higher = more risk) |
Source code in fplx/signals/news.py
parse_confidence
¶
Estimate confidence in the parsed signal.
| PARAMETER | DESCRIPTION |
|---|---|
news_text
|
News text
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Confidence score (0-1) |
Source code in fplx/signals/news.py
NewsSignal
¶
Bases: BaseSignal
Generate structured news signals for players.
generate_signal
¶
Generate signal from news text.
| PARAMETER | DESCRIPTION |
|---|---|
news_text
|
News text
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict[str, float]
|
Dictionary with availability, minutes_risk, confidence |
Source code in fplx/signals/news.py
batch_generate
¶
Generate signals for multiple players.
| PARAMETER | DESCRIPTION |
|---|---|
news_dict
|
Dictionary mapping player ID to news text
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict[str, dict[str, float]]
|
Dictionary of player signals |
Source code in fplx/signals/news.py
StatsSignal
¶
Generate performance signals from statistical data.
Combines multiple statistical indicators into a unified score.
Initialize with custom weights for different stats.
| PARAMETER | DESCRIPTION |
|---|---|
weights
|
Weights for different statistics
TYPE:
|
Source code in fplx/signals/stats.py
compute_signal
¶
Compute aggregated signal score from player statistics.
| PARAMETER | DESCRIPTION |
|---|---|
player_data
|
Player historical data with engineered features
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Aggregated signal score (0-100) |
Source code in fplx/signals/stats.py
batch_compute
¶
Compute signals for multiple players.
| PARAMETER | DESCRIPTION |
|---|---|
players_data
|
Dictionary mapping player ID/name to their data
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
dict[str, float]
|
Dictionary of player signals |