Experiment Object#

class Experiment(experiment_id: str | None = None, instances: dict | None = None, distances: dict | None = None, coordinates: dict | None = None, distance_id: str | None = None, embedding_id: str | None = None, is_exported: bool = True, is_imported: bool = True, clean: bool = False, coordinates_names=None, fast_import: bool = False, with_matrix: bool = False, instance_type: str | None = None, dim: int = 2)[source]#

Abstract set of instances.

compute_coordinates_by_families(dim=2) None[source]#

Groups all points by their families

compute_distances(distance_id: str = 'l1-mutual_attraction', num_processes: int = 1, self_distances: bool = False) None[source]#

Compute distances between instances (using processes)

embed_2d(**kwargs) None[source]#

Embeds the instances in 2D.

embed_3d(**kwargs) None[source]#

Embeds the instances in 3D.

import_coordinates(coordinates, coordinates_names, dim=None)[source]#

Imports coordinates to the experiment.

import_distances(distances)[source]#

Imports distances to the experiment.

import_instances(instances)[source]#

Imports instances to the experiment.

print_correlation_between_distances(distance_id_1=None, distance_id_2=None, title=None, s=12, alpha=0.25, color='purple', title_size=24, label_size=20, ticks_size=10) None[source]#

Prints correlation between two distances.

Parameters:
  • distance_id_1 (str) – Name of the first distance.

  • distance_id_2 (str) – Name of the second distance.

  • title (str) – Title of the plot.

Return type:

None

print_map_1d(**kwargs) None[source]#

Prints the map of the instances in 1D.

print_map_2d(**kwargs) None[source]#

Prints the map of the instances in 2D.

print_map_2d_colored_by_feature(**kwargs) None[source]#

Prints the map of the instances in 2D colored by feature.

print_map_2d_colored_by_features(**kwargs) None[source]#

Prints the map of the instances in 2D colored by features.

print_map_3d(**kwargs) None[source]#

Prints the map of the instances in 3D.

reverse(axis=0) None[source]#

Reverses all the points

rotate(angle) None[source]#

Rotates all the points by a given angle

static rotate_point(cx, cy, angle, px, py) -> (<class 'float'>, <class 'float'>)[source]#

Rotate two-dimensional point by an angle

update() None[source]#

Save current coordinates of all the points to the original file