Skip to content

an implementation of a Radial Basis Function Neural Network (RBFNN) for classification problem.

License

Notifications You must be signed in to change notification settings

raaaouf/RBF_neural_network_python

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RBF_neural_network_python

Author: Abderraouf Zoghbi , UBMA , Departement of Computer Science.

This is an implementation of a Radial Basis Function class and using it as a layer in a simple Neural Network for classification the origin of olive oil (olive.csv) in Python.

Feel free to use or modify the code.

Requirements:

Usage

After processing data you can build the model by adding the RBF hidden layer using RBF class in your network.

model = Sequential()
rbflayer = RBFLayer(34,
                        initializer=InitCentersKMeans(X_train),
                        betas=3.0,
                        input_shape=(568,))
model.add(rbflayer)
model.add(Dense(4))
model.add(Activation('linear'))
model.compile(loss='mean_squared_error',
                  optimizer=RMSprop(), metrics=['accuracy'])
print(model.summary())
history1 = model.fit(X_train, y_train, epochs=1000, batch_size=32)

Results

results

In the training phase the model can predict up to 95% pass rate and with 0.0155 error.

License

MIT License.

GitHub

Releases

No releases published

Packages

No packages published

Languages