Closed tkyjsab closed 3 months ago
Hi @tkyjsab,
I think your problem stems from using a factor variable as your to-be-predicted criterion.
FFTrees converts your factor into a logical variable (as the line
! Converted criterion to logical (by 'Diagnosis == 0') in 'train' data.
suggests).
An easy fix would be to re-define your criterion as a logical in the desired direction, e.g.,
Diagnosis <- Diagnosis == 1
prior to generating the FFTs.
Hope this helps — and happy FFTreeing, Hans
Yes indeed, your tip fixed my issue. Thanks for your quick and prompt reply!
Hi,
Applying FFtree on enclosed Test dataset to predict disease (binary Diagnosis variable) from 4 parameters, having 5 positive cases and 6 normal cases Using FFtrees v 2.0.0.9000 with R version 4.4.0 Ending up with a tree to predict normal cases rather than positive cases (disease). How can I fix it?
Test$Diagnosis <-as.factor(Test$Diagnosis) summary(Test$Diagnosis)
Test_fft <- FFTrees(formula = Diagnosis ~ ., data = Test) Test_fft
Test_fft <- FFTrees(formula = Diagnosis ~ ., data = Test) ! Converted criterion to logical (by 'Diagnosis == 0') in 'train' data. ✔ Created an FFTrees object. Ranking 4 cues: ■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■ 100% | ETA: 0s ✔ Ranked 4 cues (optimizing 'bacc'). ✔ Created 7 FFTs with 'ifan' algorithm (chasing 'bacc'). ✔ Defined 7 FFTs. ✔ Applied 7 FFTs to 'train' data. ✔ Ranked 7 FFTs by 'train' data. ✔ Expressed 7 FFTs in words.
plot(Test_fft)