Preprocessing in TensorFlow

Good night,

I am working on a paper comparing Python libraries for machine learning and deep learning.

Trying to evaluate Keras and TensorFlow separately, I'm looking for information about TensorFlow methods or functions that can be used to preprocess datasets, such as those included in scikit-learn (sklearn.preprocessing) or the Keras preprocessing layers, but I can't find anything beyond a one hot enconding for labels...

Does anyone know if what I am looking for exists?

Thank you very much!

Topic tensorflow preprocessing python

Category Data Science


Tensorflow/Keras are not end-to-end librairies that cover every data science process: they are mainly focused on Machine Learning. The least they can do with input data, is to convert it to tensors.

import tensorflow as tf
import pandas as pd
   
mydata = pd.read_csv("/path/file.csv")
(...preprocessing data steps here...)

tf_tensors = tf.convert_to_tensor(mydata)

print('tensors= ', tf_tensors) 

I recommend to use other libraries such as pandas, seaborn or scikit learn to preprocess data.

You will find plenty of sources to preprocess data efficiently with those libraries, for instance: https://www.analyticsvidhya.com/blog/2020/09/pandas-speed-up-preprocessing/

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.