Pattern finding algorithms in NodeJS

130 Views Asked by At

I am working on a server that will update a list each day. The list will look like the following example.

+---+------------+-------------+-------------+-------------+
|   |     A      |      B      |      C      |      D      |
+---+------------+-------------+-------------+-------------+
| 1 | Name1      |      1      |      2      |     true    |
| 2 | Name2      |      2      |      3      |     true    |
| 3 | Name3      |      1      |      1      |     false   |
+---+------------+-------------+-------------+-------------+

In this example I only used 2 table (except for the name) but in the real list there are 15 columns, with each containing other numbers (some columns can also have the same value).

I also have a last column that is filled with value true or false. This column will be filled on the next day that i receive the other values.

What I want to program is a algorithm that will be able to search for a pattern(s) that are most common for all the row's with he value true.

I want to program this in NodeJS but have no idea how I am able to do this, any idea's?

1

There are 1 best solutions below

2
On

considering the algorithm is derived from previous stored values of various columns which correspond to last column being true. If we consider linear relationship between various columns like

y=a1*c1+a2*c2...+a14*c14

where c1 is column 1 and a1 is coefficient.Then for example we "might" get some relation like.

y>0.5 then true
y<0.5 then false

but remarks are

  1. this will only hold true if there exists a linear relation between the columns.
  2. This will be fuzzy clustering i.e. there might be outliers when you calculate true or false with your above equation.
  3. Some non linear relation ship might exist between the column values which may not be covered in above relationship.