Wekalist Archive

List Statistics

  • Total Threads: 1789
  • Total Posts: 297

Phrases Used to Find This Thread

  #1  
20-06-2011 12:24 PM
Wekalist member admin is online now
User
 

Hi,

i am using the hierarchical clusterer and/or the simplekmeans
algorithm. I would love to know which features are the significant
ones that lead to the creation of a cluster.
How can i get the information gain /gain ratio for the features of a cluster?

greez

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

  #2  
22-06-2011 09:05 AM
Wekalist member admin is online now
User
 

Hi,

i am using the hierarchical clusterer and/or the simplekmeans
algorithm. I would love to know which features are the significant
ones that lead to the creation of a cluster.
How can i get the information gain /gain ratio for the features of a cluster?

greez

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 20/06/11 11:24 PM, Faraz Fallahi wrote:
> Hi,
>
> i am using the hierarchical clusterer and/or the simplekmeans
> algorithm. I would love to know which features are the significant
> ones that lead to the creation of a cluster.
> How can i get the information gain /gain ratio for the features of a cluster?

You can create a dataset that includes the cluster labels (either save
the data out of the visualization of clusters in the Explorer or use the
AddCluster filter to add the cluster labels) and then use information
gain or gain ratio feature evaluation in the select attributes panel of
the Explorer.

Cheers,
Mark.


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

  #3  
22-06-2011 06:56 PM
Wekalist member admin is online now
User
 

Hi,

i am using the hierarchical clusterer and/or the simplekmeans
algorithm. I would love to know which features are the significant
ones that lead to the creation of a cluster.
How can i get the information gain /gain ratio for the features of a cluster?

greez

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 20/06/11 11:24 PM, Faraz Fallahi wrote:
> Hi,
>
> i am using the hierarchical clusterer and/or the simplekmeans
> algorithm. I would love to know which features are the significant
> ones that lead to the creation of a cluster.
> How can i get the information gain /gain ratio for the features of a cluster?

You can create a dataset that includes the cluster labels (either save
the data out of the visualization of clusters in the Explorer or use the
AddCluster filter to add the cluster labels) and then use information
gain or gain ratio feature evaluation in the select attributes panel of
the Explorer.

Cheers,
Mark.


_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thank you very much for your answer, but i need the developers guide
to this problem. i have wrapped weka for my studies and would like to
call the corresponding code on that. can u give me a hin or maybe
there is a code snippet somewhere to that topic?

greez

2011/6/22 Mark Hall <>:
> On 20/06/11 11:24 PM, Faraz Fallahi wrote:
>>
>> Hi,
>>
>> i am using the hierarchical clusterer and/or the simplekmeans
>> algorithm. I would love to know which features are the significant
>> ones that lead to the creation of a cluster.
>> How can i get the information gain /gain ratio for the features of a
>> cluster?
>
> You can create a dataset that includes the cluster labels (either save the
> data out of the visualization of clusters in the Explorer or use the
> AddCluster filter to add the cluster labels) and then use information gain
> or gain ratio feature evaluation in the select attributes panel of the
> Explorer.
>
> Cheers,
> Mark.
>
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

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

  #4  
23-06-2011 09:47 AM
Wekalist member admin is online now
User
 

Hi,

i am using the hierarchical clusterer and/or the simplekmeans
algorithm. I would love to know which features are the significant
ones that lead to the creation of a cluster.
How can i get the information gain /gain ratio for the features of a cluster?

greez

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 20/06/11 11:24 PM, Faraz Fallahi wrote:
> Hi,
>
> i am using the hierarchical clusterer and/or the simplekmeans
> algorithm. I would love to know which features are the significant
> ones that lead to the creation of a cluster.
> How can i get the information gain /gain ratio for the features of a cluster?

You can create a dataset that includes the cluster labels (either save
the data out of the visualization of clusters in the Explorer or use the
AddCluster filter to add the cluster labels) and then use information
gain or gain ratio feature evaluation in the select attributes panel of
the Explorer.

Cheers,
Mark.


_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thank you very much for your answer, but i need the developers guide
to this problem. i have wrapped weka for my studies and would like to
call the corresponding code on that. can u give me a hin or maybe
there is a code snippet somewhere to that topic?

greez

2011/6/22 Mark Hall <>:
> On 20/06/11 11:24 PM, Faraz Fallahi wrote:
>>
>> Hi,
>>
>> i am using the hierarchical clusterer and/or the simplekmeans
>> algorithm. I would love to know which features are the significant
>> ones that lead to the creation of a cluster.
>> How can i get the information gain /gain ratio for the features of a
>> cluster?
>
> You can create a dataset that includes the cluster labels (either save the
> data out of the visualization of clusters in the Explorer or use the
> AddCluster filter to add the cluster labels) and then use information gain
> or gain ratio feature evaluation in the select attributes panel of the
> Explorer.
>
> Cheers,
> Mark.
>
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 23/06/11 5:56 AM, Faraz Fallahi wrote:
> Hi Mark,
>
> thank you very much for your answer, but i need the developers guide
> to this problem. i have wrapped weka for my studies and would like to
> call the corresponding code on that. can u give me a hin or maybe
> there is a code snippet somewhere to that topic?

See this Wiki article (particularly the "Low level" subsection under
"Attribute selection"):

http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection

In the AttributeSelection class there is an additional method to get
individual attribute merit scores when an attribute evaluator and ranker
search are being used:

/**
* get the final ranking of the attributes.
* @return a two dimensional array of ranked attribute indexes and their
* associated merit scores as doubles.
* @exception Exception if a ranking has not been produced
*/
public double [][] rankedAttributes () throws Exception {
if (m_attributeRanking == null) {
throw new Exception("Ranking has not been performed");
}
return m_attributeRanking;
}

Cheers,
Mark.

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

  #5  
27-06-2011 02:16 PM
Wekalist member admin is online now
User
 

Hi,

i am using the hierarchical clusterer and/or the simplekmeans
algorithm. I would love to know which features are the significant
ones that lead to the creation of a cluster.
How can i get the information gain /gain ratio for the features of a cluster?

greez

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 20/06/11 11:24 PM, Faraz Fallahi wrote:
> Hi,
>
> i am using the hierarchical clusterer and/or the simplekmeans
> algorithm. I would love to know which features are the significant
> ones that lead to the creation of a cluster.
> How can i get the information gain /gain ratio for the features of a cluster?

You can create a dataset that includes the cluster labels (either save
the data out of the visualization of clusters in the Explorer or use the
AddCluster filter to add the cluster labels) and then use information
gain or gain ratio feature evaluation in the select attributes panel of
the Explorer.

Cheers,
Mark.


_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thank you very much for your answer, but i need the developers guide
to this problem. i have wrapped weka for my studies and would like to
call the corresponding code on that. can u give me a hin or maybe
there is a code snippet somewhere to that topic?

greez

2011/6/22 Mark Hall <>:
> On 20/06/11 11:24 PM, Faraz Fallahi wrote:
>>
>> Hi,
>>
>> i am using the hierarchical clusterer and/or the simplekmeans
>> algorithm. I would love to know which features are the significant
>> ones that lead to the creation of a cluster.
>> How can i get the information gain /gain ratio for the features of a
>> cluster?
>
> You can create a dataset that includes the cluster labels (either save the
> data out of the visualization of clusters in the Explorer or use the
> AddCluster filter to add the cluster labels) and then use information gain
> or gain ratio feature evaluation in the select attributes panel of the
> Explorer.
>
> Cheers,
> Mark.
>
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 23/06/11 5:56 AM, Faraz Fallahi wrote:
> Hi Mark,
>
> thank you very much for your answer, but i need the developers guide
> to this problem. i have wrapped weka for my studies and would like to
> call the corresponding code on that. can u give me a hin or maybe
> there is a code snippet somewhere to that topic?

See this Wiki article (particularly the "Low level" subsection under
"Attribute selection"):

http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection

In the AttributeSelection class there is an additional method to get
individual attribute merit scores when an attribute evaluator and ranker
search are being used:

/**
* get the final ranking of the attributes.
* @return a two dimensional array of ranked attribute indexes and their
* associated merit scores as doubles.
* @exception Exception if a ranking has not been produced
*/
public double [][] rankedAttributes () throws Exception {
if (m_attributeRanking == null) {
throw new Exception("Ranking has not been performed");
}
return m_attributeRanking;
}

