= create_orbits_dataframe(5, 400, .25, noise_level=.025, label_by_distance=True, n_classes=5)
df df.head()
x | y | |
---|---|---|
label | ||
4 | 0.986363 | 0.024106 |
4 | 0.995865 | -0.015601 |
4 | 1.022529 | -0.001975 |
4 | 1.002284 | 0.012532 |
4 | 0.978433 | 0.003777 |
create_orbits_dataframe (n_orbits:int=5, n_points:int=400, width:numbers.Number=0.2, noise_level:float=0.0, label_by_distance:bool=True, n_classes:Optional[int]=5, label_key:str='label', use_index:bool=True)
create_orbits_dataset (n_orbits:int, n_points:int, width:numbers.Number=0.2, noise_level:float=0.0, label_by_distance:bool=True, n_classes:Optional[int]=5)
Generates a dataset of orbits.
categorize_distances (distances:NDArray[Shape['*'],Float], n_classes:int)
Categorizes distances into n_classes classes.
distance_from_origin (points:NDArray[Shape['*,[x,y]'],Float])
Calculates distance of points from the origin.
rotate_orbit (orbit:NDArray[Shape['*,[x,y]'],Float], rotation_angle:float)
Rotates an orbit by a given angle.
make_orbit (n_points:int, width:numbers.Number=0.2)
Generates an orbit.
Args: n_points: number of points in the orbit width: width of the orbit
Returns: orbit: the orbit as a numpy array of shape (n_points, 2)
OrbitsDataset (*args, **kwargs)
(tensor([[-0.0875, -0.1872],
[ 0.2494, -0.3807],
[-0.4403, -0.4955],
[ 0.7146, 0.4166],
[ 0.3441, -0.8967]]),
tensor([0., 1., 2., 3., 4.]))
OrbitsDataModule (df:pandas.core.frame.DataFrame=<factory>, n_orbits:int=5, n_points:int=400, width:numbers.Number=0.2, noise_level:float=0.025, label_by_distance:bool=True, n_classes:Optional[int]=5, perc_train:float=0.7, perc_valid:float=0.1, perc_test:float=0.2, include_time:Optional[bool]=False, device:Optional[littyping.device.Device]=None)
OrbitsDataModule(n_orbits=5, n_points=400, width=0.2, noise_level=0.025, label_by_distance=True, n_classes=5, perc_train=0.7, perc_valid=0.1, perc_test=0.2, include_time=False, device=None)
(torch.Size([64, 5, 2]), torch.Size([64, 5]))