utils
deepdrivewe.ai.utils ¶
Utility functions for the AI module.
LatentSpaceHistory ¶
A class to store the latent space history.
Source code in deepdrivewe/ai/utils.py
__init__ ¶
Initialize the latent space history.
Source code in deepdrivewe/ai/utils.py
__bool__ ¶
update ¶
Update the latent space history.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
z
|
array - like
|
The latent space coordinates (n_frames, d) |
required |
pcoords
|
array - like
|
The progress coordinates (n_frames, 1) |
required |
Source code in deepdrivewe/ai/utils.py
plot ¶
plot(
output_path: Path,
color: ArrayLike | None = None,
cblabel: str = "Progress Coordinate",
title: str = "",
) -> None
Create a scatter plot.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
output_path
|
Path
|
Path to save the plot image. |
required |
color
|
array - like
|
Data used for coloring the points. Defaults to progress coordinates. |
None
|
cblabel
|
str
|
Label for the colorbar. |
'Progress Coordinate'
|
title
|
str
|
Title of the plot. |
''
|