dispel.providers.generic.tasks.draw.touch module#
Drawing test related functionality.
This module contains functionality to wrap all touches from a Drawing test (DRAW) into a class DrawShape.
- class dispel.providers.generic.tasks.draw.touch.DrawShape[source]#
Bases:
object
To encapsulate the user’s interaction during a specific attempt.
The user’s data are segmented into DrawTouch.
- check_dist_thresh(validator)[source]#
Check if distance ratio lies within a RangeValidator threshold.
- Parameters:
validator (RangeValidator) –
- Return type:
- property corners_max_dist: Tuple[float, float, float]#
Get the 3 maximum distances from corner zones.
- property distance_ratio: float#
Compute distance ratio between user and expected trajectories.
The distance ratio is defined as the quotient of the valid up sampled user path length divided by the expected path length.
- Returns:
The distance ratio between the valid up sampled user path length and the expected path length.
- Return type:
- property get_up_sampled_valid_attributions: Tuple[float, DataFrame]#
Get DTW attributions on up sampled and valid user trajectory.
- property get_up_sampled_valid_no_overshoot_attributions: Tuple[float, DataFrame]#
Get DTW attributions on up sampled and valid user trajectory.
The DTW attribution is computed between the user trajectory without both early starting points and final overshoot, and second, the reference trajectory without an irrelevant head. As a reminder, an irrelevant head is composed of points anterior to the closest point of the user head without early starting points.
- Returns:
A tuple containing the coupling measure and the pandas data frame where lie the user/reference attributions.
- Return type:
Tuple[float, pandas.DataFrame]
- property get_valid_attributions: Tuple[float, DataFrame]#
Get DTW attributions on raw and valid user trajectory.
- property intersection_data: Tuple[DataFrame, DataFrame]#
Get formatted data for intersection detection.
- property reference_without_head: DataFrame#
Get the reference trajectory without the head.
The new reference has the closest point of the first user point without early starting points as its head.
- Returns:
The new reference trajectory fitting perfectly with the user trajectory without early starting points and final overshoot.
- Return type:
- property up_sampled_valid_coupling_measure: float#
Get the coupling measure from up sampled and valid attributions.
- Returns:
The coupling measure specific to the valid, up sampled user trajectory without overshoot.
- Return type:
- property up_sampled_valid_data: DataFrame#
Get DTW attributions on up sampled and valid user trajectory.
- property up_sampled_valid_matches: DataFrame#
Get the minimum matches from up sampled and valid attributions.
- Returns:
The The different point attributed to a valid up sampled user specific to the valid, up sampled user trajectory without overshoot.
- Return type:
- property up_sampled_valid_no_overshoot_coupling_measure: float#
Get the coupling measure from up sampled and valid attributions.
Specific for data without overshoot.
- Returns:
The coupling measure specific to the valid, up sampled user trajectory without overshoot.
- Return type: