deleting instances from arff file

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

deleting instances from arff file

anas2020
how can I delete all data (instances) from arff file and keeping only the
structure of the arff file like this:
@relation xxx

@attribute A1 numeric
@attribute A2 numeric
@attribute A3 numeric
@attribute A4 numeric
@attribute A5 numeric
@attribute A6 numeric
@attribute A7 {0,1}

@data



--
Sent from: https://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: deleting instances from arff file

Peter Reutemann-3
On November 16, 2019 1:22:36 AM GMT+13:00, anas2020 <[hidden email]> wrote:

>how can I delete all data (instances) from arff file and keeping only
>the
>structure of the arff file like this:
>@relation xxx
>
>@attribute A1 numeric
>@attribute A2 numeric
>@attribute A3 numeric
>@attribute A4 numeric
>@attribute A5 numeric
>@attribute A6 numeric
>@attribute A7 {0,1}
>
>@data
>
>
>
>--
>Sent from: https://weka.8497.n7.nabble.com/
>_______________________________________________
>Wekalist mailing list -- [hidden email]
>Send posts to: To unsubscribe send an email to
>[hidden email]
>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

Text editor?

Or API:

Instances data = ... // full dataset
Instances header = new Instances(data, 0);

Cheers, Peter
--
Peter Reutemann
Dept. of Computer Science
University of Waikato, NZ
+64 (7) 858-5174
http://www.cms.waikato.ac.nz/~fracpete/
http://www.data-mining.co.nz/
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
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
Reply | Threaded
Open this post in threaded view
|

Re: deleting instances from arff file

Eibe Frank-2
Administrator
The RemoveRange filter is another option.

Cheers,
Eibe

> On 16/11/2019, at 5:04 PM, Peter Reutemann <[hidden email]> wrote:
>
> On November 16, 2019 1:22:36 AM GMT+13:00, anas2020 <[hidden email]> wrote:
>> how can I delete all data (instances) from arff file and keeping only
>> the
>> structure of the arff file like this:
>> @relation xxx
>>
>> @attribute A1 numeric
>> @attribute A2 numeric
>> @attribute A3 numeric
>> @attribute A4 numeric
>> @attribute A5 numeric
>> @attribute A6 numeric
>> @attribute A7 {0,1}
>>
>> @data
>>
>>
>>
>> --
>> Sent from: https://weka.8497.n7.nabble.com/
>> _______________________________________________
>> Wekalist mailing list -- [hidden email]
>> Send posts to: To unsubscribe send an email to
>> [hidden email]
>> 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
>
> Text editor?
>
> Or API:
>
> Instances data = ... // full dataset
> Instances header = new Instances(data, 0);
>
> Cheers, Peter
> --
> Peter Reutemann
> Dept. of Computer Science
> University of Waikato, NZ
> +64 (7) 858-5174
> http://www.cms.waikato.ac.nz/~fracpete/
> http://www.data-mining.co.nz/
> _______________________________________________
> Wekalist mailing list -- [hidden email]
> Send posts to: To unsubscribe send an email to [hidden email]
> 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
_______________________________________________
Wekalist mailing list -- [hidden email]
Send posts to: To unsubscribe send an email to [hidden email]
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