Open SandunFarmer opened 2 years ago
Dear author,
The code seems like that only can input maximum four trajectories? I try to change the conv_dict here but cause too many errors in the downstream code.
Could you give me some suggestion on how to change the code so that it can suitable for random amount trajectories?
Thanks.
The code you run does actually allow input of many trajectories. Xdat and ydat both contain much more trajectories than one. I think you might be mistaking the "experiment types"—or in this case "diffusion types": ["ND", "DM", "CD", "AD"]—for trajectores. These are not trajectories but the unique labels you give trajectories. They allow for multiple experiments in the generation of fingerprints, allowing classification between experiments with machine learning further down the line.
Therefore, you only have one experiment, say experiment1, the formatting of Xdat and ydat should be:
Xdat = [[x0, y0],[x1,y1],..]
ydat = ["experiment1","experiment1","experiment1",...]
and line 145 and in the code you refer to should be changed to
-conv_dict = dict(zip(range(4), ["ND", "DM", "CD", "AD"]))
+conv_dict = dict(zip(range(1), ["experiment1"]))
Dear users,
I have encountered some problems during the usage of this program and kindly solved by the author. And I post my previous problem hope that could help you.
This code need iminuit in 2.x version, but if you install iminuit first then probfit, the probfit will uninstall your 2.x iminuit and install 1.5 iminuit. You need to update the iminuit to 2.x again after install probfit.
About the X.pkl and y.pkl, X.pkl is a 2D array of the coordinate of single particle, just like [[x1,y1],[x2,y2],[x3,y3]......] y.pkl should be a 1d array containing indices representib the experiments from which the track in X came from. For y.pkl, for example, if you did two experiments, each gave 10 traces, the first ten values in y would be 0 and the next ten would be 1.