0

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?

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459

1 Answers1

0

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.
  • First of all thanks for your answer, but i am not sure what you mean by 'if there exists a linear relation between the columns'. If you mean that the value in column B has effect on the value of column C then no. And also is there a possibility to loop through the previous data where i have received the end value of (true or false) and retrieve a list of most common patterns ? like 50% of true rows have B1 = 1, C = 3 etc. – user3765430 May 04 '16 at 13:55
  • linear relation not among the columns but among true/false column and other columns. like y=a1*c1+a2*c2... an*cn where c1,c2...cn are independent variables and y is dependent on values of cx. – palash kulshreshtha May 05 '16 at 06:29