Turi Create  4.0
turi::v2::ml_data_internal::column_metadata Struct Reference

#include <toolkits/ml_data_2/data_storage/internal_metadata.hpp>

Public Member Functions

void setup (bool is_target_column, const std::string &name, const std::shared_ptr< sarray< flexible_type > > &column, const std::map< std::string, ml_column_mode > &mode_overrides, const std::map< std::string, flexible_type > &options)
 
void set_training_index_size ()
 
bool mode_has_fixed_size () const
 
bool is_untranslated_column () const
 
size_t index_size () const
 
size_t global_index_offset () const
 
void check_fixed_column_size (const flexible_type &v) const GL_HOT_INLINE_FLATTEN
 
size_t column_size () const
 
void save (turi::oarchive &oarc) const
 
void load (turi::iarchive &iarc)
 
std::shared_ptr< column_metadatacreate_cleared_copy () const
 

Detailed Description

The metadata information for a single column. This is meant to be used internally to ml_data; there is no reason that the structures outside of ml_data need to access this; ml_metadata should be used instead.

This structure is necessary as many of the internal processing routines use a vector of column metadata to handle all the processing. Having this structure, which organizes all the parts of the column metadata into one place, greatly simplifies this processing.

Definition at line 34 of file internal_metadata.hpp.

Member Function Documentation

◆ check_fixed_column_size()

void turi::v2::ml_data_internal::column_metadata::check_fixed_column_size ( const flexible_type v) const
inline

During loading, we need to verify that the columns indeed have the correct column sizes.

Definition at line 199 of file internal_metadata.hpp.

◆ column_size()

size_t turi::v2::ml_data_internal::column_metadata::column_size ( ) const
inline

Returns the current size of the column.

Definition at line 127 of file internal_metadata.hpp.

◆ create_cleared_copy()

std::shared_ptr<column_metadata> turi::v2::ml_data_internal::column_metadata::create_cleared_copy ( ) const

Create a version of the metadata with all the indexing and statistics cleared.

◆ global_index_offset()

size_t turi::v2::ml_data_internal::column_metadata::global_index_offset ( ) const
inline

Returns the size of the index at training time.

Definition at line 93 of file internal_metadata.hpp.

◆ index_size()

size_t turi::v2::ml_data_internal::column_metadata::index_size ( ) const
inline

Returns the size of the index at training time.

Definition at line 86 of file internal_metadata.hpp.

◆ is_untranslated_column()

bool turi::v2::ml_data_internal::column_metadata::is_untranslated_column ( ) const
inline

Returns true if this column is untranslated and false otherwise.

Definition at line 80 of file internal_metadata.hpp.

◆ load()

void turi::v2::ml_data_internal::column_metadata::load ( turi::iarchive iarc)

Serialization – load.

◆ mode_has_fixed_size()

bool turi::v2::ml_data_internal::column_metadata::mode_has_fixed_size ( ) const
inline

Returns true if the mode of this column has a fixed mode size and false otherwise.

Definition at line 70 of file internal_metadata.hpp.

◆ save()

void turi::v2::ml_data_internal::column_metadata::save ( turi::oarchive oarc) const

Serialization – save.

◆ set_training_index_size()

void turi::v2::ml_data_internal::column_metadata::set_training_index_size ( )

Finalize training.

◆ setup()

void turi::v2::ml_data_internal::column_metadata::setup ( bool  is_target_column,
const std::string &  name,
const std::shared_ptr< sarray< flexible_type > > &  column,
const std::map< std::string, ml_column_mode > &  mode_overrides,
const std::map< std::string, flexible_type > &  options 
)

Generates a new column_metadata class using the data arrays and the types.


The documentation for this struct was generated from the following file: