ftudisco / node-edge-hypergraph-centrality

13 stars 0 forks source link

log-exp and max functions in code is different to the functions stated in the paper #1

Open LawsonSarah opened 1 year ago

LawsonSarah commented 1 year ago

@ftudisco In the file real_hypergraph_data.jl the mappings are:

mappings = Dict("linear" => (x -> x, x -> x, x -> x, x -> x), "log-exp" => (x -> x, x -> x.^(1/10), x -> log.(x), x -> exp.(x)), "max" => (x -> x, x -> x.^(1/5), x -> x.^15, x -> x.^(1/15)) )

In your paper it states: log-exp mapping is g(x)=x^1/2 instead of x^1/10 max mapping has g=id and not x^1/5 and alpha=10 instead of 15.

Is there a reason for that?

Thanks!

ftudisco commented 1 year ago

Hi , thanks for your question!The value of alpha for the max function determines how close we are approximating the “real” max function, which is obtained for alpha=infinity. As for the log-exp, I am not sure why we have 1/10 here but the difference is again not so relevant. You can see x^1/10 as (x^1/2)^1/5, so using 1/10 you are just looking at an entry wise power of the log-exp centrality discussed in the paper. the corresponding ordering of the nodes and edges (who are the most central) is not affected by positive entry wise powers.I hope this answers your doubts.Please let me know if I can be of further help!On 23 Feb 2023, at 02:53, SaritaLawson @.***> wrote: @ftudisco In the file real_hypergraph_data.jl the mappings are: mappings = Dict("linear" => (x -> x, x -> x, x -> x, x -> x), "log-exp" => (x -> x, x -> x.^(1/10), x -> log.(x), x -> exp.(x)), "max" => (x -> x, x -> x.^(1/5), x -> x.^15, x -> x.^(1/15)) ) In your paper it states log-exp mapping is g(x)=x^1/2 instead of x^1/10 and the max mapping has alpha=10 instead of 15. Is there a reason for that? Thanks!

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>

LawsonSarah commented 1 year ago

@ftudisco thank you for your quick and clear response. That all makes sense. (When using 1/2 in the sunflower model the rounded normalised centralities are either 0 or1 hence perhaps this was why for visuals in the plotting?)