简体   繁体   中英

How can I use generalized regression neural network in python?

I'm trying to find any python library or package which implements newgrnn (Generalized Regression Neural Network) using python.

Is there any package or library available where I can use neural network for regression. I'm trying to find python equivalent of the newgrnn (Generalized Regression Neural Network) which is described here.

I found the library neupy which solved my problem:

from neupy import algorithms
from neupy.algorithms.rbfn.utils import pdf_between_data

grnn = algorithms.GRNN(std=0.003)
grnn.train(X, y)

# In this part of the code you can do any moifications you want
ratios = pdf_between_data(grnn.input_train, X, grnn.std)
predicted = (np.dot(grnn.target_train.T, ratios) / ratios.sum(axis=0)).T

This is the link for the library: http://neupy.com/apidocs/neupy.algorithms.rbfn.grnn.html

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM