How to create .h5 file to test and train dataset (basically 2 files) and then use these files to train the neural network using logistic regression in python

i don’t need code but i don’t know how to create .h5 extension file. i know which library to import for h5 but how to create it that’s the problem.
i want to use logistic regression on pimas-indians-diabetes.csv

hey @Yadav_Monika ,
can you be more clear on for what and which h5 files do you want to use. ?
In neural networks we generally use , h5 files to store NN models so that we can further use them without any problem.

Kindly brief more about your doubt.
Thank You and Happy Learning :slightly_smiling_face:.

I’ve pima-indians-diabetes.csv file on which i want to perform regularisation. but I’ve to use .h5 to do so in which in one .h5 file i write a code for training and in another one for testing. but i don’t know how to create these .h5 files

so why do you need to make h5 files only ?
i mean if you want to train logistic regression , then you can do that without h5 files also.

i know but I’ve to do this with .h5 file . can you tell how to create .h5 file I’ll code myself

The thing i wanna let you know is , that h5 files are just for either model weights or saving your model.
You can’t use them , like as such to train logistic regression on it.

But still if want this to be like that ,
then you can use pandas function to_hdf , to create h5 files and store your data.

I hope this helps.

actually this my college assignment in which we have to do initialization and regularization on pima-indians-diabetes dataset

so why do you need to use h5 files for that.
You can simply create a neural network from scratch and perform all those things that you need to do.

Yeah it will be a bit tough to implement that , but yeah you can do that.