teras.utils module

teras.utils module#

clean_reloaded_config_data(x)

Cleans reloaded dictionary/list config data in the from_config method.

compute_cardinalities(x, categorical_idx[, ...])

Compute cardinalities for features in the given dataset/dataframe.

convert_tf_dict_to_array_tensor(dict_tensor)

Converts a batch of data taken from tensorflow dictionary format dataset to array format.

inject_missing_values(x[, miss_rate])

Injects missing (np.nan) values in the given dataframe or ndarray.

generate_fake_gemstone_data([num_samples])

Generate fake gemstone like data of specified num_samples.

get_metadata_for_embedding(dataframe[, ...])

Utility function that create metadata for features in a given dataframe required by the Categorical and Numerical embedding layers in Teras.