Question
import java.util.LinkedList; * This method splits the virtual dataset over a given numeric attribute at a * specific value from the value set of that
import java.util.LinkedList;
* This method splits the virtual dataset over a given numeric attribute at a
* specific value from the value set of that attribute. This process has been
* discussed and exemplified in detail in the assignment description.
*
* @param attributeIndex is the index of the numeric attribute over which we
* want to split.
* @param valueIndex is the index of the value (in the value set of the
* attribute of interest) to use for splitting
* @return a pair of partitions (VirtualDataSet array of length two) resulting
* from the two-way split. Note that the partitions will retain the
* attribute over which we perform the split. This is in contrast to
* splitting over a nominal, where the split attribute disappears from
* the partitions.
*/
public VirtualDataSet[] partitionByNumericAttribute(int attributeIndex, int valueIndex) {
// WRITE YOUR CODE HERE!
//Remove the following line when this method has been implemented
return null;
}
Task 4.4*. Complete partitionByNumericAttribute(...). This method splits a (virtual) dataset over a given numeric attribute and at a given value. This too was elaborated earlier in the description. Notice that, once you have implemented the partitionByNominalAttribute(...) method above, partitionByNumericAttribute(...) is going to be a relatively easy adaptation. Here, there will always be two partitions, as already illustrated in Figure
***Please do not import anything else Thank you!
The dataset has been sorted by ascending humidity to make the resulting partitions easier to visualize. play yes no P1 outlook overcast rainy sunny sunny overcast rainy rainy sunny overcast sunny overcast rainy sunny rainy temperature humidity 64 65 65 70 69 70 75 70 81 75 68 80 75 80 85 85 83 86 80 90 72 90 71 91 72 95 70 96 windy TRUE TRUE FALSE TRUE FALSE FALSE FALSE FALSE FALSE TRUE TRUE TRUE FALSE FALSE yes yes yes yes no yes no yes noStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started