Changing the name of a relation manually from withing the Explorer

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Changing the name of a relation manually from withing the Explorer

Marina Santini
Hi,

is it possible to change the name of a @relation manually within a
arff file when the dataset is loaded in the Explorer?

Sometimes I remove attributes manually and I would like also to change
the name of the relation when I save the new dataset, without opening
it in a text editor outside weka and then reload the dataset again.

Thanks in advance for any tips.

Cheers, Marina
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Changing the name of a relation manually from withing the Explorer

Eibe Frank-2
Administrator
No, unfortunately it can’t be done in the Explorer. The KnowledgeFlow has an “AlterRelationName” component though (in the “Flow” menu).

You could also use the Groovy or Jython consoles. Here is an example in Groovy:

renamedData = weka.core.converters.ConverterUtils.DataSource.read("/Users/eibe/test.arff")
renamedData.setRelationName("New name")
weka.core.converters.ConverterUtils.DataSink.write("/Users/eibe/test.arff", renamedData)

Cheers,
Eibe

> On 19/05/2017, at 4:27 AM, Marina Santini <[hidden email]> wrote:
>
> Hi,
>
> is it possible to change the name of a @relation manually within a
> arff file when the dataset is loaded in the Explorer?
>
> Sometimes I remove attributes manually and I would like also to change
> the name of the relation when I save the new dataset, without opening
> it in a text editor outside weka and then reload the dataset again.
>
> Thanks in advance for any tips.
>
> Cheers, Marina
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html

_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
List info and subscription status: https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
Loading...