Message Boards Message Boards

0
|
7139 Views
|
7 Replies
|
1 Total Likes
View groups...
Share
Share this post:

Correlation based recovery missing elements in a List?

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.

POSTED BY: M.A. Ghorbani
7 Replies

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.

POSTED BY: Michael Rogers
Posted 6 years ago

How are the two lists related to one another?

POSTED BY: Kyle Martin

common elements correlation is high; for example 0.8.

POSTED BY: M.A. Ghorbani
Anonymous User
Anonymous User
Posted 6 years ago

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

POSTED BY: Anonymous User

Thank you John.

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

POSTED BY: M.A. Ghorbani

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

POSTED BY: Vincent Virgilio

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 ?

POSTED BY: M.A. Ghorbani
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