Re: Problem with WEKA

Peter Reutemann <[email protected]> Fri, 21 Oct 2022 09:29:49 +1300
Newsgroups gmane.comp.ai.weka
Message-ID <CAHoQ12+o2W41BVafSZ8D2j7g4UoDs6UwhGJ-eJ8o0GqzV51vVg@mail.gmail.com>
> As i mentioned that i was able to open the two files you attached, but again since i want to work with some features only , i  selected only 10 features. I re-saved the file , but when i tried to open it there was an error that the file is compatiable.  the  features i want to keep for both files (training and testing) are:
>
> number_in patient
> medical_speciality
> number_diagnosis
> number_medications
> time_in_hospital
> admission_source_id
> admission_type_id
> num_lab_procedures
> race
> insulin
> readmitted   (class)

Instead of removing them manually, you should use the
FilteredClassifier in conjunction with the Remove filter (where you
specify the indices of the attributes to remove) and the base
classifier that you actually want to use for your modelling. The
FilteredClassifier automatically applies whatever filter you have
specified (or multiple ones, combined with MultiFilter) to train and
test data, ensuring that the data stays compatible.

Cheers, Peter
-- 
Peter Reutemann
Dept. of Computer Science
University of Waikato, NZ
https://www.cs.waikato.ac.nz/~fracpete/
http://www.data-mining.co.nz/
_______________________________________________
Wekalist mailing list -- [email protected]
Send posts to [email protected]
To unsubscribe send an email to [email protected]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/postorius/lists/wekalist.list.waikato.ac.nz
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html