Convex hull in higher dimensions, finding the vertices of a polytope

扶醉桌前 提交于 2019-12-03 06:56:17

In this answer, I will assume you have already used PCA to near-losslessly compress the data to 4-dimensional data, where the reduced data lies in a 4-dimensional polytope with conceptually few faces. I will describe an approach to solve for the faces of this polytope, which will in turn give you the vertices.

Let xi in R4, i = 1, ..., m, be the PCA-reduced data points.

Let F = (a, b) be a face, where a is in R4 with a • a = 1 and b is in R.

We define the face loss function L as follows, where λ+, λ- > 0 are parameters you choose. λ+ should be a very small positive number. λ- should be a very large positive number.

L(F) = sumi+ • max(0, a • xi + b) - λ- • min(0, a • xi + b))

We want to find minimal faces F with respect to the loss function L. The small set of all minimal faces will describe your polytope. You can solve for minimal faces by randomly initializing F and then performing gradient descent using the partial derivatives ∂L / ∂aj, j = 1, 2, 3, 4, and ∂L / ∂b. At each step of gradient descent, constrain a • a to be 1 by normalizing.

∂L / ∂aj = sumi+ &bullet; xj &bullet; [a &bullet; xi + b > 0] - λ- &bullet; xj &bullet; [a &bullet; xi + b < 0]) for j = 1, 2, 3, 4

∂L / ∂b = sumi+ &bullet; [a &bullet; xi + b > 0] - λ- &bullet; [a &bullet; xi + b < 0])

Note Iverson brackets: [P] = 1 if P is true and [P] = 0 if P is false.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!