Py之neurolab:Python库之neurolab的简介、安装、使用方法之详细攻略

简介: Py之neurolab:Python库之neurolab的简介、安装、使用方法之详细攻略

neurolab的简介


   neurolab是一个简单而强大的Python神经网络库。包含基于神经网络、训练算法和灵活的框架来创建和探索其他神经网络类型。NeuroLab一个具有灵活网络配置和Python学习算法的基本神经网络算法库。为了简化库的使用,接口类似于MATLAB(C)的神经网络工具箱(NNT)的包。该库基于包NUMPY(http://NoPy.SimP.org),使用一些学习算法。

neurolab


neurolab的安装


pip install neurolab

image.png


neurolab的使用方法


Support neural networks types

Single layer perceptron

create function: neurolab.net.newp()

example of use: newp

default train function: neurolab.train.train_delta()

support train functions: train_gd, train_gda, train_gdm, train_gdx, train_rprop, train_bfgs, train_cg

Multilayer feed forward perceptron

create function: neurolab.net.newff()

example of use: newff

default train function: neurolab.train.train_gdx()

support train functions: train_gd, train_gda, train_gdm, train_rprop, train_bfgs, train_cg

Competing layer (Kohonen Layer)

create function: neurolab.net.newc()

example of use: newc

default train function: neurolab.train.train_cwta()

support train functions: train_wta

Learning Vector Quantization (LVQ)

create function: neurolab.net.newlvq()

example of use: newlvq

default train function: neurolab.train.train_lvq()

Elman Recurrent network

create function: neurolab.net.newelm()

example of use: newelm

default train function: neurolab.train.train_gdx()

support train functions: train_gd, train_gda, train_gdm, train_rprop, train_bfgs, train_cg

Hopfield Recurrent network

create function: neurolab.net.newhop()

example of use: newhop

Hemming Recurrent network

create function: neurolab.net.newhem()

example of use: newhem


Features:

Pure python + numpy

API like Neural Network Toolbox (NNT) from MATLAB

Interface to use train algorithms form scipy.optimize

Flexible network configurations and learning algorithms. You may change: train, error, initialization and activation functions

Unlimited number of neural layers and number of neurons in layers

Variety of supported types of Artificial Neural Network and learning algorithms

Example:

>>> import numpy as np

>>> import neurolab as nl

>>> # Create train samples

>>> input = np.random.uniform(-0.5, 0.5, (10, 2))

>>> target = (input[:, 0] + input[:, 1]).reshape(10, 1)

>>> # Create network with 2 inputs, 5 neurons in input layer and 1 in output layer

>>> net = nl.net.newff([[-0.5, 0.5], [-0.5, 0.5]], [5, 1])

>>> # Train process

>>> err = net.train(input, target, show=15)

Epoch: 15; Error: 0.150308402918;

Epoch: 30; Error: 0.072265865089;

Epoch: 45; Error: 0.016931355131;

The goal of learning is reached

>>> # Test

>>> net.sim([[0.2, 0.1]]) # 0.2 + 0.1

array([[ 0.28757596]])


 


相关文章
|
1月前
|
机器学习/深度学习 存储 数据挖掘
Python图像处理实用指南:PIL库的多样化应用
本文介绍Python中PIL库在图像处理中的多样化应用,涵盖裁剪、调整大小、旋转、模糊、锐化、亮度和对比度调整、翻转、压缩及添加滤镜等操作。通过具体代码示例,展示如何轻松实现这些功能,帮助读者掌握高效图像处理技术,适用于图片美化、数据分析及机器学习等领域。
73 20
|
4天前
|
数据采集 JavaScript Android开发
【02】仿站技术之python技术,看完学会再也不用去购买收费工具了-本次找了小影-感觉页面很好看-本次是爬取vue需要用到Puppeteer库用node.js扒一个app下载落地页-包括安卓android下载(简单)-ios苹果plist下载(稍微麻烦一丢丢)-优雅草卓伊凡
【02】仿站技术之python技术,看完学会再也不用去购买收费工具了-本次找了小影-感觉页面很好看-本次是爬取vue需要用到Puppeteer库用node.js扒一个app下载落地页-包括安卓android下载(简单)-ios苹果plist下载(稍微麻烦一丢丢)-优雅草卓伊凡
29 7
【02】仿站技术之python技术,看完学会再也不用去购买收费工具了-本次找了小影-感觉页面很好看-本次是爬取vue需要用到Puppeteer库用node.js扒一个app下载落地页-包括安卓android下载(简单)-ios苹果plist下载(稍微麻烦一丢丢)-优雅草卓伊凡
|
28天前
|
测试技术 Python
【03】做一个精美的打飞机小游戏,规划游戏项目目录-分门别类所有的资源-库-类-逻辑-打包为可玩的exe-练习python打包为可执行exe-优雅草卓伊凡-持续更新-分享源代码和游戏包供游玩-1.0.2版本
【03】做一个精美的打飞机小游戏,规划游戏项目目录-分门别类所有的资源-库-类-逻辑-打包为可玩的exe-练习python打包为可执行exe-优雅草卓伊凡-持续更新-分享源代码和游戏包供游玩-1.0.2版本
106 31
【03】做一个精美的打飞机小游戏,规划游戏项目目录-分门别类所有的资源-库-类-逻辑-打包为可玩的exe-练习python打包为可执行exe-优雅草卓伊凡-持续更新-分享源代码和游戏包供游玩-1.0.2版本
|
2月前
|
XML JSON 数据库
Python的标准库
Python的标准库
185 77
|
2月前
|
XML JSON 数据库
Python的标准库
Python的标准库
71 11
|
2月前
|
数据可视化 Python
以下是一些常用的图表类型及其Python代码示例,使用Matplotlib和Seaborn库。
通过这些思维导图和分析说明表,您可以更直观地理解和选择适合的数据可视化图表类型,帮助更有效地展示和分析数据。
105 8
|
2月前
|
安全 API 文件存储
Yagmail邮件发送库:如何用Python实现自动化邮件营销?
本文详细介绍了如何使用Yagmail库实现自动化邮件营销。Yagmail是一个简洁强大的Python库,能简化邮件发送流程,支持文本、HTML邮件及附件发送,适用于数字营销场景。文章涵盖了Yagmail的基本使用、高级功能、案例分析及最佳实践,帮助读者轻松上手。
88 4
|
9月前
|
Linux 开发工具 C语言
30天python速成-第一天(python简介及下载安装)
30天python速成-第一天(python简介及下载安装)
|
9月前
|
Linux 开发者 iOS开发
|
开发框架 数据可视化 Java
Python Qt GUI设计简介、环境下载和安装(基础篇—1)
Python Qt GUI设计简介、环境下载和安装(基础篇—1)
Python Qt GUI设计简介、环境下载和安装(基础篇—1)

热门文章

最新文章

推荐镜像

更多