标签: pybrain

“ClassificationDataSet”中的“target”有什么用?

我试图找出参数targetClassificationDataSet可用于,但我仍然不清楚这一点。

我试过的

>>> from pybrain.datasets import ClassificationDataSet
>>> help(ClassificationDataSet)
Help on class ClassificationDataSet in module pybrain.datasets.classification:

class ClassificationDataSet(pybrain.datasets.supervised.SupervisedDataSet)
 |  Specialized data set for classification data. Classes are to be numbered from 0 to nb_classes-1.
 |  
 |  Method resolution order:
 |      ClassificationDataSet
 |      pybrain.datasets.supervised.SupervisedDataSet
 |      pybrain.datasets.dataset.DataSet
 |      pybrain.utilities.Serializable
 |      __builtin__.object
 |  
 |  Methods defined here:
 |  
 |  __add__(self, other)
 |      Adds the patterns of two datasets, if dimensions and type match.
 |  
 |  __init__(self, inp, target=1, nb_classes=0, …
Run Code Online (Sandbox Code Playgroud)

python pybrain

2
推荐指数
1
解决办法
2457
查看次数

运行神经网络pybrain

我想创建神经网络并为其安装 scipy 和 PyBrain。在文件上我写道:

from pybrain.tools.shortcuts import buildNetwork
net=buildNetwork(4,2,1)
Run Code Online (Sandbox Code Playgroud)

当我运行该文件时,发生了错误

from scipy.linalq import inv,det, svd, logm, expm2
ImportError: cannot import name expm2
Run Code Online (Sandbox Code Playgroud)

你能给点建议吗?

python scipy neural-network pybrain

2
推荐指数
1
解决办法
4555
查看次数

安装pybrain

我正在尝试使用以下方法安装pybrain:

git clone git://github.com/pybrain/pybrain.git
Run Code Online (Sandbox Code Playgroud)

我安装了git然后使用windows命令提示符执行上面的命令.一切顺利但是当我打开我的python IDE时,我无法导入pybrain.该模块不存在.我想知道我是否应该做些额外的事情.

python git pybrain

1
推荐指数
1
解决办法
6198
查看次数

Python"这里,...在哪里"构建

这是PyBrain网站的摘录.我得到了大部分内容,但有一条线让我完全难过.我之前从未在python代码中看到过这样的东西.对于上下文,这是整个循环:

    for c in [0, 1, 2]:
        #have no friggin idea how this next line works
        here, _ = where(tstdata['class']==c)
        plot(tstdata['input'][here, 0], tstdata['input'][here, 1], 'o')
Run Code Online (Sandbox Code Playgroud)

奇怪的"where"限定符来自NumPy,我得到了正在做的事情.我从来没有见过"这里"使用过这种方式.有人能解释一下这是做什么的吗?

python numpy scipy pybrain

1
推荐指数
1
解决办法
128
查看次数

标签 统计

pybrain ×4

python ×4

scipy ×2

git ×1

neural-network ×1

numpy ×1