Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

******Please do not import anything else, thank you! import java.util.LinkedList; /** * This method splits the virtual dataset over a nominal attribute. This process *

******Please do not import anything else, thank you!

import java.util.LinkedList;

/**

* This method splits the virtual dataset over a nominal attribute. This process

* has been discussed and exemplified in detail in the assignment description.

*

* @param attributeIndex is the index of the nominal attribute over which we

* want to split.

* @return a set (array) of partitions resulting from the split. The partitions

* will no longer contain the attribute over which we performed the

* split.

*/

public VirtualDataSet[] partitionByNominallAttribute(int attributeIndex) {

// WRITE YOUR CODE HERE!

//Remove the following line when this method has been implemented

return null;

}image text in transcribed

Task 4.3*. Complete partitionByNominalAttribute(...). This method splits a (virtual) dataset over a

given nominal attribute. We elaborated what splitting over an attribute means earlier in the description.

Notice that, for a nominal attribute, you will have as many partitions as there are values in the (unique) value

set of the given attribute. This was already illustrated in Figure 5

Original Dataset S outlook temperature umidity windy class sunny het high FALSEN sunnot high TRUE TO overcast high FALSE luss rainy mild High FA FALSE rainy cool normal FALSE yes rainy cal normal TRUE no overcast cool normal TRUE yes sunny Imild highALSE no FALSE sunny cool normal FALSE les ny mild normal FALSE normal TRUE Ives mild overcast her normal FALSE yes rainy Ins TRUE no TRUE Les outlook=rainy outlook=overcast outlook-sunny outlook class yes yes sunny sunny sunny sunny sunny temperature humidity cool normal mild normal hot high hot high mild high windy FALSE TRUE FALSE TRUE FALSE outlook overcast overcast overcast overcast temperature humidity hot high cool normal mild high hot normal windy class FALSE lyes TRUE yes TRUE yes FALSE yes outlook rainy rainy rainy rainy rainy temperature humidity mild high cool normal mild normal cool normal mild high windy class FALSE yes FALSE yes FALSE yes TRUE no TRUE no no no no Figure 5: The result of splitting the dataset of Figure 1 over "outlook; in the three resulting partitions, the outlook column is shaded red, indicating that the outlook attribute is dropped from the partitions

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Graph Databases In Action

Authors: Dave Bechberger, Josh Perryman

1st Edition

1617296376, 978-1617296376

More Books

Students also viewed these Databases questions

Question

1.who the father of Ayurveda? 2. Who the father of taxonomy?

Answered: 1 week ago

Question

Commen Name with scientific name Tiger - Wolf- Lion- Cat- Dog-

Answered: 1 week ago

Question

=+ What is the role of government in bargaining?

Answered: 1 week ago

Question

=+ Who is the negotiation partner at company level?

Answered: 1 week ago

Question

=+Which associations exist?

Answered: 1 week ago