Modify dataset#

DepthEucl.change_dataset(newDataset: ndarray, newY: ndarray | None = None, newDistribution: ndarray | None = None, keepOld: bool = False) None[source]

Modify loaded dataset.

Arguments
newDataset:np.ndarray

New dataset

newDistribution:np.ndarray|None, default=None,

Distribution related to the dataset

newY:np.ndarray|None, default=None,

Only for convention.

keepOld:bool, default=False,

Boolean to determine if current dataset is kept or not. If True, newDataset is added in the end of the old one.

Returns

None

Examples
>>> import numpy as np
>>> from depth.model import DepthEucl
>>> mat1=[[1, 0, 0, 0, 0],[0, 2, 0, 0, 0],[0, 0, 3, 0, 0],[0, 0, 0, 2, 0],[0, 0, 0, 0, 1]]
>>> mat2=[[1, 0, 0, 0, 0],[0, 1, 0, 0, 0],[0, 0, 1, 0, 0],[0, 0, 0, 1, 0],[0, 0, 0, 0, 1]]
>>> np.random.seed(0)
>>> data = np.random.multivariate_normal([0,0,0,0,0], mat1, 1000)
>>> data2 = np.random.multivariate_normal([0,0,0,0,0], mat1, 1000)
>>> model = DepthEucl().load_dataset(data)
>>> model.change_dataset(data2,)