pub struct ChunkedDataset { /* private fields */ }Expand description
Chunked dataset manager
Implementations§
Source§impl ChunkedDataset
impl ChunkedDataset
Sourcepub fn from_arrays(
x: &Array2<Float>,
y: &Array1<Float>,
config: ChunkedProcessingConfig,
) -> Result<Self>
pub fn from_arrays( x: &Array2<Float>, y: &Array1<Float>, config: ChunkedProcessingConfig, ) -> Result<Self>
Create a new chunked dataset from arrays
Sourcepub fn from_files(
_data_files: Vec<PathBuf>,
_config: ChunkedProcessingConfig,
) -> Result<Self>
pub fn from_files( _data_files: Vec<PathBuf>, _config: ChunkedProcessingConfig, ) -> Result<Self>
Create chunked dataset from files
Sourcepub fn get_chunk(
&mut self,
chunk_id: usize,
) -> Result<(&Array2<Float>, &Array1<Float>)>
pub fn get_chunk( &mut self, chunk_id: usize, ) -> Result<(&Array2<Float>, &Array1<Float>)>
Get a chunk by ID
Sourcepub fn chunk_iter(&mut self) -> ChunkIterator<'_> ⓘ
pub fn chunk_iter(&mut self) -> ChunkIterator<'_> ⓘ
Get chunk iterator
Sourcepub fn n_features(&self) -> usize
pub fn n_features(&self) -> usize
Get number of features
Sourcepub fn process_chunks<F, R>(&mut self, processor: F) -> Result<Vec<R>>
pub fn process_chunks<F, R>(&mut self, processor: F) -> Result<Vec<R>>
Process chunks with a given function
Sourcepub fn compute_stats(&mut self) -> Result<ChunkedDatasetStats>
pub fn compute_stats(&mut self) -> Result<ChunkedDatasetStats>
Compute statistics across all chunks
Trait Implementations§
Source§impl Drop for ChunkedDataset
impl Drop for ChunkedDataset
Auto Trait Implementations§
impl Freeze for ChunkedDataset
impl RefUnwindSafe for ChunkedDataset
impl Send for ChunkedDataset
impl Sync for ChunkedDataset
impl Unpin for ChunkedDataset
impl UnsafeUnpin for ChunkedDataset
impl UnwindSafe for ChunkedDataset
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more