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

Classification Summary Level Selection #47

Closed
DustinMLong opened this issue Mar 22, 2024 · 1 comment
Closed

Classification Summary Level Selection #47

DustinMLong opened this issue Mar 22, 2024 · 1 comment

Comments

@DustinMLong
Copy link

orsf_summarize_uni gives summary for the first class by default. Would it be helpful to include an input allowing users to select the class to summarize? In the reproducible example below, the printed summary is limited to Adelie penguin. The summaries for all classes are included in the orsf_summarize_uni object but having a way to print them directly would be useful.

library(aorsf)

fit =  orsf(species ~ ., data = penguins_orsf)

smry = orsf_summarize_uni(fit)
smry
#> 
#> -- bill_length_mm (VI Rank: 1) -------------------------
#> 
#>            |--------------- Probability ---------------|
#>      Value      Mean     Median      25th %    75th %
#>       36.6 0.7044331 0.85955664 0.344965208 0.9625072
#>       39.5 0.6535697 0.80727711 0.266058440 0.9468242
#>       44.5 0.3697256 0.34953660 0.035810945 0.6409438
#>       48.6 0.2234635 0.14498102 0.008626836 0.4262582
#>       50.8 0.1896335 0.09561501 0.009713793 0.3866315
#> 
#> -- island (VI Rank: 2) ---------------------------------
#> 
#>            |--------------- Probability ---------------|
#>      Value      Mean    Median     25th %    75th %
#>     Biscoe 0.5007671 0.4513207 0.01346324 0.9491816
#>      Dream 0.4360160 0.1990975 0.07250154 0.8740631
#>  Torgersen 0.6220022 0.6459860 0.22850515 0.9810957
#> 
#> -- flipper_length_mm (VI Rank: 3) ----------------------
#> 
#>            |--------------- Probability ---------------|
#>      Value      Mean    Median     25th %    75th %
#>        185 0.5910941 0.3937772 0.30187167 0.9552354
#>        190 0.5645121 0.3637454 0.26707447 0.9433666
#>        197 0.4952256 0.2889080 0.18181057 0.8831356
#>        213 0.3292072 0.1116319 0.02213975 0.6602175
#>        221 0.3025870 0.1087965 0.01011283 0.6184659
#> 
#> -- bill_depth_mm (VI Rank: 4) --------------------------
#> 
#>            |--------------- Probability ---------------|
#>      Value      Mean    Median      25th %    75th %
#>       14.3 0.3560189 0.1540067 0.008714118 0.7293553
#>       15.6 0.3943511 0.1673597 0.045879915 0.7901435
#>       17.3 0.4651208 0.2253786 0.106483255 0.9155495
#>       18.7 0.5094000 0.2998837 0.133393326 0.9473630
#>       19.5 0.5276217 0.3456728 0.162150077 0.9524491
#> 
#> -- sex (VI Rank: 5) ------------------------------------
#> 
#>            |--------------- Probability ---------------|
#>      Value      Mean    Median     25th %    75th %
#>     female 0.4217927 0.1468877 0.02271961 0.8977797
#>       male 0.4742529 0.3384249 0.05131323 0.9453019
#> 
#> -- body_mass_g (VI Rank: 6) ----------------------------
#> 
#>            |--------------- Probability ---------------|
#>      Value      Mean    Median      25th %    75th %
#>       3300 0.4825696 0.2233228 0.121143276 0.9339286
#>       3550 0.4750676 0.2110828 0.101099039 0.9372102
#>       4050 0.4638683 0.2262442 0.076359495 0.9343941
#>       4775 0.4356364 0.2836723 0.032402907 0.8618333
#>       5440 0.4154148 0.2934098 0.009086565 0.8180788
#> 
#> -- year (VI Rank: 7) -----------------------------------
#> 
#>            |--------------- Probability ---------------|
#>      Value      Mean    Median     25th %    75th %
#>       2007 0.4324757 0.1512571 0.01277177 0.9280795
#>       2008 0.4436049 0.1834657 0.01505514 0.9434973
#>       2009 0.4511092 0.1993108 0.01914280 0.9450677
#> 
#>  Predicted probability for top 7 predictors

Created on 2024-03-22 with reprex v2.1.0

@bcjaeger
Copy link
Collaborator

bcjaeger commented May 2, 2024

Fixed with #57

@bcjaeger bcjaeger closed this as completed May 2, 2024
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