boris-kz / CogAlg

This project is a Computer Vision implementation of general hierarchical pattern discovery principles introduced in README
http://www.cognitivealgorithm.info
MIT License
90 stars 42 forks source link

comp_p development #31

Closed Twenkid closed 3 years ago

Twenkid commented 5 years ago

@boris-kz

Re https://github.com/boris-kz/CogAlg/blob/master/frame_2D_alg/comp_P_draft.py

To begin with the entry point:

def comp_P_(val_PP_, blob, xD, rdn):  # scan of vertical Py_ -> comp_P -> 2D mPPs and dPPs, recursion?
    # differential Pm: all params are dderived, not pre-selected?
    s, [min_x, max_x, min_y, max_y, DX, abs_xD, Ly], [L, I, G, Dx, Dy, abs_Dx, abs_Dy], root_ = blob

comp_P is called from intra_blob, in the comments:

 ...
  comp_P_() if estimated val_PP_ > ave_comp_P, for blob in root_blob.sub_blob_: defined by dx_g:

Thus in intra_blob there will be some comparison of that valPP

Apparently compP uses an outdated structure of the blob, also vars which are not used now? (abs_xD, abs_Dx?) or have to be computed?

I assume the current intra_blob's top comment structure should be used for the blob and the parameters be adjusted accordingly, through the whole function?

What is valPP? Comparison of some val_ga, val_gg, val_gr? It uses a suffix for a list, but is used as scalar.

Py_ is referred in intrablobs's seg sub tree, but apparently it should be accessed from different indices than: `Py = blob[3][-1] # per segment, also flip eval per seg?`

boris-kz commented 5 years ago

def compP(valPP, blob, xD, rdn): # scan of vertical Py_ -> comp_P -> 2D mPPs and dPPs, recursion?

differential Pm: all params are dderived, not pre-selected?

s, [min_x, max_x, min_y, max_y, DX, abs_xD, Ly], [L, I, G, Dx, Dy, abs_Dx, abs_Dy], root_ = blob

comp_P is called from intra_blob, in the comments:

... compP() if estimated valPP > ave_comp_P, for blob in root_blob.subblob: defined by dx_g:

Thus in intra_blob there will be some comparison of that valPP

valPP will be included in sorted vals and dx_g() -> comp_P will be added to 3 evaluated branches

Apparently compP uses an outdated structure of the blob, also vars which are not used now? (abs_xD, abs_Dx?) or have to be computed?

I assume the current intra_blob's top comment structure should be used for the blob and the parameters be adjusted accordingly, through the whole function?

Yes, but at this point I only define it to compare params of I + top Dert: G, Dy, Dx, L, as well as X: ave_x

What is valPP? Comparison of some val_ga, val_gg, val_gr?

This is still tentative, in intra_blob comment, II will copy it to top comment: valPP =

L + I + |Dx| + |Dy| # a superset of Pm, no abs_Dx, abs_Dy for comp_dert eval: high rdn?

It uses a suffix for a list, but is used as scalar.

It's an estimated value of converting P to PP

Py_ is referred in intrablobs's seg sub tree, but apparently it should be accessed from different indices than: Py = blob[3][-1] # per segment, also flip eval per seg?

It will be in segments of blobs produced by dx_g(), similar to hypot_g, but g is redefined as dx

Twenkid commented 5 years ago

What is pPs here? (can't find it elsewhere; the closest is PPs)

def form_PP(typ, P, PP): # increments continued vPPs or dPPs (not pPs): incr_blob + P_ders?

In comp_P, is the alteration of identifiers "par-var" just for variety? (In the code it doesn't matter)


 for par, C in zip(mPP[1], CmPP_):  # blob-wide summation of 16 summed vars from incr_PP
                    C += par
...
 for var, C in zip(dPP[1], CdPP_):
                    C += var
boris-kz commented 5 years ago

What is pPs here? (can't find it elsewhere; the closest is PPs)

Parameter pattern, per d | v of individual parameters. This is very expensive, so we will need to evaluate for even evaluation of forming them.

def form_PP(typ, P, PP): # increments continued vPPs or dPPs (not pPs): incr_blob + P_ders?

In comp_P, is the alteration of identifiers "par-var" just for variety? (In the code it doesn't matter)

Var is mostly obsolete, par, is more meaningful. I haven't been updating compP much, comp_P needs to be done first.

Twenkid commented 5 years ago

Pm +mL? (or dL?)

Pd = ddX + dL + dI + dDx + dDy #->...

Pm = mX + dL + vI + mDx + mDy #-> complem vPP, rdn: stronger Pd|Pm rolp?

boris-kz commented 5 years ago

Thanks, that was a typo. Updated version:

dL = L - _L; mL = min(L, _L) # comp Derts[1] -> abs match, dderived rep value is magnitude-proportional? dDx = Dx - _Dx; mDx = min(Dx, _Dx) dDy = Dy - _Dy; mDy = min(Dy, _Dy) # Dy is a higher-precision dI: no need for comp I? anti-correlated to ortho dDx?

Pd = ddX + dL + dDx + dDy #-> signed dPP, correlation: dX -> L,oDy,!oDx, ddX -> dL,odDy,!odDx? Pm = mX + mL + mDx + mDy #-> complem vPP, rdn: stronger Pd|Pm rolp?

On Sat, May 4, 2019 at 7:21 AM Todor Arnaudov notifications@github.com wrote:

Pm +mL? (or dL?)

Pd = ddX + dL + dI + dDx + dDy #->...

Pm = mX + dL + vI + mDx + mDy #-> complem vPP, rdn: stronger Pd|Pm rolp?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/boris-kz/CogAlg/issues/31#issuecomment-489318231, or mute the thread https://github.com/notifications/unsubscribe-auth/AFABOGOBRWZP5VSBHV3S4ZTPTVWULANCNFSM4HJYIXOQ .