ShobiStassen / VIA

trajectory inference
https://pyvia.readthedocs.io/en/latest/
MIT License
76 stars 20 forks source link

clustering resolution #26

Closed wangjiawen2013 closed 1 year ago

wangjiawen2013 commented 1 year ago

Hi, We can set resolution in leiden clustering to control the number of clusters. Does VIA has a similar parameters ? I find that PARC identify a lot more clusters than leiden by default.

ShobiStassen commented 1 year ago

hi again! yes absolutely you can adjust the granularity of clustering in many ways (exactly like PARC) check out params page in rtd 1) resolution_parameter (default = 1) 2) jac_std_global (lower value means you are pruning the community-detection graph and will hence get more clusters. default is 0.15) 3) too_big_factor (default = 0.3) ensures no cluster is more than 30% of whole population

wangjiawen2013 commented 1 year ago

I tried both the parameters many many times. jac_std_global does work, while resolution_parameter doesn't work. It is supposed to be very sensitive to resolution_parameter, which is the case of leiden algorithm. Could you check the code and see if VIA uses resolution_parameters ?

ShobiStassen commented 1 year ago

hi, i just updated the core.py (on github VIA ), i think it should work now - let me know. i have not uploaded to pip yet

ShobiStassen commented 1 year ago

Let me know if you need me to upload through pip. Or if this is okay for you at the moment

On Wed, 16 Nov 2022, 15:33 jiawen wang, @.***> wrote:

I tried both the parameters many many times. jac_std_global does work, while resolution_parameter doesn't work. It is supposed to be very sensitive to resolution_parameter, which is the case of leiden algorithm. Could you check the code and see if VIA uses resolution_parameters ?

— Reply to this email directly, view it on GitHub https://github.com/ShobiStassen/VIA/issues/26#issuecomment-1316510074, or unsubscribe https://github.com/notifications/unsubscribe-auth/AISI4SASTYLVQNL4JMFBUTTWISE3HANCNFSM6AAAAAASBXXSEY . You are receiving this because you commented.Message ID: @.***>

ShobiStassen commented 1 year ago

v0.1.56 should address this issue now on pip install pyvia too

wangjiawen2013 commented 1 year ago

Hi, More release notes and version info can attract user's eye and enhance their interests and confidence and even citations on pyVIA, as we can know more details and the developing history of VIA.