I have a set of n-dimensional data points that I believe lie on a set of parallel hyperplanes. I would like to deduce the equations for those hyperplanes given the points.

For example, here is a set of 30 points in 4-D space:

```
coords = [
0.068725 0.89165 0.47873 0.6745
0.086289 0.77872 0.58564 0.48276
0.08723 0.91586 0.2942 0.51796
0.09489 0.77028 0.30046 0.6921
0.12148 0.15381 0.19016 0.93594
0.14719 0.8033 0.49138 0.2615
0.15486 0.7326 0.74647 0.36555
0.19593 0.060394 0.94216 0.54249
0.23846 0.51832 0.59953 0.75279
0.2849 0.10243 0.47861 0.97743
0.29188 0.4175 0.025716 0.52277
0.29509 0.39232 0.81321 0.42047
0.31451 0.79695 0.13754 0.85448
0.33484 0.44694 0.59357 0.52262
0.3771 0.55992 0.98326 0.1467
0.50646 0.73878 0.46019 0.96566
0.51967 0.885 0.030646 0.63008
0.52099 0.47966 0.25772 0.13639
0.5579 0.93632 0.59255 0.59876
0.62916 0.27282 0.90561 0.50887
0.6599 0.081988 0.51417 0.48062
0.68893 0.30211 0.16113 0.87588
0.71285 0.49865 0.15539 0.86974
0.75203 0.7089 0.036614 0.40885
0.75912 0.09958 0.58503 0.87416
0.81015 0.34089 0.86382 0.87492
0.81982 0.89656 0.91465 0.18355
0.90986 0.98749 0.82763 0.070998
0.91422 0.0015857 0.97149 0.51201
0.96927 0.85749 0.80153 0.72124
];
```

Using `corrcoef`

, `cov`

, etc do not indicate any correlation between the columns. Even PCA does not indicate that the data set has any interdependence, nor does `convhulln`

. But searching exhaustively for hyperplanes like this:

```
nd = columns(coords);
N = 20; # some maximum coefficient value
# make a list of possible coefficients
v = (0:(2*N+1)^nd-1)';
for i = nd:-1:1
lst(:,i) = mod(v, 2*N+1);
v = (v - lst(:,i)) / (2*N + 1);
end
lst -= N;
clear i v ans
lst = lst(sum(abs(lst),2) <= N, :);
lst = lst(lst(:,1) >= 0, :);
lst = lst(sum(abs(lst),2) > 0, :);
for i = rows(lst):-1:1
r = round(coords * lst(i,:)' * 1e9) / 1e9;
count(i) = numel (unique (r));
end
lst = lst(count == min(count),:)
```

gives a set of coefficients `lst = [7 -1 -4 -1]`

, so multiplying `coords`

with those coefficients gives:

```
>> unique (coords * lst')'
ans =
-4 -3 -2 -1 0 1 1 1 3 4 5
```

Disregarding the repeats due to minor rounding errors, this indicates that `coords * [7 -1 -4 -1]'`

falls in a set of parallel planes with one of the above integer RHS values.

In other words, the 30 points do not fully span 4-dimensional space, but fall in a set of some 9 or 10 parallel planes.

If the points were random numbers, then they would fail the spectral test, but in my case I already know that the numbers are not random and are very likely falling in planes, except I donāt know their equations.

Question: How to get this family of hyperplanes from given points without an exhaustive search over all coefficient values?