Is there any way to convert a dataset in latest WEKA version format to the dataset in WEKA 1.2?

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

Is there any way to convert a dataset in latest WEKA version format to the dataset in WEKA 1.2?

Mahnaz
I have a program in java that creates a decision tree using the latest
revision of Weka. The input of the J48 classifier is in memory in the
Instances format (not saved in an ARFF file or CSV file or so on. I prefer
not to use an intermediate file as well). Now I need to run another decision
tree classifier using J48 classifier in Weka revision 1.2. As you know the
structure of Instances in latest and 1.2 versions of Weka are different. At
the end I need to convert the decision tree format from revision 1.2 to the
latest one.

1- Is there any adapter to do that conversion?
2- How can I convert them?
3- What is the role of the m_index field in the Attribute class?
4- In the header of a dataset in Weka 1.2, there is a FastVector of
Attributes. Is it supposed that they have the same order of the data fields
in an Instance.

Any help would be appreciated.

Cheers



--
Sent from: http://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit 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
|

Re: Is there any way to convert a dataset in latest WEKA version format to the dataset in WEKA 1.2?

Eibe Frank-2
Administrator
You mean WEKA 3.2, not 1.2, right?

Why on earth would you want to do that? Is the decision tree built by J48 in 3.2 significantly better than the one built by J48 in 3.8?

Once an Attribute object gets associated with an Instances object (which happens in the constructor of the Instances object), the index of the attribute gets set to its position in the list of attributes for that Instances object. Yes, the order of the attributes in the FastVector/ArrayList must match the order of the attribute values in each instance.

Cheers,
Eibe

> On 22/01/2019, at 6:56 AM, Mahnaz <[hidden email]> wrote:
>
> I have a program in java that creates a decision tree using the latest
> revision of Weka. The input of the J48 classifier is in memory in the
> Instances format (not saved in an ARFF file or CSV file or so on. I prefer
> not to use an intermediate file as well). Now I need to run another decision
> tree classifier using J48 classifier in Weka revision 1.2. As you know the
> structure of Instances in latest and 1.2 versions of Weka are different. At
> the end I need to convert the decision tree format from revision 1.2 to the
> latest one.
>
> 1- Is there any adapter to do that conversion?
> 2- How can I convert them?
> 3- What is the role of the m_index field in the Attribute class?
> 4- In the header of a dataset in Weka 1.2, there is a FastVector of
> Attributes. Is it supposed that they have the same order of the data fields
> in an Instance.
>
> Any help would be appreciated.
>
> Cheers
>
>
>
> --
> Sent from: http://weka.8497.n7.nabble.com/
> _______________________________________________
> Wekalist mailing list
> Send posts to: [hidden email]
> To subscribe, unsubscribe, etc., visit 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]
To subscribe, unsubscribe, etc., visit 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
|

Re: Is there any way to convert a dataset in latest WEKA version format to the dataset in WEKA 1.2?

Mahnaz
Hi Eibe

Thank you for answering my questions. You saved my day.
I need to use an old WEKA because I am going to use an algorithm implemented
(based on WEKA) in 2009 which creates a discrimination free decision tree.

Cheers
Mahnaz



--
Sent from: http://weka.8497.n7.nabble.com/
_______________________________________________
Wekalist mailing list
Send posts to: [hidden email]
To subscribe, unsubscribe, etc., visit https://list.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html