Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ignore constant factors when applying SIRUS #672

Open
ConnectedSystems opened this issue Feb 5, 2024 · 0 comments
Open

Ignore constant factors when applying SIRUS #672

ConnectedSystems opened this issue Feb 5, 2024 · 0 comments
Assignees

Comments

@ConnectedSystems
Copy link
Collaborator

Leads to an error about _rules!() keyword parameter not being defined in cases where non-constant factors are provided to SIRUS.

Ignoring constant factors resolves the issue, and probably should be done as part of cluster_rules()

fields_iv = ADRIA.component_params(rs_all, [Intervention, CriteriaWeights]).fieldname
varying_factor_idx = .!rs_all.model_spec.is_constant
varying_factor_names = rs_all.model_spec.fieldname[varying_factor_idx]
 
foi_idx = map(x -> x  varying_factor_names, fields_iv)
fields_iv = fields_iv[foi_idx]
 
scenarios_iv = all_scens[:, fields_iv]
 
n_clusters = 4
clusters = ADRIA.analysis.cluster_scenarios(stac, n_clusters)
target_clusters = ADRIA.analysis.target_clusters(clusters, stac)
 
max_rules = 4
rules_iv = ADRIA.analysis.cluster_rules(target_clusters, scenarios_iv, max_rules)
 
rules_scatter_fig = ADRIA.viz.rules_scatter(
    rs_all,
    scenarios_iv,
    target_clusters,
    rules_iv;
    fig_opts=Dict(:size=>(1000, 800))
    # opts=opts
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants