Search code examples
pythonneural-networkregression

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.


Solution

  • 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