- #1
TopCat
- 58
- 0
SOLVED - Math'ca - Can't get a function to read in data
I'm trying to do a maximum likelihood estimation in Mathematica. My data was in a text file and I read it into a table. Each entry in the table is two values, like {{1,2},{3,4},...}. I have a 2D function, P[x,y] and when I try and evaluate at a data point, P[data[[1]]], for instance, it doesn't input the values. It just returns P[{1,2}] (with the data in this example).
Now, it works fine when the data and function are one-dimensional. So this tells me the data is not stored in a manner that the function can immediately use. The problem here is that for me to use the Max Likelihood function, I need the data to be in the proper format. The arguments for the ML function are ML[data,f,param], so it needs to enter the data into the function. So, is there a way I can make a table or list of {x,y} data that could possibly work in this scenario?
As an aside, there must be because an example of this ML uses multi valued data. I can't get it work with mine though. Argh!
Thanks thank thanks to anyone who can help!
I'm trying to do a maximum likelihood estimation in Mathematica. My data was in a text file and I read it into a table. Each entry in the table is two values, like {{1,2},{3,4},...}. I have a 2D function, P[x,y] and when I try and evaluate at a data point, P[data[[1]]], for instance, it doesn't input the values. It just returns P[{1,2}] (with the data in this example).
Now, it works fine when the data and function are one-dimensional. So this tells me the data is not stored in a manner that the function can immediately use. The problem here is that for me to use the Max Likelihood function, I need the data to be in the proper format. The arguments for the ML function are ML[data,f,param], so it needs to enter the data into the function. So, is there a way I can make a table or list of {x,y} data that could possibly work in this scenario?
As an aside, there must be because an example of this ML uses multi valued data. I can't get it work with mine though. Argh!
Thanks thank thanks to anyone who can help!
Last edited: