Problem with my machine learning rule set


I have been using machine learning in Analyst to sort my good images from bad and then flag out the bad images in my pipeline.

I am having a problem with the set of rules that I have established for my most recent dataset. When I apply the rules to my pipeline I get the error ‘The rules describe objects instead of images’.

I have made sure to put the flag towards the end of my pipeline so that all objects and measurements defined in the rules have already been established.

My ruleset is:
IF (Mean_POMC_Intensity_MassDisplacement_MaskedcFos > 0.38562653800218671, [1.0000009685764013, -1.0000009685764013], [-0.81818182618657398, 0.81818182618657398])
IF (Mean_cFosPositivePOMC_Parent_POMC > 12.0, [-1.0, 1.0], [0.82001733289487133, -0.82001733289487133])
IF (Image_Count_POMC > 14.0, [-0.86594134574245418, 0.86594134574245418], [0.6921342642590802, -0.6921342642590802])
IF (Mean_POMC_Intensity_MaxIntensity_MaskedcFos > 0.0054698554886272177, [1.0000000000000016, -1.0000000000000016], [-0.68688988754914793, 0.68688988754914793])
IF (Median_POMC_Intensity_MassDisplacement_MaskedcFos > 0.17219759909115107, [0.7073601351888501, -0.7073601351888501], [-1.0, 1.0])

Any suggestions as to how I can get my pipeline happy with the rules?



You can only flag the images, not the objects. So your ruleset should therefore contain measurements about the images, not the object “POMC”, hence the error ‘The rules describe objects instead of images’.

Can you try to make a measurement for the images, such as ImageQuality, MeasureImageIntensity etc…
Then, set up a rule for images, something like: "IF (Image_ImageQuality_ …

Good luck.

Ok thanks Minh. Good to know that it only works for image measurements. Since on this occasion the object measurements are important criteria for flagging images, I will filter post analysis using Analyst.


Just to elaborate slightly more on what @Minh said- FlagImage can only be used to flag images, but FilterObjects CAN take CPA rules and use it to filter objects out.

If it were important to you to flag a whole image as bad if more than 3 objects in it were flagged as bad, for example, you could do FilterObjects to figure out how many of your objects pass QC, use CalculateMath to subtract Image_Count_FilteredObjects from Image_Count_Objects, then use FlagImage with whole image measurements to use your calculation to throw out images where that value is > 3.

Does that make sense?