By Kamalesh P
The model is been used to predict the handwritten numbers from 0 to 9, data set is been obtained from the mnist as .csv file and then the model is split into train and test set
Step 1- We import the libraries such as numpy, pandas and Matplotlib
Step2 - we read the data set and chech the number of rows and columns in it
Step 3 - we specify the input and the output for the model and find the unique values in data set
Step 4 - we find how many class are presnt in unique values
Step 5 - now we split the data into train and test data set and check the shape of data set
*Till now the dataset is been preprocessed*
Step 6- we define the sigmoid function
Step 7 - we define the compute cost function and give the math logic for the model
Step 8 - we compute the cost function and and define the hyper parameters such as learning rate
Step 9 - we apply the predict funtion and accuracy functions to find the accuracy of the model( this model as obtained 78%)
Step 10 - now we import a image to predict and we convert it to grayscale
Step 11 - we apply the image to the training set and the predicted number is printed
Submitted by Kamalesh P (kamaleshp)
Download packets of source code on Coders Packet
Comments