Message Boards Message Boards

GROUPS:

Correlation based recovery missing elements in a List?

Posted 5 months ago
725 Views
|
7 Replies
|
1 Total Likes
|

Hi,

Is there some easy methods that could be used here for filling missing elements in List A based on elements of List B?

List A = { 190.5904`, 190.7829`, 190.9854`, 191.0015`, 191.0078`, 191.0233`, "", "", "", "", "", "", "", "", "", ""};

List B = { 9.4413`, 10.2572`, 7.8034`, 6.7098`, 6.3064`,  8.1171`, 6.618`, 6.618`, 6.378`, 7.944`, 7.8`, 6.294`, 7.356`,  6.936`, 6.252`, 7.344`};

Thanks in advance to everyone who respond.

7 Replies
Posted 5 months ago

How are the two lists related to one another?

common elements correlation is high; for example 0.8.

there are still too many philosophies to choose from

perhaps say what the data is and why you need the list completion, then which philosophy fits the purpose will be clear

Thank you John.

I would like to know, is there any simple and unique command for filling gaps in the List 1?

Unique? No.

Simple? Well, if you pick a model, e.g. linear, then there are various *Fit functions that can construct a model.

lm = LinearModelFit[DeleteCases[Transpose@{B, A}, {_, ""}], b, b];
anew = Transpose@{B, A} /. {b_, ""} :> {b, lm@b} // Transpose // Last
(*
{190.59, 190.783, 190.985, 191.002, 191.008, 191.023, 191.029, 
 191.029, 191.05, 190.913, 190.925, 191.057, 190.964, 191.001, 
 191.061, 190.965}
*)

The result is disappointing on the example data supplied. Below I use the same method to fill in the missing value, but color the new point red:

Transpose@{B, A} /. {b_, ""} :> Style[{b, lm@b}, Red] // ListPlot

enter image description here

I suppose it's not actual data, since there appears to be no significant relationship between B and A. I would say in this example, there is no reliable way to fill in the missing values.

Dear Michael,

Thank so much for your great help. I have used your and neural networks methods for filling the gaps.

After filling missing data, is there any statistics validation for evaluating of filling data ?

Perhaps Mathematica's machine learning could help. But I'm guessing you'd need more examples like List B for training.

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract