How to Create a Neural Network Using Python

To Create a Neural Networks use the following steps

  1. Load Data
  2. Define Model
  3. Compile Model
  4. Fit Model
  5. Evaluate Model

Load Data

  • To load data use numpy

import numpy

data_path= “Where ur dataset resides in your machine” (we have to take care about \ and /. path/location)

data_set=numpy.loadtxt(data_path,delimiter=”,”)   (some time you will get unable to load file, then first load the file using normal file open method)

numpy.random.seed(7)

here we use random.seed to get same random values for all the executions.

see the snapshot below

x=dataset[:,0:8] # here the type of dataset is ndarray

Leave a comment

A WordPress.com Website.

Up ↑

Design a site like this with WordPress.com
Get started