Skip to content

Questions basedEvaluation

SaraPettinari edited this page Jun 16, 2026 · 2 revisions

Questions-based Evaluation

This page reports the evaluation results of the aggregation queries for answering 4 different soccer analysis questions executed with ocean-lib. The evaluation considers only the events belonging to the Soccer match with identifier 2575959.

Analytical question Aggregation level Rationale
Which types of events characterize the match? Activity Identifies the dominant event types in the match, e.g., passes, duels, shots, and goals.
How are events distributed on the field, and how does this distribution differ between teams and roles? Activity, Position ID, Team ID, Player role Supports spatial analysis of actions, distinguishing how roles and teams occupy and act in different areas of the field.
How do the two teams differ in their tactical profiles and distribution of actions across roles? Activity, Team ID, Player role Reveals team-specific tactical patterns and role-based interactions, e.g., whether actions concentrate around defenders, midfielders, or forwards.
What is the team's passing network, and which players are central in the game? Team ID, Player ID Supports reconstruction of player interaction networks and identification of central players or strong links within a team.

Which types of events characterize the match?

To answer this question we need to perform the classical aggregation by event activity. In ocean-lib we also have to specify that entities will be aggregated by their type.

aggr_classical = [
    AggrStep(
        aggr_type="ENTITIES",
        ent_type="playerId",
        group_by=["type"],
        where=None,
        attr_aggrs=[]
    ),
    AggrStep(
        aggr_type="ENTITIES",
        ent_type="teamId",
        group_by=["type"],
        where=None,
        attr_aggrs=[]
    ),
    AggrStep(
        aggr_type="EVENTS",
        ent_type=None,
        where=None,
        group_by=["activity"],
        attr_aggrs=[]
    )
]

AggrSpecification(aggr_classical)

Classical Aggregated EKG

💡 Insights

The match is mainly characterized by Pass events, which are by far the most frequent activity (778).

The second most frequent activity is Duel (466), highlighting the importance of contested situations during the match.

See the RunningExample page for more insights.

How are events distributed on the field, and how does this distribution differ between teams and roles?

aggr_space = [
    AggrStep(
        aggr_type="ENTITIES", 
        ent_type="playerId", 
        group_by=["role"], 
        where=None, 
        attr_aggrs=[]),
    AggrStep(
        aggr_type="ENTITIES", 
        ent_type="pos_orig", 
        group_by=["wyId"], 
        where=None, 
        attr_aggrs=[]),
    AggrStep(
        aggr_type="ENTITIES", 
        ent_type="teamId", 
        group_by=["wyId"],
        where=None, 
        attr_aggrs=[]),
    AggrStep(
        aggr_type="EVENTS", 
        ent_type=None, 
        group_by=[log.event_activity, "matchId"], 
        where=None,
        attr_aggrs=[AttrAggr(name=log.event_timestamp, function=AggregationFunction.MINMAX)])
]

Aggregated EKG

  • Only position-perspective DF are shown.
  • We applied different colors to different roles (FWD green, DEF orange, MID blue)

Close-up on MID-RIGHT

Aggregated EKG

  • We kept only actions happened in the midfield-right
  • We filtered out DFs with a frequency lower than 3

💡 Insights

In team 3172, the retained patterns are mainly dominated by passing activities, especially involving defenders and midfielders. This suggests a recurrent pass-based use of the MID-RIGHT area.

In team 3158, the graph shows a more heterogeneous distribution of actions and roles. Passing activities are still frequent, but recurrent duels are also visible across defenders, midfielders, and forwards.

How do the two teams differ in their tactical profiles and distribution of actions across roles?

aggr_tactic = [
    AggrStep(
        aggr_type="ENTITIES", 
        ent_type= "playerId", 
        group_by=["role"], 
        where=None, 
        attr_aggrs=[]),
    AggrStep(
        aggr_type="ENTITIES", 
        ent_type= "teamId", 
        group_by=["wyId"], 
        where=None, 
        attr_aggrs=[]),
    AggrStep(
        aggr_type="EVENTS", 
        ent_type= None, 
        where=None, 
        group_by=[log.event_activity],
        attr_aggrs=[AttrAggr(name=log.event_timestamp, function=AggregationFunction.MINMAX), AttrAggr(name="pos_orig", function=AggregationFunction.MULTISET)])]

Aggregated EKG (team 3172 on the left and team 3158 on the right)

💡 Insights

Team 3172 shows a dense structure centered on Pass activities involving defenders, midfielders, and forwards. In particular, passes by defenders and midfielders are strongly connected, suggesting a recurrent circulation pattern across defensive and midfield roles. Duels are also present, but they appear less central than passing activities.

Team 3158 shows frequent passing patterns, especially involving midfielders and forwards. However, the graph displays a more visible interaction between Pass and Duel activities across roles, suggesting a more contested or transition-oriented profile.

See the RunningExample page for more insights.

What is the team's passing network, and which players are central in the game?

aggr_player = [
    AggrStep(
        aggr_type="ENTITIES",
        ent_type="playerId",
        group_by=["wyId"],
        where=None, 
        attr_aggrs=[]),
    AggrStep(
        aggr_type="ENTITIES", 
        ent_type="teamId", 
        group_by=["wyId"], 
        where=None, 
        attr_aggrs=[]),
    AggrStep(
        aggr_type="EVENTS", 
        ent_type=None, 
        group_by=[log.event_activity], 
        where=None,
        attr_aggrs=[AttrAggr(name=log.event_timestamp, function=AggregationFunction.MINMAX), AttrAggr(name="matchId", function=AggregationFunction.MULTISET)])
]

Aggregated EKG

  • We kept only the "Pass" activity
  • We filtered out Pass nodes with a frequency lower than 25
  • We kept only the team DF perspective

💡 Insights

In team 3172, players 20841 and 49991 are the most active in passing activities. However, the overall passing distribution appears relatively balanced across players.

In team 3158, players 8306 is the most active in passing activities. This is also reflected in the graph structure, where several players show recurrent passing sequences involving this player.

Clone this wiki locally