径向基函数网络中的特征向量

Feature Vectors in Radial Basis Function Network

我正在尝试使用 RBFNN 进行点云到表面的重建,但我不明白 RBFNN 中的特征向量是什么。

任何人都可以帮助我理解这一点。

实现此目标的目标:

来自这样的输入:

RBF 网络本质上涉及使用服从一组核心属性的函数的线性组合来拟合数据——其中最主要的是径向对称性。这些功能中的每一个的参数都是通过基于重复输入产生的错误的增量调整来学习的。

如果我理解(自从我使用这些网络之一以来已经很长时间了),您的问题与点云中数据的预处理有关。我相信点云中的每个点都应该作为一个输入。如果我理解正确,特征就是你的三个维度,因此每个点都可以被认为是一个"feature vector."

您还有其他选择,即隐藏层中径向基神经元的数量,以及要使用的径向基函数(高斯函数是流行的首选)。网络的训练和表面重建可以通过多种方式完成,但我认为这超出了问题的范围。

我不知道它是否有帮助,但这里有一个简单的 python RBF 网络执行函数逼近的实现,具有一维输入:

import numpy as np
import matplotlib.pyplot as plt

def fit_me(x):
    return (x-2) * (2*x+1) / (1+x**2)

def rbf(x, mu, sigma=1.5):
    return np.exp( -(x-mu)**2 / (2*sigma**2));

# Core parameters including number of training
# and testing points, minimum and maximum x values
# for training and testing points, and the number
# of rbf (hidden) nodes to use
num_points = 100    # number of inputs (each 1D)
num_rbfs = 20.0     # number of centers
x_min = -5
x_max = 10

# Training data, evenly spaced points
x_train = np.linspace(x_min, x_max, num_points)
y_train = fit_me(x_train)

# Testing data, more evenly spaced points
x_test  = np.linspace(x_min, x_max, num_points*3)
y_test  = fit_me(x_test)

# Centers of each of the rbf nodes
centers = np.linspace(-5, 10, num_rbfs)

# Everything is in place to train the network
# and attempt to approximate the function 'fit_me'.

# Start by creating a matrix G in which each row
# corresponds to an x value within the domain and each 
# column i contains the values of rbf_i(x).
center_cols, x_rows = np.meshgrid(centers, x_train)
G = rbf(center_cols, x_rows)

plt.plot(G)
plt.title('Radial Basis Functions')
plt.show()

# Simple training in this case: use pseudoinverse to get weights
weights = np.dot(np.linalg.pinv(G), y_train)

# To test, create meshgrid for test points
center_cols, x_rows = np.meshgrid(centers, x_test)
G_test = rbf(center_cols, x_rows)

# apply weights to G_test
y_predict = np.dot(G_test, weights)

plt.plot(y_predict)
plt.title('Predicted function')
plt.show()

error = y_predict - y_test

plt.plot(error)
plt.title('Function approximation error')
plt.show()

首先,您可以探索向网络提供输入的方式以及 RBF 节点的使用方式。这应该以直接的方式扩展到 2D 输入,尽管训练可能会涉及更多。

要进行适当的表面重建,您可能需要一种与此处学习的函数表示完全不同的表面表示。不确定如何进行这最后一步。