Closed sgunz closed 2 months ago
dec9021: fixes the problem with the markconnect
function
https://github.com/mjemons/spatialFDA/commit/451795680ef026dab1413e690c72103a477d55d7: adds a conditional statement to calcCrossMetricPerFov that handles the special case of dot functions, where we want to do one vs all comparisons. In order to plot these functions I updated the plotting function in https://github.com/mjemons/spatialFDA/commit/a6d9fb30da0b533f8055532a7e5d3aace8711a32
https://github.com/mjemons/spatialFDA/pull/4/commits/598ff15cbdac7ab9dfdc5730030607c706fc4ae7: There were issues with fPCA and NAs. Potentially, add the dropping of NAs in the calcMetric.R function direclty.
the issue has been adressed and the PR merged
Refers to pull request #4
When extending the function for cross metrics I tried to follow the logic of
extractMetric
and made the following additions to the code:f5e3d41a0ddee46e710d14ae3d79c9cb278264da: The default function call cannot handle cross functions of the same type. Therefore I added the second conditional statement (line 39). If the (updated) conditional statements are not fulfilled (line 47) the function will return an empty
data.frame
such that the functions that useextractMetrics
(e.g.,calcMetricPerFov
) do not crash. This is a suboptimal fix and should be addressed later.240b4a658cf41e1ca5518ebbc325af45ab771ca2: adds a function that calculates cross type functions per fov by first generating all possible combinations and then calls
calcMetricPerFov
. While the function / logic could be also incorporated intocalcMetricPerFovdirectly
there are some cases where it makes a difference wether we calculate on a combination or one vs. rest (e.g., dot functions). Therefore I think it makes sense to have separate functions for non cross and cross comparisons.So far this works fine for the classical cross metrics (e.g.,
Kcross
,Lcross
,Kcross.inhom
, etc.).Problems
Problems to solve:
marconnect
functiondot
functions because they follow the same logic as a non cross functions. If we run the the non cross versioncalcMetricPerFov
it only gives one curve per fov instead of splitting it by mark. If we runcalcCrossMetricPerFov
it splits the pattern into the 2x2 combinations and then calculates for all combinations instead on one mark vs. the rest. Probably we need to check fordot
function and then run a special case. This is not inline with the generality of the code but I don't see another solution at the moment.