This is like function get_input, but for fit information. With this getter you can obtain:

  • segment parameters (scaling factors and component-specific values for the used distributions);

  • inferred Copy Number Alteration (CNA) values;

  • the posterior distribution over CNAs;

  • mixing proportions;

  • clustering assignments;

  • z_nk (the latent variables of the model)

Like get_input, the function uses the what parameter to return the appropriate type of information.

get_fit(x, what = "CNA")

Arguments

x

An object of class rcongasplus.

what

Any of "segment_parameters", "CNA", "posterior_CNA", "mixing_proportions", "cluster_assignments", or "z_nk".

Value

A tibble; its format depends on what. See the examples.

Examples

data(example_object)

# Extract segment parameters
get_fit(example_object, what = 'segment_parameters')
#> Error in get_fit(example_object, what = "segment_parameters"): Missing fits for the input object, cannot extract 

# Extract CNAs
get_fit(example_object, what = 'CNA')
#> Error in get_fit(example_object, what = "CNA"): Missing fits for the input object, cannot extract 

# Extract CNAs
get_fit(example_object, what = 'posterior_CNA')
#> Error in get_fit(example_object, what = "posterior_CNA"): Missing fits for the input object, cannot extract 

# Extract mixing proportions
get_fit(example_object, what = 'mixing_proportions')
#> Error in get_fit(example_object, what = "mixing_proportions"): Missing fits for the input object, cannot extract 

# Extract clustering assignments
get_fit(example_object, what = 'cluster_assignments')
#> Error in get_fit(example_object, what = "cluster_assignments"): Missing fits for the input object, cannot extract 

# Extract the clustering responsibilities
get_fit(example_object, what = 'z_nk')
#> Error in get_fit(example_object, what = "z_nk"): Missing fits for the input object, cannot extract