Cheers,
Mark.

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thx for the help. but im still stuck at a point:
My function:
private void evalAttributes(Instances data) throws Exception {
System.out.println("Evaluation");
AttributeSelection selection = new AttributeSelection();
Ranker searchMethod=new Ranker();
selection.setSearch(searchMethod);
selection.setEvaluator(new InfoGainAttributeEval());
selection.SelectAttributes(data);
double[][] rankedAttributes = selection.rankedAttributes();
String Results = selection.toResultsString();
System.out.println(Results);
....
..


The Error i get is:

weka.core.UnsupportedAttributeTypeException:
weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
class!
at weka.core.Capabilities.test(Capabilities.java:927)
at weka.core.Capabilities.test(Capabilities.java:1105)

What am i doing wrong here?

greetings


2011/6/23 Mark Hall <>:
> On 23/06/11 5:56 AM, Faraz Fallahi wrote:
>>
>> Hi Mark,
>>
>> thank you very much for your answer, but i need the developers guide
>> to this problem. i have wrapped weka for my studies and would like to
>> call the corresponding code on that. can u give me a hin or maybe
>> there is a code snippet somewhere to that topic?
>
> See this Wiki article (particularly the "Low level" subsection under
> "Attribute selection"):
>
> http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection
>
> In the AttributeSelection class there is an additional method to get
> individual attribute merit scores when an attribute evaluator and ranker
> search are being used:
>
>  /**
>   * get the final ranking of the attributes.
>   * @return a two dimensional array of ranked attribute indexes and their
>   * associated merit scores as doubles.
>   * @exception Exception if a ranking has not been produced
>   */
>  public double [][] rankedAttributes () throws Exception {
>    if (m_attributeRanking == null) {
>      throw new Exception("Ranking has not been performed");
>    }
>    return m_attributeRanking;
>  }
>
> Cheers,
> Mark.
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

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

  #6  
27-06-2011 09:50 PM
Wekalist member admin is online now
User
 

Hi,

i am using the hierarchical clusterer and/or the simplekmeans
algorithm. I would love to know which features are the significant
ones that lead to the creation of a cluster.
How can i get the information gain /gain ratio for the features of a cluster?

greez

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 20/06/11 11:24 PM, Faraz Fallahi wrote:
> Hi,
>
> i am using the hierarchical clusterer and/or the simplekmeans
> algorithm. I would love to know which features are the significant
> ones that lead to the creation of a cluster.
> How can i get the information gain /gain ratio for the features of a cluster?

You can create a dataset that includes the cluster labels (either save
the data out of the visualization of clusters in the Explorer or use the
AddCluster filter to add the cluster labels) and then use information
gain or gain ratio feature evaluation in the select attributes panel of
the Explorer.

Cheers,
Mark.


_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thank you very much for your answer, but i need the developers guide
to this problem. i have wrapped weka for my studies and would like to
call the corresponding code on that. can u give me a hin or maybe
there is a code snippet somewhere to that topic?

greez

2011/6/22 Mark Hall <>:
> On 20/06/11 11:24 PM, Faraz Fallahi wrote:
>>
>> Hi,
>>
>> i am using the hierarchical clusterer and/or the simplekmeans
>> algorithm. I would love to know which features are the significant
>> ones that lead to the creation of a cluster.
>> How can i get the information gain /gain ratio for the features of a
>> cluster?
>
> You can create a dataset that includes the cluster labels (either save the
> data out of the visualization of clusters in the Explorer or use the
> AddCluster filter to add the cluster labels) and then use information gain
> or gain ratio feature evaluation in the select attributes panel of the
> Explorer.
>
> Cheers,
> Mark.
>
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 23/06/11 5:56 AM, Faraz Fallahi wrote:
> Hi Mark,
>
> thank you very much for your answer, but i need the developers guide
> to this problem. i have wrapped weka for my studies and would like to
> call the corresponding code on that. can u give me a hin or maybe
> there is a code snippet somewhere to that topic?

See this Wiki article (particularly the "Low level" subsection under
"Attribute selection"):

http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection

In the AttributeSelection class there is an additional method to get
individual attribute merit scores when an attribute evaluator and ranker
search are being used:

/**
* get the final ranking of the attributes.
* @return a two dimensional array of ranked attribute indexes and their
* associated merit scores as doubles.
* @exception Exception if a ranking has not been produced
*/
public double [][] rankedAttributes () throws Exception {
if (m_attributeRanking == null) {
throw new Exception("Ranking has not been performed");
}
return m_attributeRanking;
}

Cheers,
Mark.

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thx for the help. but im still stuck at a point:
My function:
private void evalAttributes(Instances data) throws Exception {
System.out.println("Evaluation");
AttributeSelection selection = new AttributeSelection();
Ranker searchMethod=new Ranker();
selection.setSearch(searchMethod);
selection.setEvaluator(new InfoGainAttributeEval());
selection.SelectAttributes(data);
double[][] rankedAttributes = selection.rankedAttributes();
String Results = selection.toResultsString();
System.out.println(Results);
....
..


The Error i get is:

weka.core.UnsupportedAttributeTypeException:
weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
class!
at weka.core.Capabilities.test(Capabilities.java:927)
at weka.core.Capabilities.test(Capabilities.java:1105)

What am i doing wrong here?

greetings


2011/6/23 Mark Hall <>:
> On 23/06/11 5:56 AM, Faraz Fallahi wrote:
>>
>> Hi Mark,
>>
>> thank you very much for your answer, but i need the developers guide
>> to this problem. i have wrapped weka for my studies and would like to
>> call the corresponding code on that. can u give me a hin or maybe
>> there is a code snippet somewhere to that topic?
>
> See this Wiki article (particularly the "Low level" subsection under
> "Attribute selection"):
>
> http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection
>
> In the AttributeSelection class there is an additional method to get
> individual attribute merit scores when an attribute evaluator and ranker
> search are being used:
>
>  /**
>   * get the final ranking of the attributes.
>   * @return a two dimensional array of ranked attribute indexes and their
>   * associated merit scores as doubles.
>   * @exception Exception if a ranking has not been produced
>   */
>  public double [][] rankedAttributes () throws Exception {
>    if (m_attributeRanking == null) {
>      throw new Exception("Ranking has not been performed");
>    }
>    return m_attributeRanking;
>  }
>
> Cheers,
> Mark.
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi,

> The Error i get is:
>
> weka.core.UnsupportedAttributeTypeException:
> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
> class!
>        at weka.core.Capabilities.test(Capabilities.java:927)
>        at weka.core.Capabilities.test(Capabilities.java:1105)
>
> What am i doing wrong here?
>

The error message is: "Cannot handle unary class!"
So your class attribute has only one value.
Info gain needs at least two different possible class values.

Bernhard

---------------------------------------------------------------------
Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041

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

  #7  
28-06-2011 09:42 AM
Wekalist member admin is online now
User
 

Hi,

i am using the hierarchical clusterer and/or the simplekmeans
algorithm. I would love to know which features are the significant
ones that lead to the creation of a cluster.
How can i get the information gain /gain ratio for the features of a cluster?

greez

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 20/06/11 11:24 PM, Faraz Fallahi wrote:
> Hi,
>
> i am using the hierarchical clusterer and/or the simplekmeans
> algorithm. I would love to know which features are the significant
> ones that lead to the creation of a cluster.
> How can i get the information gain /gain ratio for the features of a cluster?

You can create a dataset that includes the cluster labels (either save
the data out of the visualization of clusters in the Explorer or use the
AddCluster filter to add the cluster labels) and then use information
gain or gain ratio feature evaluation in the select attributes panel of
the Explorer.

Cheers,
Mark.


_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thank you very much for your answer, but i need the developers guide
to this problem. i have wrapped weka for my studies and would like to
call the corresponding code on that. can u give me a hin or maybe
there is a code snippet somewhere to that topic?

greez

2011/6/22 Mark Hall <>:
> On 20/06/11 11:24 PM, Faraz Fallahi wrote:
>>
>> Hi,
>>
>> i am using the hierarchical clusterer and/or the simplekmeans
>> algorithm. I would love to know which features are the significant
>> ones that lead to the creation of a cluster.
>> How can i get the information gain /gain ratio for the features of a
>> cluster?
>
> You can create a dataset that includes the cluster labels (either save the
> data out of the visualization of clusters in the Explorer or use the
> AddCluster filter to add the cluster labels) and then use information gain
> or gain ratio feature evaluation in the select attributes panel of the
> Explorer.
>
> Cheers,
> Mark.
>
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 23/06/11 5:56 AM, Faraz Fallahi wrote:
> Hi Mark,
>
> thank you very much for your answer, but i need the developers guide
> to this problem. i have wrapped weka for my studies and would like to
> call the corresponding code on that. can u give me a hin or maybe
> there is a code snippet somewhere to that topic?

See this Wiki article (particularly the "Low level" subsection under
"Attribute selection"):

http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection

In the AttributeSelection class there is an additional method to get
individual attribute merit scores when an attribute evaluator and ranker
search are being used:

/**
* get the final ranking of the attributes.
* @return a two dimensional array of ranked attribute indexes and their
* associated merit scores as doubles.
* @exception Exception if a ranking has not been produced
*/
public double [][] rankedAttributes () throws Exception {
if (m_attributeRanking == null) {
throw new Exception("Ranking has not been performed");
}
return m_attributeRanking;
}

Cheers,
Mark.

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thx for the help. but im still stuck at a point:
My function:
private void evalAttributes(Instances data) throws Exception {
System.out.println("Evaluation");
AttributeSelection selection = new AttributeSelection();
Ranker searchMethod=new Ranker();
selection.setSearch(searchMethod);
selection.setEvaluator(new InfoGainAttributeEval());
selection.SelectAttributes(data);
double[][] rankedAttributes = selection.rankedAttributes();
String Results = selection.toResultsString();
System.out.println(Results);
....
..


The Error i get is:

weka.core.UnsupportedAttributeTypeException:
weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
class!
at weka.core.Capabilities.test(Capabilities.java:927)
at weka.core.Capabilities.test(Capabilities.java:1105)

What am i doing wrong here?

greetings


2011/6/23 Mark Hall <>:
> On 23/06/11 5:56 AM, Faraz Fallahi wrote:
>>
>> Hi Mark,
>>
>> thank you very much for your answer, but i need the developers guide
>> to this problem. i have wrapped weka for my studies and would like to
>> call the corresponding code on that. can u give me a hin or maybe
>> there is a code snippet somewhere to that topic?
>
> See this Wiki article (particularly the "Low level" subsection under
> "Attribute selection"):
>
> http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection
>
> In the AttributeSelection class there is an additional method to get
> individual attribute merit scores when an attribute evaluator and ranker
> search are being used:
>
>  /**
>   * get the final ranking of the attributes.
>   * @return a two dimensional array of ranked attribute indexes and their
>   * associated merit scores as doubles.
>   * @exception Exception if a ranking has not been produced
>   */
>  public double [][] rankedAttributes () throws Exception {
>    if (m_attributeRanking == null) {
>      throw new Exception("Ranking has not been performed");
>    }
>    return m_attributeRanking;
>  }
>
> Cheers,
> Mark.
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi,

> The Error i get is:
>
> weka.core.UnsupportedAttributeTypeException:
> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
> class!
>        at weka.core.Capabilities.test(Capabilities.java:927)
>        at weka.core.Capabilities.test(Capabilities.java:1105)
>
> What am i doing wrong here?
>

The error message is: "Cannot handle unary class!"
So your class attribute has only one value.
Info gain needs at least two different possible class values.

Bernhard

---------------------------------------------------------------------
Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
oki.. so i am not understanding the procedure in principal. I would
like to know the weights of the attributes for a created cluster.

My Instance data is:
@relation temp_10_40_54

@attribute id {http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/American_Black_Bear,http://dbpedia.org/resource/Columbian_White-tailed_Deer}
@attribute http://dbpedia.org/property/wikiPageUsesTemplate
{http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/resource/Template:IUCN2006}
@attribute http://www.w3.org/1999/02/22-rdf-syntax-ns#type
{http://dbpedia.org/ontology/Eukaryote,http://dbpedia.org/class/yago/Pinnipeds,http://dbpedia.org/class/yago/Scavengers,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean}
@attribute http://dbpedia.org/ontology/thumbnail
{http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cms-newyorkzoologicalsociety1910.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg/200px-Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/R1_white-tailedDeer.jpg/200px-R1_white-tailedDeer.jpg}
@attribute http://dbpedia.org/ontology/wikiPageExternalLink
{http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://elephantvoices.org/,http://www.wildchinchillas.org,http://www.slate.com/id/2212232/,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://www.monachus-guardian.org/factfiles/carib01.htm,http://wildlife1.wildlifeinformation.org/000ADOBES/Bears/Bears_IUCN_ActionPlan/bearsAP_chapter8.pdf,http://www.findarticles.com/p/articles/mi_m0ASV/is_1_29/ai_118185263}
@attribute http://dbpedia.org/ontology/phylum
{http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Chordata}
@attribute http://dbpedia.org/ontology/kingdom
{http://dbpedia.org/resource/Animal}
@attribute http://dbpedia.org/property/hasPhotoCollection
{http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Caribbean_Monk_Seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/American_Black_Bear,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Columbian_White-tailed_Deer}
@attribute http://dbpedia.org/ontology/order
{http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Artiodactyla}
@attribute http://dbpedia.org/ontology/class
{http://dbpedia.org/resource/Mammal}
@attribute http://dbpedia.org/ontology/family
{http://dbpedia.org/resource/Elephantidae,http://dbpedia.org/resource/Chinchillidae,http://dbpedia.org/resource/Hominini,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Ursidae,http://dbpedia.org/resource/Muroidea,http://dbpedia.org/resource/Phocidae,http://dbpedia.org/resource/Bear,http://dbpedia.org/resource/Cervidae}
@attribute http://dbpedia.org/property/lower
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/upper
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/ontology/genus
{http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Monachus,http://dbpedia.org/resource/Odocoileus}
@attribute http://dbpedia.org/ontology/binomialAuthority
{http://dbpedia.org/resource/Carl_Linnaeus,http://dbpedia.org/resource/John_Edward_Gray,http://dbpedia.org/resource/Peter_Simon_Pallas}
@attribute http://dbpedia.org/property/extinct
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/subdivision
{http://dbpedia.org/datatype/second}
@attribute http://dbpedia.org/property/accessdate
{http://www.w3.org/2001/XMLSchema#date}
@attribute http://dbpedia.org/property/downloaded
{http://www.w3.org/2001/XMLSchema#date}
@attribute http://dbpedia.org/ontology/species
{http://dbpedia.org/resource/White-tailed_Deer}
@attribute http://dbpedia.org/property/id {http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/year
{http://www.w3.org/2001/XMLSchema#int}

@data
http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Mammal,?,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://elephantvoices.org/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Elephantidae,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://www.wildchinchillas.org,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Chinchillidae,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://www.slate.com/id/2212232/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Hominini,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/class/yago/Pinnipeds,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Pinnipedia,http://www.w3.org/2001/XMLSchema#int,http://www.w3.org/2001/XMLSchema#int,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/Scavengers,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://dbpedia.org/resource/Chordata,http://dbpedia.org/resource/Animal,?,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Ursidae,?,?,http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Carl_Linnaeus,?,?,?,?,?,?,?
http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Muroidea,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cm...

Can somebody correct me. I thought this would be the process.

Best Regards
Noise

2011/6/27 Bernhard Pfahringer <>:
> Hi,
>
>> The Error i get is:
>>
>> weka.core.UnsupportedAttributeTypeException:
>> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
>> class!
>>        at weka.core.Capabilities.test(Capabilities.java:927)
>>        at weka.core.Capabilities.test(Capabilities.java:1105)
>>
>> What am i doing wrong here?
>>
>
> The error message is: "Cannot handle unary class!"
> So your class attribute has only one value.
> Info gain needs at least two different possible class values.
>
> Bernhard
>
> ---------------------------------------------------------------------
> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

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

  #8  
28-06-2011 11:46 AM
Wekalist member admin is online now
User
 

Hi,

i am using the hierarchical clusterer and/or the simplekmeans
algorithm. I would love to know which features are the significant
ones that lead to the creation of a cluster.
How can i get the information gain /gain ratio for the features of a cluster?

greez

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 20/06/11 11:24 PM, Faraz Fallahi wrote:
> Hi,
>
> i am using the hierarchical clusterer and/or the simplekmeans
> algorithm. I would love to know which features are the significant
> ones that lead to the creation of a cluster.
> How can i get the information gain /gain ratio for the features of a cluster?

You can create a dataset that includes the cluster labels (either save
the data out of the visualization of clusters in the Explorer or use the
AddCluster filter to add the cluster labels) and then use information
gain or gain ratio feature evaluation in the select attributes panel of
the Explorer.

Cheers,
Mark.


_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thank you very much for your answer, but i need the developers guide
to this problem. i have wrapped weka for my studies and would like to
call the corresponding code on that. can u give me a hin or maybe
there is a code snippet somewhere to that topic?

greez

2011/6/22 Mark Hall <>:
> On 20/06/11 11:24 PM, Faraz Fallahi wrote:
>>
>> Hi,
>>
>> i am using the hierarchical clusterer and/or the simplekmeans
>> algorithm. I would love to know which features are the significant
>> ones that lead to the creation of a cluster.
>> How can i get the information gain /gain ratio for the features of a
>> cluster?
>
> You can create a dataset that includes the cluster labels (either save the
> data out of the visualization of clusters in the Explorer or use the
> AddCluster filter to add the cluster labels) and then use information gain
> or gain ratio feature evaluation in the select attributes panel of the
> Explorer.
>
> Cheers,
> Mark.
>
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 23/06/11 5:56 AM, Faraz Fallahi wrote:
> Hi Mark,
>
> thank you very much for your answer, but i need the developers guide
> to this problem. i have wrapped weka for my studies and would like to
> call the corresponding code on that. can u give me a hin or maybe
> there is a code snippet somewhere to that topic?

See this Wiki article (particularly the "Low level" subsection under
"Attribute selection"):

http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection

In the AttributeSelection class there is an additional method to get
individual attribute merit scores when an attribute evaluator and ranker
search are being used:

/**
* get the final ranking of the attributes.
* @return a two dimensional array of ranked attribute indexes and their
* associated merit scores as doubles.
* @exception Exception if a ranking has not been produced
*/
public double [][] rankedAttributes () throws Exception {
if (m_attributeRanking == null) {
throw new Exception("Ranking has not been performed");
}
return m_attributeRanking;
}

Cheers,
Mark.

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thx for the help. but im still stuck at a point:
My function:
private void evalAttributes(Instances data) throws Exception {
System.out.println("Evaluation");
AttributeSelection selection = new AttributeSelection();
Ranker searchMethod=new Ranker();
selection.setSearch(searchMethod);
selection.setEvaluator(new InfoGainAttributeEval());
selection.SelectAttributes(data);
double[][] rankedAttributes = selection.rankedAttributes();
String Results = selection.toResultsString();
System.out.println(Results);
....
..


The Error i get is:

weka.core.UnsupportedAttributeTypeException:
weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
class!
at weka.core.Capabilities.test(Capabilities.java:927)
at weka.core.Capabilities.test(Capabilities.java:1105)

What am i doing wrong here?

greetings


2011/6/23 Mark Hall <>:
> On 23/06/11 5:56 AM, Faraz Fallahi wrote:
>>
>> Hi Mark,
>>
>> thank you very much for your answer, but i need the developers guide
>> to this problem. i have wrapped weka for my studies and would like to
>> call the corresponding code on that. can u give me a hin or maybe
>> there is a code snippet somewhere to that topic?
>
> See this Wiki article (particularly the "Low level" subsection under
> "Attribute selection"):
>
> http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection
>
> In the AttributeSelection class there is an additional method to get
> individual attribute merit scores when an attribute evaluator and ranker
> search are being used:
>
>  /**
>   * get the final ranking of the attributes.
>   * @return a two dimensional array of ranked attribute indexes and their
>   * associated merit scores as doubles.
>   * @exception Exception if a ranking has not been produced
>   */
>  public double [][] rankedAttributes () throws Exception {
>    if (m_attributeRanking == null) {
>      throw new Exception("Ranking has not been performed");
>    }
>    return m_attributeRanking;
>  }
>
> Cheers,
> Mark.
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi,

> The Error i get is:
>
> weka.core.UnsupportedAttributeTypeException:
> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
> class!
>        at weka.core.Capabilities.test(Capabilities.java:927)
>        at weka.core.Capabilities.test(Capabilities.java:1105)
>
> What am i doing wrong here?
>

The error message is: "Cannot handle unary class!"
So your class attribute has only one value.
Info gain needs at least two different possible class values.

Bernhard

---------------------------------------------------------------------
Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
oki.. so i am not understanding the procedure in principal. I would
like to know the weights of the attributes for a created cluster.

My Instance data is:
@relation temp_10_40_54

@attribute id {http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/American_Black_Bear,http://dbpedia.org/resource/Columbian_White-tailed_Deer}
@attribute http://dbpedia.org/property/wikiPageUsesTemplate
{http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/resource/Template:IUCN2006}
@attribute http://www.w3.org/1999/02/22-rdf-syntax-ns#type
{http://dbpedia.org/ontology/Eukaryote,http://dbpedia.org/class/yago/Pinnipeds,http://dbpedia.org/class/yago/Scavengers,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean}
@attribute http://dbpedia.org/ontology/thumbnail
{http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cms-newyorkzoologicalsociety1910.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg/200px-Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/R1_white-tailedDeer.jpg/200px-R1_white-tailedDeer.jpg}
@attribute http://dbpedia.org/ontology/wikiPageExternalLink
{http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://elephantvoices.org/,http://www.wildchinchillas.org,http://www.slate.com/id/2212232/,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://www.monachus-guardian.org/factfiles/carib01.htm,http://wildlife1.wildlifeinformation.org/000ADOBES/Bears/Bears_IUCN_ActionPlan/bearsAP_chapter8.pdf,http://www.findarticles.com/p/articles/mi_m0ASV/is_1_29/ai_118185263}
@attribute http://dbpedia.org/ontology/phylum
{http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Chordata}
@attribute http://dbpedia.org/ontology/kingdom
{http://dbpedia.org/resource/Animal}
@attribute http://dbpedia.org/property/hasPhotoCollection
{http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Caribbean_Monk_Seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/American_Black_Bear,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Columbian_White-tailed_Deer}
@attribute http://dbpedia.org/ontology/order
{http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Artiodactyla}
@attribute http://dbpedia.org/ontology/class
{http://dbpedia.org/resource/Mammal}
@attribute http://dbpedia.org/ontology/family
{http://dbpedia.org/resource/Elephantidae,http://dbpedia.org/resource/Chinchillidae,http://dbpedia.org/resource/Hominini,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Ursidae,http://dbpedia.org/resource/Muroidea,http://dbpedia.org/resource/Phocidae,http://dbpedia.org/resource/Bear,http://dbpedia.org/resource/Cervidae}
@attribute http://dbpedia.org/property/lower
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/upper
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/ontology/genus
{http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Monachus,http://dbpedia.org/resource/Odocoileus}
@attribute http://dbpedia.org/ontology/binomialAuthority
{http://dbpedia.org/resource/Carl_Linnaeus,http://dbpedia.org/resource/John_Edward_Gray,http://dbpedia.org/resource/Peter_Simon_Pallas}
@attribute http://dbpedia.org/property/extinct
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/subdivision
{http://dbpedia.org/datatype/second}
@attribute http://dbpedia.org/property/accessdate
{http://www.w3.org/2001/XMLSchema#date}
@attribute http://dbpedia.org/property/downloaded
{http://www.w3.org/2001/XMLSchema#date}
@attribute http://dbpedia.org/ontology/species
{http://dbpedia.org/resource/White-tailed_Deer}
@attribute http://dbpedia.org/property/id {http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/year
{http://www.w3.org/2001/XMLSchema#int}

@data
http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Mammal,?,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://elephantvoices.org/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Elephantidae,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://www.wildchinchillas.org,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Chinchillidae,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://www.slate.com/id/2212232/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Hominini,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/class/yago/Pinnipeds,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Pinnipedia,http://www.w3.org/2001/XMLSchema#int,http://www.w3.org/2001/XMLSchema#int,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/Scavengers,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://dbpedia.org/resource/Chordata,http://dbpedia.org/resource/Animal,?,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Ursidae,?,?,http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Carl_Linnaeus,?,?,?,?,?,?,?
http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Muroidea,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cm...

Can somebody correct me. I thought this would be the process.

Best Regards
Noise

2011/6/27 Bernhard Pfahringer <>:
> Hi,
>
>> The Error i get is:
>>
>> weka.core.UnsupportedAttributeTypeException:
>> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
>> class!
>>        at weka.core.Capabilities.test(Capabilities.java:927)
>>        at weka.core.Capabilities.test(Capabilities.java:1105)
>>
>> What am i doing wrong here?
>>
>
> The error message is: "Cannot handle unary class!"
> So your class attribute has only one value.
> Info gain needs at least two different possible class values.
>
> Bernhard
>
> ---------------------------------------------------------------------
> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi,

you asked about analyzing clustering results,
and Mark suggested to add the cluster id to
each example, before running feature selection.
But your data below does not include this
target attribute?

Bernhard

On Tue, Jun 28, 2011 at 8:42 PM, Faraz Fallahi
<> wrote:
> oki.. so i am not understanding the procedure in principal. I would
> like to know the weights of the attributes for a created cluster.
>
> My Instance data is:
> @relation temp_10_40_54
>
> @attribute id {http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/American_Black_Bear,http://dbpedia.org/resource/Columbian_White-tailed_Deer}
> @attribute http://dbpedia.org/property/wikiPageUsesTemplate
> {http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/resource/Template:IUCN2006}
> @attribute http://www.w3.org/1999/02/22-rdf-syntax-ns#type
> {http://dbpedia.org/ontology/Eukaryote,http://dbpedia.org/class/yago/Pinnipeds,http://dbpedia.org/class/yago/Scavengers,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean}
> @attribute http://dbpedia.org/ontology/thumbnail
> {http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cms-newyorkzoologicalsociety1910.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg/200px-Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/R1_white-tailedDeer.jpg/200px-R1_white-tailedDeer.jpg}
> @attribute http://dbpedia.org/ontology/wikiPageExternalLink
> {http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://elephantvoices.org/,http://www.wildchinchillas.org,http://www.slate.com/id/2212232/,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://www.monachus-guardian.org/factfiles/carib01.htm,http://wildlife1.wildlifeinformation.org/000ADOBES/Bears/Bears_IUCN_ActionPlan/bearsAP_chapter8.pdf,http://www.findarticles.com/p/articles/mi_m0ASV/is_1_29/ai_118185263}
> @attribute http://dbpedia.org/ontology/phylum
> {http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Chordata}
> @attribute http://dbpedia.org/ontology/kingdom
> {http://dbpedia.org/resource/Animal}
> @attribute http://dbpedia.org/property/hasPhotoCollection
> {http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Caribbean_Monk_Seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/American_Black_Bear,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Columbian_White-tailed_Deer}
> @attribute http://dbpedia.org/ontology/order
> {http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Artiodactyla}
> @attribute http://dbpedia.org/ontology/class
> {http://dbpedia.org/resource/Mammal}
> @attribute http://dbpedia.org/ontology/family
> {http://dbpedia.org/resource/Elephantidae,http://dbpedia.org/resource/Chinchillidae,http://dbpedia.org/resource/Hominini,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Ursidae,http://dbpedia.org/resource/Muroidea,http://dbpedia.org/resource/Phocidae,http://dbpedia.org/resource/Bear,http://dbpedia.org/resource/Cervidae}
> @attribute http://dbpedia.org/property/lower
> {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/property/upper
> {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/ontology/genus
> {http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Monachus,http://dbpedia.org/resource/Odocoileus}
> @attribute http://dbpedia.org/ontology/binomialAuthority
> {http://dbpedia.org/resource/Carl_Linnaeus,http://dbpedia.org/resource/John_Edward_Gray,http://dbpedia.org/resource/Peter_Simon_Pallas}
> @attribute http://dbpedia.org/property/extinct
> {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/property/subdivision
> {http://dbpedia.org/datatype/second}
> @attribute http://dbpedia.org/property/accessdate
> {http://www.w3.org/2001/XMLSchema#date}
> @attribute http://dbpedia.org/property/downloaded
> {http://www.w3.org/2001/XMLSchema#date}
> @attribute http://dbpedia.org/ontology/species
> {http://dbpedia.org/resource/White-tailed_Deer}
> @attribute http://dbpedia.org/property/id {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/property/year
> {http://www.w3.org/2001/XMLSchema#int}
>
> @data
> http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Mammal,?,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://elephantvoices.org/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Elephantidae,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://www.wildchinchillas.org,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Chinchillidae,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://www.slate.com/id/2212232/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Hominini,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/class/yago/Pinnipeds,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Pinnipedia,http://www.w3.org/2001/XMLSchema#int,http://www.w3.org/2001/XMLSchema#int,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/Scavengers,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://dbpedia.org/resource/Chordata,http://dbpedia.org/resource/Animal,?,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Ursidae,?,?,http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Carl_Linnaeus,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Muroidea,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cm...
>
> Can somebody correct me. I thought this would be the process.
>
> Best Regards
> Noise
>
> 2011/6/27 Bernhard Pfahringer <>:
>> Hi,
>>
>>> The Error i get is:
>>>
>>> weka.core.UnsupportedAttributeTypeException:
>>> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
>>> class!
>>>        at weka.core.Capabilities.test(Capabilities.java:927)
>>>        at weka.core.Capabilities.test(Capabilities.java:1105)
>>>
>>> What am i doing wrong here?
>>>
>>
>> The error message is: "Cannot handle unary class!"
>> So your class attribute has only one value.
>> Info gain needs at least two different possible class values.
>>
>> Bernhard
>>
>> ---------------------------------------------------------------------
>> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
>> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>>
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to:
>> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>
>
>
>
> --
> Mit freundlichen Grüßen
> Diplom Informatiker
> Faraz Fallahi
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
---------------------------------------------------------------------
Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041

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

  #9  
10-07-2011 09:41 AM
Wekalist member admin is online now
User
 

Hi,

i am using the hierarchical clusterer and/or the simplekmeans
algorithm. I would love to know which features are the significant
ones that lead to the creation of a cluster.
How can i get the information gain /gain ratio for the features of a cluster?

greez

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 20/06/11 11:24 PM, Faraz Fallahi wrote:
> Hi,
>
> i am using the hierarchical clusterer and/or the simplekmeans
> algorithm. I would love to know which features are the significant
> ones that lead to the creation of a cluster.
> How can i get the information gain /gain ratio for the features of a cluster?

You can create a dataset that includes the cluster labels (either save
the data out of the visualization of clusters in the Explorer or use the
AddCluster filter to add the cluster labels) and then use information
gain or gain ratio feature evaluation in the select attributes panel of
the Explorer.

Cheers,
Mark.


_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thank you very much for your answer, but i need the developers guide
to this problem. i have wrapped weka for my studies and would like to
call the corresponding code on that. can u give me a hin or maybe
there is a code snippet somewhere to that topic?

greez

2011/6/22 Mark Hall <>:
> On 20/06/11 11:24 PM, Faraz Fallahi wrote:
>>
>> Hi,
>>
>> i am using the hierarchical clusterer and/or the simplekmeans
>> algorithm. I would love to know which features are the significant
>> ones that lead to the creation of a cluster.
>> How can i get the information gain /gain ratio for the features of a
>> cluster?
>
> You can create a dataset that includes the cluster labels (either save the
> data out of the visualization of clusters in the Explorer or use the
> AddCluster filter to add the cluster labels) and then use information gain
> or gain ratio feature evaluation in the select attributes panel of the
> Explorer.
>
> Cheers,
> Mark.
>
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 23/06/11 5:56 AM, Faraz Fallahi wrote:
> Hi Mark,
>
> thank you very much for your answer, but i need the developers guide
> to this problem. i have wrapped weka for my studies and would like to
> call the corresponding code on that. can u give me a hin or maybe
> there is a code snippet somewhere to that topic?

See this Wiki article (particularly the "Low level" subsection under
"Attribute selection"):

http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection

In the AttributeSelection class there is an additional method to get
individual attribute merit scores when an attribute evaluator and ranker
search are being used:

/**
* get the final ranking of the attributes.
* @return a two dimensional array of ranked attribute indexes and their
* associated merit scores as doubles.
* @exception Exception if a ranking has not been produced
*/
public double [][] rankedAttributes () throws Exception {
if (m_attributeRanking == null) {
throw new Exception("Ranking has not been performed");
}
return m_attributeRanking;
}

Cheers,
Mark.

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thx for the help. but im still stuck at a point:
My function:
private void evalAttributes(Instances data) throws Exception {
System.out.println("Evaluation");
AttributeSelection selection = new AttributeSelection();
Ranker searchMethod=new Ranker();
selection.setSearch(searchMethod);
selection.setEvaluator(new InfoGainAttributeEval());
selection.SelectAttributes(data);
double[][] rankedAttributes = selection.rankedAttributes();
String Results = selection.toResultsString();
System.out.println(Results);
....
..


The Error i get is:

weka.core.UnsupportedAttributeTypeException:
weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
class!
at weka.core.Capabilities.test(Capabilities.java:927)
at weka.core.Capabilities.test(Capabilities.java:1105)

What am i doing wrong here?

greetings


2011/6/23 Mark Hall <>:
> On 23/06/11 5:56 AM, Faraz Fallahi wrote:
>>
>> Hi Mark,
>>
>> thank you very much for your answer, but i need the developers guide
>> to this problem. i have wrapped weka for my studies and would like to
>> call the corresponding code on that. can u give me a hin or maybe
>> there is a code snippet somewhere to that topic?
>
> See this Wiki article (particularly the "Low level" subsection under
> "Attribute selection"):
>
> http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection
>
> In the AttributeSelection class there is an additional method to get
> individual attribute merit scores when an attribute evaluator and ranker
> search are being used:
>
>  /**
>   * get the final ranking of the attributes.
>   * @return a two dimensional array of ranked attribute indexes and their
>   * associated merit scores as doubles.
>   * @exception Exception if a ranking has not been produced
>   */
>  public double [][] rankedAttributes () throws Exception {
>    if (m_attributeRanking == null) {
>      throw new Exception("Ranking has not been performed");
>    }
>    return m_attributeRanking;
>  }
>
> Cheers,
> Mark.
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi,

> The Error i get is:
>
> weka.core.UnsupportedAttributeTypeException:
> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
> class!
>        at weka.core.Capabilities.test(Capabilities.java:927)
>        at weka.core.Capabilities.test(Capabilities.java:1105)
>
> What am i doing wrong here?
>

The error message is: "Cannot handle unary class!"
So your class attribute has only one value.
Info gain needs at least two different possible class values.

Bernhard

---------------------------------------------------------------------
Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
oki.. so i am not understanding the procedure in principal. I would
like to know the weights of the attributes for a created cluster.

My Instance data is:
@relation temp_10_40_54

@attribute id {http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/American_Black_Bear,http://dbpedia.org/resource/Columbian_White-tailed_Deer}
@attribute http://dbpedia.org/property/wikiPageUsesTemplate
{http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/resource/Template:IUCN2006}
@attribute http://www.w3.org/1999/02/22-rdf-syntax-ns#type
{http://dbpedia.org/ontology/Eukaryote,http://dbpedia.org/class/yago/Pinnipeds,http://dbpedia.org/class/yago/Scavengers,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean}
@attribute http://dbpedia.org/ontology/thumbnail
{http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cms-newyorkzoologicalsociety1910.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg/200px-Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/R1_white-tailedDeer.jpg/200px-R1_white-tailedDeer.jpg}
@attribute http://dbpedia.org/ontology/wikiPageExternalLink
{http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://elephantvoices.org/,http://www.wildchinchillas.org,http://www.slate.com/id/2212232/,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://www.monachus-guardian.org/factfiles/carib01.htm,http://wildlife1.wildlifeinformation.org/000ADOBES/Bears/Bears_IUCN_ActionPlan/bearsAP_chapter8.pdf,http://www.findarticles.com/p/articles/mi_m0ASV/is_1_29/ai_118185263}
@attribute http://dbpedia.org/ontology/phylum
{http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Chordata}
@attribute http://dbpedia.org/ontology/kingdom
{http://dbpedia.org/resource/Animal}
@attribute http://dbpedia.org/property/hasPhotoCollection
{http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Caribbean_Monk_Seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/American_Black_Bear,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Columbian_White-tailed_Deer}
@attribute http://dbpedia.org/ontology/order
{http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Artiodactyla}
@attribute http://dbpedia.org/ontology/class
{http://dbpedia.org/resource/Mammal}
@attribute http://dbpedia.org/ontology/family
{http://dbpedia.org/resource/Elephantidae,http://dbpedia.org/resource/Chinchillidae,http://dbpedia.org/resource/Hominini,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Ursidae,http://dbpedia.org/resource/Muroidea,http://dbpedia.org/resource/Phocidae,http://dbpedia.org/resource/Bear,http://dbpedia.org/resource/Cervidae}
@attribute http://dbpedia.org/property/lower
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/upper
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/ontology/genus
{http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Monachus,http://dbpedia.org/resource/Odocoileus}
@attribute http://dbpedia.org/ontology/binomialAuthority
{http://dbpedia.org/resource/Carl_Linnaeus,http://dbpedia.org/resource/John_Edward_Gray,http://dbpedia.org/resource/Peter_Simon_Pallas}
@attribute http://dbpedia.org/property/extinct
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/subdivision
{http://dbpedia.org/datatype/second}
@attribute http://dbpedia.org/property/accessdate
{http://www.w3.org/2001/XMLSchema#date}
@attribute http://dbpedia.org/property/downloaded
{http://www.w3.org/2001/XMLSchema#date}
@attribute http://dbpedia.org/ontology/species
{http://dbpedia.org/resource/White-tailed_Deer}
@attribute http://dbpedia.org/property/id {http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/year
{http://www.w3.org/2001/XMLSchema#int}

@data
http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Mammal,?,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://elephantvoices.org/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Elephantidae,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://www.wildchinchillas.org,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Chinchillidae,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://www.slate.com/id/2212232/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Hominini,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/class/yago/Pinnipeds,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Pinnipedia,http://www.w3.org/2001/XMLSchema#int,http://www.w3.org/2001/XMLSchema#int,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/Scavengers,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://dbpedia.org/resource/Chordata,http://dbpedia.org/resource/Animal,?,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Ursidae,?,?,http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Carl_Linnaeus,?,?,?,?,?,?,?
http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Muroidea,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cm...

Can somebody correct me. I thought this would be the process.

Best Regards
Noise

2011/6/27 Bernhard Pfahringer <>:
> Hi,
>
>> The Error i get is:
>>
>> weka.core.UnsupportedAttributeTypeException:
>> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
>> class!
>>        at weka.core.Capabilities.test(Capabilities.java:927)
>>        at weka.core.Capabilities.test(Capabilities.java:1105)
>>
>> What am i doing wrong here?
>>
>
> The error message is: "Cannot handle unary class!"
> So your class attribute has only one value.
> Info gain needs at least two different possible class values.
>
> Bernhard
>
> ---------------------------------------------------------------------
> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi,

you asked about analyzing clustering results,
and Mark suggested to add the cluster id to
each example, before running feature selection.
But your data below does not include this
target attribute?

Bernhard

On Tue, Jun 28, 2011 at 8:42 PM, Faraz Fallahi
<> wrote:
> oki.. so i am not understanding the procedure in principal. I would
> like to know the weights of the attributes for a created cluster.
>
> My Instance data is:
> @relation temp_10_40_54
>
> @attribute id {http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/American_Black_Bear,http://dbpedia.org/resource/Columbian_White-tailed_Deer}
> @attribute http://dbpedia.org/property/wikiPageUsesTemplate
> {http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/resource/Template:IUCN2006}
> @attribute http://www.w3.org/1999/02/22-rdf-syntax-ns#type
> {http://dbpedia.org/ontology/Eukaryote,http://dbpedia.org/class/yago/Pinnipeds,http://dbpedia.org/class/yago/Scavengers,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean}
> @attribute http://dbpedia.org/ontology/thumbnail
> {http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cms-newyorkzoologicalsociety1910.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg/200px-Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/R1_white-tailedDeer.jpg/200px-R1_white-tailedDeer.jpg}
> @attribute http://dbpedia.org/ontology/wikiPageExternalLink
> {http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://elephantvoices.org/,http://www.wildchinchillas.org,http://www.slate.com/id/2212232/,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://www.monachus-guardian.org/factfiles/carib01.htm,http://wildlife1.wildlifeinformation.org/000ADOBES/Bears/Bears_IUCN_ActionPlan/bearsAP_chapter8.pdf,http://www.findarticles.com/p/articles/mi_m0ASV/is_1_29/ai_118185263}
> @attribute http://dbpedia.org/ontology/phylum
> {http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Chordata}
> @attribute http://dbpedia.org/ontology/kingdom
> {http://dbpedia.org/resource/Animal}
> @attribute http://dbpedia.org/property/hasPhotoCollection
> {http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Caribbean_Monk_Seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/American_Black_Bear,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Columbian_White-tailed_Deer}
> @attribute http://dbpedia.org/ontology/order
> {http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Artiodactyla}
> @attribute http://dbpedia.org/ontology/class
> {http://dbpedia.org/resource/Mammal}
> @attribute http://dbpedia.org/ontology/family
> {http://dbpedia.org/resource/Elephantidae,http://dbpedia.org/resource/Chinchillidae,http://dbpedia.org/resource/Hominini,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Ursidae,http://dbpedia.org/resource/Muroidea,http://dbpedia.org/resource/Phocidae,http://dbpedia.org/resource/Bear,http://dbpedia.org/resource/Cervidae}
> @attribute http://dbpedia.org/property/lower
> {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/property/upper
> {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/ontology/genus
> {http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Monachus,http://dbpedia.org/resource/Odocoileus}
> @attribute http://dbpedia.org/ontology/binomialAuthority
> {http://dbpedia.org/resource/Carl_Linnaeus,http://dbpedia.org/resource/John_Edward_Gray,http://dbpedia.org/resource/Peter_Simon_Pallas}
> @attribute http://dbpedia.org/property/extinct
> {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/property/subdivision
> {http://dbpedia.org/datatype/second}
> @attribute http://dbpedia.org/property/accessdate
> {http://www.w3.org/2001/XMLSchema#date}
> @attribute http://dbpedia.org/property/downloaded
> {http://www.w3.org/2001/XMLSchema#date}
> @attribute http://dbpedia.org/ontology/species
> {http://dbpedia.org/resource/White-tailed_Deer}
> @attribute http://dbpedia.org/property/id {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/property/year
> {http://www.w3.org/2001/XMLSchema#int}
>
> @data
> http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Mammal,?,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://elephantvoices.org/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Elephantidae,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://www.wildchinchillas.org,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Chinchillidae,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://www.slate.com/id/2212232/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Hominini,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/class/yago/Pinnipeds,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Pinnipedia,http://www.w3.org/2001/XMLSchema#int,http://www.w3.org/2001/XMLSchema#int,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/Scavengers,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://dbpedia.org/resource/Chordata,http://dbpedia.org/resource/Animal,?,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Ursidae,?,?,http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Carl_Linnaeus,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Muroidea,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cm...
>
> Can somebody correct me. I thought this would be the process.
>
> Best Regards
> Noise
>
> 2011/6/27 Bernhard Pfahringer <>:
>> Hi,
>>
>>> The Error i get is:
>>>
>>> weka.core.UnsupportedAttributeTypeException:
>>> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
>>> class!
>>>        at weka.core.Capabilities.test(Capabilities.java:927)
>>>        at weka.core.Capabilities.test(Capabilities.java:1105)
>>>
>>> What am i doing wrong here?
>>>
>>
>> The error message is: "Cannot handle unary class!"
>> So your class attribute has only one value.
>> Info gain needs at least two different possible class values.
>>
>> Bernhard
>>
>> ---------------------------------------------------------------------
>> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
>> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>>
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to:
>> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>
>
>
>
> --
> Mit freundlichen Grüßen
> Diplom Informatiker
> Faraz Fallahi
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
---------------------------------------------------------------------
Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi,

ive found out how to determine the clusterID:

private String getClusterID(Instance inst, Clusterer m_Clusterer) {
try {
if (m_Clusterer instanceof DensityBasedClusterer) {
loglk += ((DensityBasedClusterer)m_Clusterer).
logDensityForInstance(inst);
double[] clubCNum = m_Clusterer.distributionForInstance(inst);
}
else {
double[] clubCNum = m_Clusterer.distributionForInstance(inst);
int i = 0;
while(i if(clubCNum[i]!=0){
return String.valueOf(i);
}
++i;
}
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}

But i dont understand how to add the clusterId to each example to get
to the point to use the lines below without getting the
error:weka.core.UnsupportedAttributeTypeException:
weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
class!
at weka.core.Capabilities.test(Capabilities.java:927

AttributeSelection selection = new AttributeSelection();
Ranker searchMethod=new Ranker();
selection.setSearch(searchMethod);
selection.setEvaluator(new InfoGainAttributeEval());
selection.SelectAttributes(data);
double[][] rankedAttributes = selection.rankedAttributes();

Would you be so kind to help me on this matter?

greetings

2011/6/28 Bernhard Pfahringer <>:
> Hi,
>
> you asked about analyzing clustering results,
> and Mark suggested to add the cluster id to
> each example, before running feature selection.
> But your data below does not include this
> target attribute?
>
> Bernhard
>
> On Tue, Jun 28, 2011 at 8:42 PM, Faraz Fallahi
> <> wrote:
>> oki.. so i am not understanding the procedure in principal. I would
>> like to know the weights of the attributes for a created cluster.
>>
>> My Instance data is:
>> @relation temp_10_40_54
>>
>> @attribute id {http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/American_Black_Bear,http://dbpedia.org/resource/Columbian_White-tailed_Deer}
>> @attribute http://dbpedia.org/property/wikiPageUsesTemplate
>> {http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/resource/Template:IUCN2006}
>> @attribute http://www.w3.org/1999/02/22-rdf-syntax-ns#type
>> {http://dbpedia.org/ontology/Eukaryote,http://dbpedia.org/class/yago/Pinnipeds,http://dbpedia.org/class/yago/Scavengers,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean}
>> @attribute http://dbpedia.org/ontology/thumbnail
>> {http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cms-newyorkzoologicalsociety1910.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg/200px-Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/R1_white-tailedDeer.jpg/200px-R1_white-tailedDeer.jpg}
>> @attribute http://dbpedia.org/ontology/wikiPageExternalLink
>> {http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://elephantvoices.org/,http://www.wildchinchillas.org,http://www.slate.com/id/2212232/,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://www.monachus-guardian.org/factfiles/carib01.htm,http://wildlife1.wildlifeinformation.org/000ADOBES/Bears/Bears_IUCN_ActionPlan/bearsAP_chapter8.pdf,http://www.findarticles.com/p/articles/mi_m0ASV/is_1_29/ai_118185263}
>> @attribute http://dbpedia.org/ontology/phylum
>> {http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Chordata}
>> @attribute http://dbpedia.org/ontology/kingdom
>> {http://dbpedia.org/resource/Animal}
>> @attribute http://dbpedia.org/property/hasPhotoCollection
>> {http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Caribbean_Monk_Seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/American_Black_Bear,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Columbian_White-tailed_Deer}
>> @attribute http://dbpedia.org/ontology/order
>> {http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Artiodactyla}
>> @attribute http://dbpedia.org/ontology/class
>> {http://dbpedia.org/resource/Mammal}
>> @attribute http://dbpedia.org/ontology/family
>> {http://dbpedia.org/resource/Elephantidae,http://dbpedia.org/resource/Chinchillidae,http://dbpedia.org/resource/Hominini,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Ursidae,http://dbpedia.org/resource/Muroidea,http://dbpedia.org/resource/Phocidae,http://dbpedia.org/resource/Bear,http://dbpedia.org/resource/Cervidae}
>> @attribute http://dbpedia.org/property/lower
>> {http://www.w3.org/2001/XMLSchema#int}
>> @attribute http://dbpedia.org/property/upper
>> {http://www.w3.org/2001/XMLSchema#int}
>> @attribute http://dbpedia.org/ontology/genus
>> {http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Monachus,http://dbpedia.org/resource/Odocoileus}
>> @attribute http://dbpedia.org/ontology/binomialAuthority
>> {http://dbpedia.org/resource/Carl_Linnaeus,http://dbpedia.org/resource/John_Edward_Gray,http://dbpedia.org/resource/Peter_Simon_Pallas}
>> @attribute http://dbpedia.org/property/extinct
>> {http://www.w3.org/2001/XMLSchema#int}
>> @attribute http://dbpedia.org/property/subdivision
>> {http://dbpedia.org/datatype/second}
>> @attribute http://dbpedia.org/property/accessdate
>> {http://www.w3.org/2001/XMLSchema#date}
>> @attribute http://dbpedia.org/property/downloaded
>> {http://www.w3.org/2001/XMLSchema#date}
>> @attribute http://dbpedia.org/ontology/species
>> {http://dbpedia.org/resource/White-tailed_Deer}
>> @attribute http://dbpedia.org/property/id {http://www.w3.org/2001/XMLSchema#int}
>> @attribute http://dbpedia.org/property/year
>> {http://www.w3.org/2001/XMLSchema#int}
>>
>> @data
>> http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Mammal,?,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://elephantvoices.org/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Elephantidae,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://www.wildchinchillas.org,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Chinchillidae,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://www.slate.com/id/2212232/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Hominini,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/class/yago/Pinnipeds,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Pinnipedia,http://www.w3.org/2001/XMLSchema#int,http://www.w3.org/2001/XMLSchema#int,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/Scavengers,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://dbpedia.org/resource/Chordata,http://dbpedia.org/resource/Animal,?,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Ursidae,?,?,http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Carl_Linnaeus,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Muroidea,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cm...
>>
>> Can somebody correct me. I thought this would be the process.
>>
>> Best Regards
>> Noise
>>
>> 2011/6/27 Bernhard Pfahringer <>:
>>> Hi,
>>>
>>>> The Error i get is:
>>>>
>>>> weka.core.UnsupportedAttributeTypeException:
>>>> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
>>>> class!
>>>>        at weka.core.Capabilities.test(Capabilities.java:927)
>>>>        at weka.core.Capabilities.test(Capabilities.java:1105)
>>>>
>>>> What am i doing wrong here?
>>>>
>>>
>>> The error message is: "Cannot handle unary class!"
>>> So your class attribute has only one value.
>>> Info gain needs at least two different possible class values.
>>>
>>> Bernhard
>>>
>>> ---------------------------------------------------------------------
>>> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
>>> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>>>
>>> _______________________________________________
>>> Wekalist mailing list
>>> Send posts to:
>>> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>>
>>
>>
>>
>> --
>> Mit freundlichen Grüßen
>> Diplom Informatiker
>> Faraz Fallahi
>>
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to:
>> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>
>
>
>
> --
> ---------------------------------------------------------------------
> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

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

  #10  
12-07-2011 07:56 AM
Wekalist member admin is online now
User
 

Hi,

i am using the hierarchical clusterer and/or the simplekmeans
algorithm. I would love to know which features are the significant
ones that lead to the creation of a cluster.
How can i get the information gain /gain ratio for the features of a cluster?

greez

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 20/06/11 11:24 PM, Faraz Fallahi wrote:
> Hi,
>
> i am using the hierarchical clusterer and/or the simplekmeans
> algorithm. I would love to know which features are the significant
> ones that lead to the creation of a cluster.
> How can i get the information gain /gain ratio for the features of a cluster?

You can create a dataset that includes the cluster labels (either save
the data out of the visualization of clusters in the Explorer or use the
AddCluster filter to add the cluster labels) and then use information
gain or gain ratio feature evaluation in the select attributes panel of
the Explorer.

Cheers,
Mark.


_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thank you very much for your answer, but i need the developers guide
to this problem. i have wrapped weka for my studies and would like to
call the corresponding code on that. can u give me a hin or maybe
there is a code snippet somewhere to that topic?

greez

2011/6/22 Mark Hall <>:
> On 20/06/11 11:24 PM, Faraz Fallahi wrote:
>>
>> Hi,
>>
>> i am using the hierarchical clusterer and/or the simplekmeans
>> algorithm. I would love to know which features are the significant
>> ones that lead to the creation of a cluster.
>> How can i get the information gain /gain ratio for the features of a
>> cluster?
>
> You can create a dataset that includes the cluster labels (either save the
> data out of the visualization of clusters in the Explorer or use the
> AddCluster filter to add the cluster labels) and then use information gain
> or gain ratio feature evaluation in the select attributes panel of the
> Explorer.
>
> Cheers,
> Mark.
>
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 23/06/11 5:56 AM, Faraz Fallahi wrote:
> Hi Mark,
>
> thank you very much for your answer, but i need the developers guide
> to this problem. i have wrapped weka for my studies and would like to
> call the corresponding code on that. can u give me a hin or maybe
> there is a code snippet somewhere to that topic?

See this Wiki article (particularly the "Low level" subsection under
"Attribute selection"):

http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection

In the AttributeSelection class there is an additional method to get
individual attribute merit scores when an attribute evaluator and ranker
search are being used:

/**
* get the final ranking of the attributes.
* @return a two dimensional array of ranked attribute indexes and their
* associated merit scores as doubles.
* @exception Exception if a ranking has not been produced
*/
public double [][] rankedAttributes () throws Exception {
if (m_attributeRanking == null) {
throw new Exception("Ranking has not been performed");
}
return m_attributeRanking;
}

Cheers,
Mark.

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thx for the help. but im still stuck at a point:
My function:
private void evalAttributes(Instances data) throws Exception {
System.out.println("Evaluation");
AttributeSelection selection = new AttributeSelection();
Ranker searchMethod=new Ranker();
selection.setSearch(searchMethod);
selection.setEvaluator(new InfoGainAttributeEval());
selection.SelectAttributes(data);
double[][] rankedAttributes = selection.rankedAttributes();
String Results = selection.toResultsString();
System.out.println(Results);
....
..


The Error i get is:

weka.core.UnsupportedAttributeTypeException:
weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
class!
at weka.core.Capabilities.test(Capabilities.java:927)
at weka.core.Capabilities.test(Capabilities.java:1105)

What am i doing wrong here?

greetings


2011/6/23 Mark Hall <>:
> On 23/06/11 5:56 AM, Faraz Fallahi wrote:
>>
>> Hi Mark,
>>
>> thank you very much for your answer, but i need the developers guide
>> to this problem. i have wrapped weka for my studies and would like to
>> call the corresponding code on that. can u give me a hin or maybe
>> there is a code snippet somewhere to that topic?
>
> See this Wiki article (particularly the "Low level" subsection under
> "Attribute selection"):
>
> http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection
>
> In the AttributeSelection class there is an additional method to get
> individual attribute merit scores when an attribute evaluator and ranker
> search are being used:
>
>  /**
>   * get the final ranking of the attributes.
>   * @return a two dimensional array of ranked attribute indexes and their
>   * associated merit scores as doubles.
>   * @exception Exception if a ranking has not been produced
>   */
>  public double [][] rankedAttributes () throws Exception {
>    if (m_attributeRanking == null) {
>      throw new Exception("Ranking has not been performed");
>    }
>    return m_attributeRanking;
>  }
>
> Cheers,
> Mark.
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi,

> The Error i get is:
>
> weka.core.UnsupportedAttributeTypeException:
> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
> class!
>        at weka.core.Capabilities.test(Capabilities.java:927)
>        at weka.core.Capabilities.test(Capabilities.java:1105)
>
> What am i doing wrong here?
>

The error message is: "Cannot handle unary class!"
So your class attribute has only one value.
Info gain needs at least two different possible class values.

Bernhard

---------------------------------------------------------------------
Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
oki.. so i am not understanding the procedure in principal. I would
like to know the weights of the attributes for a created cluster.

My Instance data is:
@relation temp_10_40_54

@attribute id {http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/American_Black_Bear,http://dbpedia.org/resource/Columbian_White-tailed_Deer}
@attribute http://dbpedia.org/property/wikiPageUsesTemplate
{http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/resource/Template:IUCN2006}
@attribute http://www.w3.org/1999/02/22-rdf-syntax-ns#type
{http://dbpedia.org/ontology/Eukaryote,http://dbpedia.org/class/yago/Pinnipeds,http://dbpedia.org/class/yago/Scavengers,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean}
@attribute http://dbpedia.org/ontology/thumbnail
{http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cms-newyorkzoologicalsociety1910.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg/200px-Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/R1_white-tailedDeer.jpg/200px-R1_white-tailedDeer.jpg}
@attribute http://dbpedia.org/ontology/wikiPageExternalLink
{http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://elephantvoices.org/,http://www.wildchinchillas.org,http://www.slate.com/id/2212232/,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://www.monachus-guardian.org/factfiles/carib01.htm,http://wildlife1.wildlifeinformation.org/000ADOBES/Bears/Bears_IUCN_ActionPlan/bearsAP_chapter8.pdf,http://www.findarticles.com/p/articles/mi_m0ASV/is_1_29/ai_118185263}
@attribute http://dbpedia.org/ontology/phylum
{http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Chordata}
@attribute http://dbpedia.org/ontology/kingdom
{http://dbpedia.org/resource/Animal}
@attribute http://dbpedia.org/property/hasPhotoCollection
{http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Caribbean_Monk_Seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/American_Black_Bear,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Columbian_White-tailed_Deer}
@attribute http://dbpedia.org/ontology/order
{http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Artiodactyla}
@attribute http://dbpedia.org/ontology/class
{http://dbpedia.org/resource/Mammal}
@attribute http://dbpedia.org/ontology/family
{http://dbpedia.org/resource/Elephantidae,http://dbpedia.org/resource/Chinchillidae,http://dbpedia.org/resource/Hominini,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Ursidae,http://dbpedia.org/resource/Muroidea,http://dbpedia.org/resource/Phocidae,http://dbpedia.org/resource/Bear,http://dbpedia.org/resource/Cervidae}
@attribute http://dbpedia.org/property/lower
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/upper
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/ontology/genus
{http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Monachus,http://dbpedia.org/resource/Odocoileus}
@attribute http://dbpedia.org/ontology/binomialAuthority
{http://dbpedia.org/resource/Carl_Linnaeus,http://dbpedia.org/resource/John_Edward_Gray,http://dbpedia.org/resource/Peter_Simon_Pallas}
@attribute http://dbpedia.org/property/extinct
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/subdivision
{http://dbpedia.org/datatype/second}
@attribute http://dbpedia.org/property/accessdate
{http://www.w3.org/2001/XMLSchema#date}
@attribute http://dbpedia.org/property/downloaded
{http://www.w3.org/2001/XMLSchema#date}
@attribute http://dbpedia.org/ontology/species
{http://dbpedia.org/resource/White-tailed_Deer}
@attribute http://dbpedia.org/property/id {http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/year
{http://www.w3.org/2001/XMLSchema#int}

@data
http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Mammal,?,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://elephantvoices.org/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Elephantidae,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://www.wildchinchillas.org,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Chinchillidae,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://www.slate.com/id/2212232/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Hominini,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/class/yago/Pinnipeds,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Pinnipedia,http://www.w3.org/2001/XMLSchema#int,http://www.w3.org/2001/XMLSchema#int,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/Scavengers,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://dbpedia.org/resource/Chordata,http://dbpedia.org/resource/Animal,?,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Ursidae,?,?,http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Carl_Linnaeus,?,?,?,?,?,?,?
http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Muroidea,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cm...

Can somebody correct me. I thought this would be the process.

Best Regards
Noise

2011/6/27 Bernhard Pfahringer <>:
> Hi,
>
>> The Error i get is:
>>
>> weka.core.UnsupportedAttributeTypeException:
>> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
>> class!
>>        at weka.core.Capabilities.test(Capabilities.java:927)
>>        at weka.core.Capabilities.test(Capabilities.java:1105)
>>
>> What am i doing wrong here?
>>
>
> The error message is: "Cannot handle unary class!"
> So your class attribute has only one value.
> Info gain needs at least two different possible class values.
>
> Bernhard
>
> ---------------------------------------------------------------------
> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi,

you asked about analyzing clustering results,
and Mark suggested to add the cluster id to
each example, before running feature selection.
But your data below does not include this
target attribute?

Bernhard

On Tue, Jun 28, 2011 at 8:42 PM, Faraz Fallahi
<> wrote:
> oki.. so i am not understanding the procedure in principal. I would
> like to know the weights of the attributes for a created cluster.
>
> My Instance data is:
> @relation temp_10_40_54
>
> @attribute id {http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/American_Black_Bear,http://dbpedia.org/resource/Columbian_White-tailed_Deer}
> @attribute http://dbpedia.org/property/wikiPageUsesTemplate
> {http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/resource/Template:IUCN2006}
> @attribute http://www.w3.org/1999/02/22-rdf-syntax-ns#type
> {http://dbpedia.org/ontology/Eukaryote,http://dbpedia.org/class/yago/Pinnipeds,http://dbpedia.org/class/yago/Scavengers,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean}
> @attribute http://dbpedia.org/ontology/thumbnail
> {http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cms-newyorkzoologicalsociety1910.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg/200px-Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/R1_white-tailedDeer.jpg/200px-R1_white-tailedDeer.jpg}
> @attribute http://dbpedia.org/ontology/wikiPageExternalLink
> {http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://elephantvoices.org/,http://www.wildchinchillas.org,http://www.slate.com/id/2212232/,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://www.monachus-guardian.org/factfiles/carib01.htm,http://wildlife1.wildlifeinformation.org/000ADOBES/Bears/Bears_IUCN_ActionPlan/bearsAP_chapter8.pdf,http://www.findarticles.com/p/articles/mi_m0ASV/is_1_29/ai_118185263}
> @attribute http://dbpedia.org/ontology/phylum
> {http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Chordata}
> @attribute http://dbpedia.org/ontology/kingdom
> {http://dbpedia.org/resource/Animal}
> @attribute http://dbpedia.org/property/hasPhotoCollection
> {http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Caribbean_Monk_Seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/American_Black_Bear,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Columbian_White-tailed_Deer}
> @attribute http://dbpedia.org/ontology/order
> {http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Artiodactyla}
> @attribute http://dbpedia.org/ontology/class
> {http://dbpedia.org/resource/Mammal}
> @attribute http://dbpedia.org/ontology/family
> {http://dbpedia.org/resource/Elephantidae,http://dbpedia.org/resource/Chinchillidae,http://dbpedia.org/resource/Hominini,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Ursidae,http://dbpedia.org/resource/Muroidea,http://dbpedia.org/resource/Phocidae,http://dbpedia.org/resource/Bear,http://dbpedia.org/resource/Cervidae}
> @attribute http://dbpedia.org/property/lower
> {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/property/upper
> {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/ontology/genus
> {http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Monachus,http://dbpedia.org/resource/Odocoileus}
> @attribute http://dbpedia.org/ontology/binomialAuthority
> {http://dbpedia.org/resource/Carl_Linnaeus,http://dbpedia.org/resource/John_Edward_Gray,http://dbpedia.org/resource/Peter_Simon_Pallas}
> @attribute http://dbpedia.org/property/extinct
> {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/property/subdivision
> {http://dbpedia.org/datatype/second}
> @attribute http://dbpedia.org/property/accessdate
> {http://www.w3.org/2001/XMLSchema#date}
> @attribute http://dbpedia.org/property/downloaded
> {http://www.w3.org/2001/XMLSchema#date}
> @attribute http://dbpedia.org/ontology/species
> {http://dbpedia.org/resource/White-tailed_Deer}
> @attribute http://dbpedia.org/property/id {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/property/year
> {http://www.w3.org/2001/XMLSchema#int}
>
> @data
> http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Mammal,?,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://elephantvoices.org/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Elephantidae,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://www.wildchinchillas.org,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Chinchillidae,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://www.slate.com/id/2212232/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Hominini,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/class/yago/Pinnipeds,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Pinnipedia,http://www.w3.org/2001/XMLSchema#int,http://www.w3.org/2001/XMLSchema#int,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/Scavengers,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://dbpedia.org/resource/Chordata,http://dbpedia.org/resource/Animal,?,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Ursidae,?,?,http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Carl_Linnaeus,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Muroidea,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cm...
>
> Can somebody correct me. I thought this would be the process.
>
> Best Regards
> Noise
>
> 2011/6/27 Bernhard Pfahringer <>:
>> Hi,
>>
>>> The Error i get is:
>>>
>>> weka.core.UnsupportedAttributeTypeException:
>>> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
>>> class!
>>>        at weka.core.Capabilities.test(Capabilities.java:927)
>>>        at weka.core.Capabilities.test(Capabilities.java:1105)
>>>
>>> What am i doing wrong here?
>>>
>>
>> The error message is: "Cannot handle unary class!"
>> So your class attribute has only one value.
>> Info gain needs at least two different possible class values.
>>
>> Bernhard
>>
>> ---------------------------------------------------------------------
>> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
>> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>>
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to:
>> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>
>
>
>
> --
> Mit freundlichen Grüßen
> Diplom Informatiker
> Faraz Fallahi
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
---------------------------------------------------------------------
Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi,

ive found out how to determine the clusterID:

private String getClusterID(Instance inst, Clusterer m_Clusterer) {
try {
if (m_Clusterer instanceof DensityBasedClusterer) {
loglk += ((DensityBasedClusterer)m_Clusterer).
logDensityForInstance(inst);
double[] clubCNum = m_Clusterer.distributionForInstance(inst);
}
else {
double[] clubCNum = m_Clusterer.distributionForInstance(inst);
int i = 0;
while(i if(clubCNum[i]!=0){
return String.valueOf(i);
}
++i;
}
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}

But i dont understand how to add the clusterId to each example to get
to the point to use the lines below without getting the
error:weka.core.UnsupportedAttributeTypeException:
weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
class!
at weka.core.Capabilities.test(Capabilities.java:927

AttributeSelection selection = new AttributeSelection();
Ranker searchMethod=new Ranker();
selection.setSearch(searchMethod);
selection.setEvaluator(new InfoGainAttributeEval());
selection.SelectAttributes(data);
double[][] rankedAttributes = selection.rankedAttributes();

Would you be so kind to help me on this matter?

greetings

2011/6/28 Bernhard Pfahringer <>:
> Hi,
>
> you asked about analyzing clustering results,
> and Mark suggested to add the cluster id to
> each example, before running feature selection.
> But your data below does not include this
> target attribute?
>
> Bernhard
>
> On Tue, Jun 28, 2011 at 8:42 PM, Faraz Fallahi
> <> wrote:
>> oki.. so i am not understanding the procedure in principal. I would
>> like to know the weights of the attributes for a created cluster.
>>
>> My Instance data is:
>> @relation temp_10_40_54
>>
>> @attribute id {http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/American_Black_Bear,http://dbpedia.org/resource/Columbian_White-tailed_Deer}
>> @attribute http://dbpedia.org/property/wikiPageUsesTemplate
>> {http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/resource/Template:IUCN2006}
>> @attribute http://www.w3.org/1999/02/22-rdf-syntax-ns#type
>> {http://dbpedia.org/ontology/Eukaryote,http://dbpedia.org/class/yago/Pinnipeds,http://dbpedia.org/class/yago/Scavengers,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean}
>> @attribute http://dbpedia.org/ontology/thumbnail
>> {http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cms-newyorkzoologicalsociety1910.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg/200px-Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/R1_white-tailedDeer.jpg/200px-R1_white-tailedDeer.jpg}
>> @attribute http://dbpedia.org/ontology/wikiPageExternalLink
>> {http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://elephantvoices.org/,http://www.wildchinchillas.org,http://www.slate.com/id/2212232/,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://www.monachus-guardian.org/factfiles/carib01.htm,http://wildlife1.wildlifeinformation.org/000ADOBES/Bears/Bears_IUCN_ActionPlan/bearsAP_chapter8.pdf,http://www.findarticles.com/p/articles/mi_m0ASV/is_1_29/ai_118185263}
>> @attribute http://dbpedia.org/ontology/phylum
>> {http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Chordata}
>> @attribute http://dbpedia.org/ontology/kingdom
>> {http://dbpedia.org/resource/Animal}
>> @attribute http://dbpedia.org/property/hasPhotoCollection
>> {http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Caribbean_Monk_Seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/American_Black_Bear,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Columbian_White-tailed_Deer}
>> @attribute http://dbpedia.org/ontology/order
>> {http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Artiodactyla}
>> @attribute http://dbpedia.org/ontology/class
>> {http://dbpedia.org/resource/Mammal}
>> @attribute http://dbpedia.org/ontology/family
>> {http://dbpedia.org/resource/Elephantidae,http://dbpedia.org/resource/Chinchillidae,http://dbpedia.org/resource/Hominini,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Ursidae,http://dbpedia.org/resource/Muroidea,http://dbpedia.org/resource/Phocidae,http://dbpedia.org/resource/Bear,http://dbpedia.org/resource/Cervidae}
>> @attribute http://dbpedia.org/property/lower
>> {http://www.w3.org/2001/XMLSchema#int}
>> @attribute http://dbpedia.org/property/upper
>> {http://www.w3.org/2001/XMLSchema#int}
>> @attribute http://dbpedia.org/ontology/genus
>> {http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Monachus,http://dbpedia.org/resource/Odocoileus}
>> @attribute http://dbpedia.org/ontology/binomialAuthority
>> {http://dbpedia.org/resource/Carl_Linnaeus,http://dbpedia.org/resource/John_Edward_Gray,http://dbpedia.org/resource/Peter_Simon_Pallas}
>> @attribute http://dbpedia.org/property/extinct
>> {http://www.w3.org/2001/XMLSchema#int}
>> @attribute http://dbpedia.org/property/subdivision
>> {http://dbpedia.org/datatype/second}
>> @attribute http://dbpedia.org/property/accessdate
>> {http://www.w3.org/2001/XMLSchema#date}
>> @attribute http://dbpedia.org/property/downloaded
>> {http://www.w3.org/2001/XMLSchema#date}
>> @attribute http://dbpedia.org/ontology/species
>> {http://dbpedia.org/resource/White-tailed_Deer}
>> @attribute http://dbpedia.org/property/id {http://www.w3.org/2001/XMLSchema#int}
>> @attribute http://dbpedia.org/property/year
>> {http://www.w3.org/2001/XMLSchema#int}
>>
>> @data
>> http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Mammal,?,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://elephantvoices.org/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Elephantidae,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://www.wildchinchillas.org,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Chinchillidae,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://www.slate.com/id/2212232/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Hominini,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/class/yago/Pinnipeds,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Pinnipedia,http://www.w3.org/2001/XMLSchema#int,http://www.w3.org/2001/XMLSchema#int,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/Scavengers,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://dbpedia.org/resource/Chordata,http://dbpedia.org/resource/Animal,?,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Ursidae,?,?,http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Carl_Linnaeus,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Muroidea,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cm...
>>
>> Can somebody correct me. I thought this would be the process.
>>
>> Best Regards
>> Noise
>>
>> 2011/6/27 Bernhard Pfahringer <>:
>>> Hi,
>>>
>>>> The Error i get is:
>>>>
>>>> weka.core.UnsupportedAttributeTypeException:
>>>> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
>>>> class!
>>>>        at weka.core.Capabilities.test(Capabilities.java:927)
>>>>        at weka.core.Capabilities.test(Capabilities.java:1105)
>>>>
>>>> What am i doing wrong here?
>>>>
>>>
>>> The error message is: "Cannot handle unary class!"
>>> So your class attribute has only one value.
>>> Info gain needs at least two different possible class values.
>>>
>>> Bernhard
>>>
>>> ---------------------------------------------------------------------
>>> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
>>> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>>>
>>> _______________________________________________
>>> Wekalist mailing list
>>> Send posts to:
>>> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>>
>>
>>
>>
>> --
>> Mit freundlichen Grüßen
>> Diplom Informatiker
>> Faraz Fallahi
>>
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to:
>> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>
>
>
>
> --
> ---------------------------------------------------------------------
> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 10/07/11 8:41 PM, Faraz Fallahi wrote:
> Hi,
>
> ive found out how to determine the clusterID:
>
> private String getClusterID(Instance inst, Clusterer m_Clusterer) {
> try {
> if (m_Clusterer instanceof DensityBasedClusterer) {
> loglk += ((DensityBasedClusterer)m_Clusterer).
> logDensityForInstance(inst);
> double[] clubCNum = m_Clusterer.distributionForInstance(inst);
> }
> else {
> double[] clubCNum = m_Clusterer.distributionForInstance(inst);
> int i = 0;
> while(i > if(clubCNum[i]!=0){
> return String.valueOf(i);
> }
> ++i;
> }
> }
> } catch (Exception e) {
> e.printStackTrace();
> }
> return null;
> }
>
> But i dont understand how to add the clusterId to each example to get
> to the point to use the lines below without getting the
> error:weka.core.UnsupportedAttributeTypeException:
> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
> class!

The easiest thing to do is to use the AddCluster filter to add the
cluster assignment for you. See the Wiki pages on how to use filters in
your java programs.

Cheers,
Mark.

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

  #11  
12-07-2011 10:26 AM
Wekalist member admin is online now
User
 

Hi,

i am using the hierarchical clusterer and/or the simplekmeans
algorithm. I would love to know which features are the significant
ones that lead to the creation of a cluster.
How can i get the information gain /gain ratio for the features of a cluster?

greez

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 20/06/11 11:24 PM, Faraz Fallahi wrote:
> Hi,
>
> i am using the hierarchical clusterer and/or the simplekmeans
> algorithm. I would love to know which features are the significant
> ones that lead to the creation of a cluster.
> How can i get the information gain /gain ratio for the features of a cluster?

You can create a dataset that includes the cluster labels (either save
the data out of the visualization of clusters in the Explorer or use the
AddCluster filter to add the cluster labels) and then use information
gain or gain ratio feature evaluation in the select attributes panel of
the Explorer.

Cheers,
Mark.


_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thank you very much for your answer, but i need the developers guide
to this problem. i have wrapped weka for my studies and would like to
call the corresponding code on that. can u give me a hin or maybe
there is a code snippet somewhere to that topic?

greez

2011/6/22 Mark Hall <>:
> On 20/06/11 11:24 PM, Faraz Fallahi wrote:
>>
>> Hi,
>>
>> i am using the hierarchical clusterer and/or the simplekmeans
>> algorithm. I would love to know which features are the significant
>> ones that lead to the creation of a cluster.
>> How can i get the information gain /gain ratio for the features of a
>> cluster?
>
> You can create a dataset that includes the cluster labels (either save the
> data out of the visualization of clusters in the Explorer or use the
> AddCluster filter to add the cluster labels) and then use information gain
> or gain ratio feature evaluation in the select attributes panel of the
> Explorer.
>
> Cheers,
> Mark.
>
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 23/06/11 5:56 AM, Faraz Fallahi wrote:
> Hi Mark,
>
> thank you very much for your answer, but i need the developers guide
> to this problem. i have wrapped weka for my studies and would like to
> call the corresponding code on that. can u give me a hin or maybe
> there is a code snippet somewhere to that topic?

See this Wiki article (particularly the "Low level" subsection under
"Attribute selection"):

http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection

In the AttributeSelection class there is an additional method to get
individual attribute merit scores when an attribute evaluator and ranker
search are being used:

/**
* get the final ranking of the attributes.
* @return a two dimensional array of ranked attribute indexes and their
* associated merit scores as doubles.
* @exception Exception if a ranking has not been produced
*/
public double [][] rankedAttributes () throws Exception {
if (m_attributeRanking == null) {
throw new Exception("Ranking has not been performed");
}
return m_attributeRanking;
}

Cheers,
Mark.

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi Mark,

thx for the help. but im still stuck at a point:
My function:
private void evalAttributes(Instances data) throws Exception {
System.out.println("Evaluation");
AttributeSelection selection = new AttributeSelection();
Ranker searchMethod=new Ranker();
selection.setSearch(searchMethod);
selection.setEvaluator(new InfoGainAttributeEval());
selection.SelectAttributes(data);
double[][] rankedAttributes = selection.rankedAttributes();
String Results = selection.toResultsString();
System.out.println(Results);
....
..


The Error i get is:

weka.core.UnsupportedAttributeTypeException:
weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
class!
at weka.core.Capabilities.test(Capabilities.java:927)
at weka.core.Capabilities.test(Capabilities.java:1105)

What am i doing wrong here?

greetings


2011/6/23 Mark Hall <>:
> On 23/06/11 5:56 AM, Faraz Fallahi wrote:
>>
>> Hi Mark,
>>
>> thank you very much for your answer, but i need the developers guide
>> to this problem. i have wrapped weka for my studies and would like to
>> call the corresponding code on that. can u give me a hin or maybe
>> there is a code snippet somewhere to that topic?
>
> See this Wiki article (particularly the "Low level" subsection under
> "Attribute selection"):
>
> http://weka.wikispaces.com/Use+Weka+in+your+Java+code#Attribute selection
>
> In the AttributeSelection class there is an additional method to get
> individual attribute merit scores when an attribute evaluator and ranker
> search are being used:
>
>  /**
>   * get the final ranking of the attributes.
>   * @return a two dimensional array of ranked attribute indexes and their
>   * associated merit scores as doubles.
>   * @exception Exception if a ranking has not been produced
>   */
>  public double [][] rankedAttributes () throws Exception {
>    if (m_attributeRanking == null) {
>      throw new Exception("Ranking has not been performed");
>    }
>    return m_attributeRanking;
>  }
>
> Cheers,
> Mark.
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi,

> The Error i get is:
>
> weka.core.UnsupportedAttributeTypeException:
> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
> class!
>        at weka.core.Capabilities.test(Capabilities.java:927)
>        at weka.core.Capabilities.test(Capabilities.java:1105)
>
> What am i doing wrong here?
>

The error message is: "Cannot handle unary class!"
So your class attribute has only one value.
Info gain needs at least two different possible class values.

Bernhard

---------------------------------------------------------------------
Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
oki.. so i am not understanding the procedure in principal. I would
like to know the weights of the attributes for a created cluster.

My Instance data is:
@relation temp_10_40_54

@attribute id {http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/American_Black_Bear,http://dbpedia.org/resource/Columbian_White-tailed_Deer}
@attribute http://dbpedia.org/property/wikiPageUsesTemplate
{http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/resource/Template:IUCN2006}
@attribute http://www.w3.org/1999/02/22-rdf-syntax-ns#type
{http://dbpedia.org/ontology/Eukaryote,http://dbpedia.org/class/yago/Pinnipeds,http://dbpedia.org/class/yago/Scavengers,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean}
@attribute http://dbpedia.org/ontology/thumbnail
{http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cms-newyorkzoologicalsociety1910.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg/200px-Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/R1_white-tailedDeer.jpg/200px-R1_white-tailedDeer.jpg}
@attribute http://dbpedia.org/ontology/wikiPageExternalLink
{http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://elephantvoices.org/,http://www.wildchinchillas.org,http://www.slate.com/id/2212232/,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://www.monachus-guardian.org/factfiles/carib01.htm,http://wildlife1.wildlifeinformation.org/000ADOBES/Bears/Bears_IUCN_ActionPlan/bearsAP_chapter8.pdf,http://www.findarticles.com/p/articles/mi_m0ASV/is_1_29/ai_118185263}
@attribute http://dbpedia.org/ontology/phylum
{http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Chordata}
@attribute http://dbpedia.org/ontology/kingdom
{http://dbpedia.org/resource/Animal}
@attribute http://dbpedia.org/property/hasPhotoCollection
{http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Caribbean_Monk_Seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/American_Black_Bear,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Columbian_White-tailed_Deer}
@attribute http://dbpedia.org/ontology/order
{http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Artiodactyla}
@attribute http://dbpedia.org/ontology/class
{http://dbpedia.org/resource/Mammal}
@attribute http://dbpedia.org/ontology/family
{http://dbpedia.org/resource/Elephantidae,http://dbpedia.org/resource/Chinchillidae,http://dbpedia.org/resource/Hominini,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Ursidae,http://dbpedia.org/resource/Muroidea,http://dbpedia.org/resource/Phocidae,http://dbpedia.org/resource/Bear,http://dbpedia.org/resource/Cervidae}
@attribute http://dbpedia.org/property/lower
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/upper
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/ontology/genus
{http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Monachus,http://dbpedia.org/resource/Odocoileus}
@attribute http://dbpedia.org/ontology/binomialAuthority
{http://dbpedia.org/resource/Carl_Linnaeus,http://dbpedia.org/resource/John_Edward_Gray,http://dbpedia.org/resource/Peter_Simon_Pallas}
@attribute http://dbpedia.org/property/extinct
{http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/subdivision
{http://dbpedia.org/datatype/second}
@attribute http://dbpedia.org/property/accessdate
{http://www.w3.org/2001/XMLSchema#date}
@attribute http://dbpedia.org/property/downloaded
{http://www.w3.org/2001/XMLSchema#date}
@attribute http://dbpedia.org/ontology/species
{http://dbpedia.org/resource/White-tailed_Deer}
@attribute http://dbpedia.org/property/id {http://www.w3.org/2001/XMLSchema#int}
@attribute http://dbpedia.org/property/year
{http://www.w3.org/2001/XMLSchema#int}

@data
http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Mammal,?,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://elephantvoices.org/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Elephantidae,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://www.wildchinchillas.org,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Chinchillidae,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://www.slate.com/id/2212232/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Hominini,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/class/yago/Pinnipeds,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Pinnipedia,http://www.w3.org/2001/XMLSchema#int,http://www.w3.org/2001/XMLSchema#int,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/Scavengers,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://dbpedia.org/resource/Chordata,http://dbpedia.org/resource/Animal,?,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Ursidae,?,?,http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Carl_Linnaeus,?,?,?,?,?,?,?
http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Muroidea,?,?,?,?,?,?,?,?,?,?,?
http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cm...

Can somebody correct me. I thought this would be the process.

Best Regards
Noise

2011/6/27 Bernhard Pfahringer <>:
> Hi,
>
>> The Error i get is:
>>
>> weka.core.UnsupportedAttributeTypeException:
>> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
>> class!
>>        at weka.core.Capabilities.test(Capabilities.java:927)
>>        at weka.core.Capabilities.test(Capabilities.java:1105)
>>
>> What am i doing wrong here?
>>
>
> The error message is: "Cannot handle unary class!"
> So your class attribute has only one value.
> Info gain needs at least two different possible class values.
>
> Bernhard
>
> ---------------------------------------------------------------------
> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi,

you asked about analyzing clustering results,
and Mark suggested to add the cluster id to
each example, before running feature selection.
But your data below does not include this
target attribute?

Bernhard

On Tue, Jun 28, 2011 at 8:42 PM, Faraz Fallahi
<> wrote:
> oki.. so i am not understanding the procedure in principal. I would
> like to know the weights of the attributes for a created cluster.
>
> My Instance data is:
> @relation temp_10_40_54
>
> @attribute id {http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/American_Black_Bear,http://dbpedia.org/resource/Columbian_White-tailed_Deer}
> @attribute http://dbpedia.org/property/wikiPageUsesTemplate
> {http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/resource/Template:IUCN2006}
> @attribute http://www.w3.org/1999/02/22-rdf-syntax-ns#type
> {http://dbpedia.org/ontology/Eukaryote,http://dbpedia.org/class/yago/Pinnipeds,http://dbpedia.org/class/yago/Scavengers,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean}
> @attribute http://dbpedia.org/ontology/thumbnail
> {http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cms-newyorkzoologicalsociety1910.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg/200px-Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/R1_white-tailedDeer.jpg/200px-R1_white-tailedDeer.jpg}
> @attribute http://dbpedia.org/ontology/wikiPageExternalLink
> {http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://elephantvoices.org/,http://www.wildchinchillas.org,http://www.slate.com/id/2212232/,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://www.monachus-guardian.org/factfiles/carib01.htm,http://wildlife1.wildlifeinformation.org/000ADOBES/Bears/Bears_IUCN_ActionPlan/bearsAP_chapter8.pdf,http://www.findarticles.com/p/articles/mi_m0ASV/is_1_29/ai_118185263}
> @attribute http://dbpedia.org/ontology/phylum
> {http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Chordata}
> @attribute http://dbpedia.org/ontology/kingdom
> {http://dbpedia.org/resource/Animal}
> @attribute http://dbpedia.org/property/hasPhotoCollection
> {http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Caribbean_Monk_Seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/American_Black_Bear,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Columbian_White-tailed_Deer}
> @attribute http://dbpedia.org/ontology/order
> {http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Artiodactyla}
> @attribute http://dbpedia.org/ontology/class
> {http://dbpedia.org/resource/Mammal}
> @attribute http://dbpedia.org/ontology/family
> {http://dbpedia.org/resource/Elephantidae,http://dbpedia.org/resource/Chinchillidae,http://dbpedia.org/resource/Hominini,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Ursidae,http://dbpedia.org/resource/Muroidea,http://dbpedia.org/resource/Phocidae,http://dbpedia.org/resource/Bear,http://dbpedia.org/resource/Cervidae}
> @attribute http://dbpedia.org/property/lower
> {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/property/upper
> {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/ontology/genus
> {http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Monachus,http://dbpedia.org/resource/Odocoileus}
> @attribute http://dbpedia.org/ontology/binomialAuthority
> {http://dbpedia.org/resource/Carl_Linnaeus,http://dbpedia.org/resource/John_Edward_Gray,http://dbpedia.org/resource/Peter_Simon_Pallas}
> @attribute http://dbpedia.org/property/extinct
> {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/property/subdivision
> {http://dbpedia.org/datatype/second}
> @attribute http://dbpedia.org/property/accessdate
> {http://www.w3.org/2001/XMLSchema#date}
> @attribute http://dbpedia.org/property/downloaded
> {http://www.w3.org/2001/XMLSchema#date}
> @attribute http://dbpedia.org/ontology/species
> {http://dbpedia.org/resource/White-tailed_Deer}
> @attribute http://dbpedia.org/property/id {http://www.w3.org/2001/XMLSchema#int}
> @attribute http://dbpedia.org/property/year
> {http://www.w3.org/2001/XMLSchema#int}
>
> @data
> http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Mammal,?,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://elephantvoices.org/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Elephantidae,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://www.wildchinchillas.org,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Chinchillidae,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://www.slate.com/id/2212232/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Hominini,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/class/yago/Pinnipeds,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Pinnipedia,http://www.w3.org/2001/XMLSchema#int,http://www.w3.org/2001/XMLSchema#int,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/Scavengers,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://dbpedia.org/resource/Chordata,http://dbpedia.org/resource/Animal,?,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Ursidae,?,?,http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Carl_Linnaeus,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Muroidea,?,?,?,?,?,?,?,?,?,?,?
> http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cm...
>
> Can somebody correct me. I thought this would be the process.
>
> Best Regards
> Noise
>
> 2011/6/27 Bernhard Pfahringer <>:
>> Hi,
>>
>>> The Error i get is:
>>>
>>> weka.core.UnsupportedAttributeTypeException:
>>> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
>>> class!
>>>        at weka.core.Capabilities.test(Capabilities.java:927)
>>>        at weka.core.Capabilities.test(Capabilities.java:1105)
>>>
>>> What am i doing wrong here?
>>>
>>
>> The error message is: "Cannot handle unary class!"
>> So your class attribute has only one value.
>> Info gain needs at least two different possible class values.
>>
>> Bernhard
>>
>> ---------------------------------------------------------------------
>> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
>> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>>
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to:
>> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>
>
>
>
> --
> Mit freundlichen Grüßen
> Diplom Informatiker
> Faraz Fallahi
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
---------------------------------------------------------------------
Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi,

ive found out how to determine the clusterID:

private String getClusterID(Instance inst, Clusterer m_Clusterer) {
try {
if (m_Clusterer instanceof DensityBasedClusterer) {
loglk += ((DensityBasedClusterer)m_Clusterer).
logDensityForInstance(inst);
double[] clubCNum = m_Clusterer.distributionForInstance(inst);
}
else {
double[] clubCNum = m_Clusterer.distributionForInstance(inst);
int i = 0;
while(i if(clubCNum[i]!=0){
return String.valueOf(i);
}
++i;
}
}
} catch (Exception e) {
e.printStackTrace();
}
return null;
}

But i dont understand how to add the clusterId to each example to get
to the point to use the lines below without getting the
error:weka.core.UnsupportedAttributeTypeException:
weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
class!
at weka.core.Capabilities.test(Capabilities.java:927

AttributeSelection selection = new AttributeSelection();
Ranker searchMethod=new Ranker();
selection.setSearch(searchMethod);
selection.setEvaluator(new InfoGainAttributeEval());
selection.SelectAttributes(data);
double[][] rankedAttributes = selection.rankedAttributes();

Would you be so kind to help me on this matter?

greetings

2011/6/28 Bernhard Pfahringer <>:
> Hi,
>
> you asked about analyzing clustering results,
> and Mark suggested to add the cluster id to
> each example, before running feature selection.
> But your data below does not include this
> target attribute?
>
> Bernhard
>
> On Tue, Jun 28, 2011 at 8:42 PM, Faraz Fallahi
> <> wrote:
>> oki.. so i am not understanding the procedure in principal. I would
>> like to know the weights of the attributes for a created cluster.
>>
>> My Instance data is:
>> @relation temp_10_40_54
>>
>> @attribute id {http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/American_Black_Bear,http://dbpedia.org/resource/Columbian_White-tailed_Deer}
>> @attribute http://dbpedia.org/property/wikiPageUsesTemplate
>> {http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/resource/Template:IUCN2006}
>> @attribute http://www.w3.org/1999/02/22-rdf-syntax-ns#type
>> {http://dbpedia.org/ontology/Eukaryote,http://dbpedia.org/class/yago/Pinnipeds,http://dbpedia.org/class/yago/Scavengers,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean}
>> @attribute http://dbpedia.org/ontology/thumbnail
>> {http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cms-newyorkzoologicalsociety1910.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/6/6e/Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg/200px-Canadian_Rockies_-_the_bear_at_Lake_Louise.jpg,http://upload.wikimedia.org/wikipedia/commons/thumb/1/14/R1_white-tailedDeer.jpg/200px-R1_white-tailedDeer.jpg}
>> @attribute http://dbpedia.org/ontology/wikiPageExternalLink
>> {http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://elephantvoices.org/,http://www.wildchinchillas.org,http://www.slate.com/id/2212232/,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://www.monachus-guardian.org/factfiles/carib01.htm,http://wildlife1.wildlifeinformation.org/000ADOBES/Bears/Bears_IUCN_ActionPlan/bearsAP_chapter8.pdf,http://www.findarticles.com/p/articles/mi_m0ASV/is_1_29/ai_118185263}
>> @attribute http://dbpedia.org/ontology/phylum
>> {http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Chordata}
>> @attribute http://dbpedia.org/ontology/kingdom
>> {http://dbpedia.org/resource/Animal}
>> @attribute http://dbpedia.org/property/hasPhotoCollection
>> {http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Caribbean_Monk_Seal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/American_Black_Bear,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Columbian_White-tailed_Deer}
>> @attribute http://dbpedia.org/ontology/order
>> {http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Artiodactyla}
>> @attribute http://dbpedia.org/ontology/class
>> {http://dbpedia.org/resource/Mammal}
>> @attribute http://dbpedia.org/ontology/family
>> {http://dbpedia.org/resource/Elephantidae,http://dbpedia.org/resource/Chinchillidae,http://dbpedia.org/resource/Hominini,http://dbpedia.org/resource/Pinnipedia,http://dbpedia.org/resource/Ursidae,http://dbpedia.org/resource/Muroidea,http://dbpedia.org/resource/Phocidae,http://dbpedia.org/resource/Bear,http://dbpedia.org/resource/Cervidae}
>> @attribute http://dbpedia.org/property/lower
>> {http://www.w3.org/2001/XMLSchema#int}
>> @attribute http://dbpedia.org/property/upper
>> {http://www.w3.org/2001/XMLSchema#int}
>> @attribute http://dbpedia.org/ontology/genus
>> {http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Monachus,http://dbpedia.org/resource/Odocoileus}
>> @attribute http://dbpedia.org/ontology/binomialAuthority
>> {http://dbpedia.org/resource/Carl_Linnaeus,http://dbpedia.org/resource/John_Edward_Gray,http://dbpedia.org/resource/Peter_Simon_Pallas}
>> @attribute http://dbpedia.org/property/extinct
>> {http://www.w3.org/2001/XMLSchema#int}
>> @attribute http://dbpedia.org/property/subdivision
>> {http://dbpedia.org/datatype/second}
>> @attribute http://dbpedia.org/property/accessdate
>> {http://www.w3.org/2001/XMLSchema#date}
>> @attribute http://dbpedia.org/property/downloaded
>> {http://www.w3.org/2001/XMLSchema#date}
>> @attribute http://dbpedia.org/ontology/species
>> {http://dbpedia.org/resource/White-tailed_Deer}
>> @attribute http://dbpedia.org/property/id {http://www.w3.org/2001/XMLSchema#int}
>> @attribute http://dbpedia.org/property/year
>> {http://www.w3.org/2001/XMLSchema#int}
>>
>> @data
>> http://dbpedia.org/resource/Armadillo,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/b/b4/Nine-banded_Armadillo.jpg/200px-Nine-banded_Armadillo.jpg,http://seabed.nationalgeographic.com/splat_ngx_pathfinder/templates/output/articles/gallery.tmpl?DB_NUM_PARAMS=2&DB_PARAM_0=0503&DB_PARAM_1=2,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Armadillo,http://dbpedia.org/resource/Xenarthra,http://dbpedia.org/resource/Mammal,?,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/African_elephant,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/59/Serengeti_Elefantenbulle.jpg/200px-Serengeti_Elefantenbulle.jpg,http://elephantvoices.org/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/African_elephant,http://dbpedia.org/resource/Proboscidea,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Elephantidae,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Chinchilla,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/5/5f/Standardchinchilla.jpg/200px-Standardchinchilla.jpg,http://www.wildchinchillas.org,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chinchilla,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Chinchillidae,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Chimpanzee,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/8/8b/Schimpanse_zoo-leipig.jpg/200px-Schimpanse_zoo-leipig.jpg,http://www.slate.com/id/2212232/,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Chimpanzee,http://dbpedia.org/resource/Primates,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Hominini,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Eared_seal,http://dbpedia.org/resource/Template:DentalFormula,http://dbpedia.org/class/yago/Pinnipeds,http://upload.wikimedia.org/wikipedia/commons/thumb/e/e4/Neophoca_cinerea.JPG/200px-Neophoca_cinerea.JPG,http://www.answers.com/topic/eared-seals-fur-seals-and-sea-lions-otariidae-biological-family?cat=technology,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Eared_seal,http://dbpedia.org/resource/Caniformia,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Pinnipedia,http://www.w3.org/2001/XMLSchema#int,http://www.w3.org/2001/XMLSchema#int,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Brown_Bear,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/Scavengers,http://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Brown_bear.jpg/200px-Brown_bear.jpg,http://www3.nationalgeographic.com/animals/mammals/brown-bear.html,http://dbpedia.org/resource/Chordata,http://dbpedia.org/resource/Animal,?,http://dbpedia.org/resource/Carnivora,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Ursidae,?,?,http://dbpedia.org/resource/Ursus_(genus),http://dbpedia.org/resource/Carl_Linnaeus,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Peromyscus,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/ontology/Eukaryote,http://upload.wikimedia.org/wikipedia/commons/thumb/3/33/DiGangi-Deermouse.jpg/200px-DiGangi-Deermouse.jpg,http://www.doh.wa.gov/EHSPHL/factsheet/hanta.htm,http://dbpedia.org/resource/Chordate,http://dbpedia.org/resource/Animal,http://www4.wiwiss.fu-berlin.de/flickrwrappr/photos/Peromyscus,http://dbpedia.org/resource/Rodent,http://dbpedia.org/resource/Mammal,http://dbpedia.org/resource/Muroidea,?,?,?,?,?,?,?,?,?,?,?
>> http://dbpedia.org/resource/Caribbean_Monk_Seal,http://dbpedia.org/resource/Template:Taxobox,http://dbpedia.org/class/yago/ExtinctAnimalsOfTheCaribbean,http://upload.wikimedia.org/wikipedia/commons/thumb/2/21/Cms-newyorkzoologicalsociety1910.jpg/200px-Cm...
>>
>> Can somebody correct me. I thought this would be the process.
>>
>> Best Regards
>> Noise
>>
>> 2011/6/27 Bernhard Pfahringer <>:
>>> Hi,
>>>
>>>> The Error i get is:
>>>>
>>>> weka.core.UnsupportedAttributeTypeException:
>>>> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
>>>> class!
>>>>        at weka.core.Capabilities.test(Capabilities.java:927)
>>>>        at weka.core.Capabilities.test(Capabilities.java:1105)
>>>>
>>>> What am i doing wrong here?
>>>>
>>>
>>> The error message is: "Cannot handle unary class!"
>>> So your class attribute has only one value.
>>> Info gain needs at least two different possible class values.
>>>
>>> Bernhard
>>>
>>> ---------------------------------------------------------------------
>>> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
>>> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>>>
>>> _______________________________________________
>>> Wekalist mailing list
>>> Send posts to:
>>> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
>>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>>
>>
>>
>>
>> --
>> Mit freundlichen Grüßen
>> Diplom Informatiker
>> Faraz Fallahi
>>
>> _______________________________________________
>> Wekalist mailing list
>> Send posts to:
>> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
>> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>>
>
>
>
> --
> ---------------------------------------------------------------------
> Bernhard Pfahringer, Dept. of Computer Science, University of Waikato
> http://www.cs.waikato.ac.nz/~bernhard                  +64 7 838 4041
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
On 10/07/11 8:41 PM, Faraz Fallahi wrote:
> Hi,
>
> ive found out how to determine the clusterID:
>
> private String getClusterID(Instance inst, Clusterer m_Clusterer) {
> try {
> if (m_Clusterer instanceof DensityBasedClusterer) {
> loglk += ((DensityBasedClusterer)m_Clusterer).
> logDensityForInstance(inst);
> double[] clubCNum = m_Clusterer.distributionForInstance(inst);
> }
> else {
> double[] clubCNum = m_Clusterer.distributionForInstance(inst);
> int i = 0;
> while(i > if(clubCNum[i]!=0){
> return String.valueOf(i);
> }
> ++i;
> }
> }
> } catch (Exception e) {
> e.printStackTrace();
> }
> return null;
> }
>
> But i dont understand how to add the clusterId to each example to get
> to the point to use the lines below without getting the
> error:weka.core.UnsupportedAttributeTypeException:
> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
> class!

The easiest thing to do is to use the AddCluster filter to add the
cluster assignment for you. See the Wiki pages on how to use filters in
your java programs.

Cheers,
Mark.

_______________________________________________
Wekalist mailing list
Send posts to:
List info and subscription status: https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
List etiquette: http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
)
Hi

AddCluster f = new AddCluster();
f.setClusterer(em);
f.setInputFormat(data);
Instances clusterIdData = Filter.useFilter(data, f);
for (int i=0; i {
Instance row = clusterIdData.instance(i);
int attrCount = row.numAttributes();
Attribute att = row.attribute(attrCount-1);
System.out.println("Row "+i+" "+"Cluster "
+row.stringValue(attrCount-1));
}

works perfekt thx :)

greez

2011/7/12 Mark Hall <>:
> On 10/07/11 8:41 PM, Faraz Fallahi wrote:
>>
>> Hi,
>>
>> ive found out how to determine the clusterID:
>>
>> private String getClusterID(Instance inst, Clusterer m_Clusterer) {
>>                 try {
>>                         if (m_Clusterer instanceof DensityBasedClusterer)
>> {
>>                                 loglk +=
>> ((DensityBasedClusterer)m_Clusterer).
>>                                 logDensityForInstance(inst);
>>                                 double[] clubCNum =
>> m_Clusterer.distributionForInstance(inst);
>>                         }
>>                         else {
>>                                 double[] clubCNum =
>> m_Clusterer.distributionForInstance(inst);
>>                                 int i = 0;
>>                                 while(i >>                                         if(clubCNum[i]!=0){
>>                                                 return String.valueOf(i);
>>                                         }
>>                                         ++i;
>>                                 }
>>                         }
>>                 } catch (Exception e) {
>>                         e.printStackTrace();
>>                 }
>>                 return null;
>>         }
>>
>> But i dont understand how to add the clusterId to each example to get
>> to the point to use the lines below without getting the
>> error:weka.core.UnsupportedAttributeTypeException:
>> weka.attributeSelection.InfoGainAttributeEval: Cannot handle unary
>> class!
>
> The easiest thing to do is to use the AddCluster filter to add the cluster
> assignment for you. See the Wiki pages on how to use filters in your java
> programs.
>
> Cheers,
> Mark.
>
> _______________________________________________
> Wekalist mailing list
> Send posts to:
> List info and subscription status:
> https://list.scms.waikato.ac.nz/mailman/listinfo/wekalist
> List etiquette:
> http://www.cs.waikato.ac.nz/~ml/weka/mailinglist_etiquette.html
>



--
Mit freundlichen Grüßen
Diplom Informatiker
Faraz Fallahi

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





NewsArc Lists  |  Culture Pages   |  Computing Archive  |  Media-Pages
Link to this page on your blog or website by copying the HTML code below and pasting it into your site: