感知器S形
Perceptron Sigmoid
本文关键字:感知 更新时间:2023-10-16
您好,我正在尝试创建一个程序来计算感知器算法的权重。我现在一切都在工作,但最基本的是,它是一个阶跃功能,它是单层的。在我继续使用多层之前,我正在尝试使其最佳和 S 形。
所以这些是我的问题,我对 sigmoid 有一个大致的概念,但我找不到任何关于如何使线最优的信息,所以它与数据点的距离相等。有人知道吗?
net = 0;
for(i=0; i<N; i++)
{
net = net + (x[i] * w[i]); //Calculates weighted sum
}
if(net >= threshold) output = 1; //Finds the output based on the net
if(net < threshold) output = -1;
这是我当前查找"y"变量的代码,我在这里称之为输出,它使用简单的步进函数找到它,阈值 = 0。如何将其转换为 sigmoid?
以下方法可能有效:
output = 1 / (1 + exp(-net));
您可能还喜欢tanh(net)
或1 / (1 + abs(net))
功能,根据此答案,这些功能要快得多。
相关文章:
- std::list 中的迭代器感知对象
- 智能感知不适用于Visual Studio 2017中的cmake项目
- 更改 git 分支名称后,在项目的 Visual Studio 代码中丢失智能感知(建议,转到定义C++
- 设置我的应用程序 API 感知并防止系统使其模糊和错误定位
- K 和 &K 使用感知
- VS 代码 C/C++ 智能感知在更新后停止工作
- 当DPI感知,全屏和无框时,客户区域在WM_NCACTIVATE上擦除
- 为什么我的编译器将字符串感知为常量字符[]?
- 宏使枚举调试器感知?
- 智能感知:标识符"node"未定义
- 智能感知 PCH 警告不会消失
- 在C++中实现的感知器没有按预期进行训练.(和逻辑门示例)
- 什么是正确的 macOS vscode 智能感知C++包含标准库的路径?
- 字符串显示上的智能感知:npos = 18446744
- 分配器感知的"std::array"样式容器?
- 我在代码中有一个错误,错误是:(智能感知:不允许抽象类类型"HourlyWorker"的对象:)
- 智能感知:不能使用 "PVOID" 类型的值初始化 "_NtQuerySystemInformation" 类型的实体
- Visual Studio 2017:加速C++智能感知
- std::VSPRINTF 的字符串感知选项
- 简单的智能感知解决方案