0% found this document useful (0 votes)
25 views

WEKA Lab Questions Answers Corrected

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views

WEKA Lab Questions Answers Corrected

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 3

1.

Perform data preprocessing tasks using labor data set in WEKA

Aim:

To preprocess the labor dataset in WEKA for analysis.

Procedure:

1. Open WEKA and load the 'labor.arff' dataset.

2. Check the data in the 'Preprocess' tab.

3. Apply the 'ReplaceMissingValues' filter to handle missing data.

4. Normalize numeric attributes using the 'Normalize' filter.

5. Save the preprocessed dataset.

Sample Output:

Before Preprocessing:

+-----------+--------------+

| Attribute | Missing (%) |

+-----------+--------------+

| Age | 10% |

| Salary | 5% |

+-----------+--------------+

After Preprocessing:

+-----------+--------------+

| Attribute | Missing (%) |

+-----------+--------------+

| Age | 0% |

| Salary | 0% |
+-----------+--------------+

Result:

The labor dataset is cleaned and normalized.

2. Create scatterplots and histograms using visualize option to detect outliers in WEKA

Aim:

To visualize data using scatterplots and histograms in WEKA to detect outliers.

Procedure:

1. Load the dataset in WEKA.

2. Go to the 'Visualize' tab.

3. Select attributes (e.g., Age and Salary) for scatterplot.

4. Generate a histogram for a single attribute.

5. Identify outliers based on deviating data points.

Sample Output:

Scatterplot:

- Outliers are visible as isolated points away from clusters.

Histogram:

- Bins showing skewed frequency distribution for 'Age'.

Result:

Outliers are identified using scatterplots and histograms.

10. Implement classification of data using K-Nearest Neighbor in WEKA


Aim:

To classify data using K-Nearest Neighbor (KNN) in WEKA.

Procedure:

1. Load the 'iris.arff' dataset into WEKA.

2. Select 'Classify' tab and choose 'IBk' as the classifier.

3. Set K=3 and use cross-validation with 10 folds.

4. Run the classifier and evaluate performance.

Sample Output:

Confusion Matrix:

+-------+--------+--------+--------+

| Class | Setosa | Vers. | Vir. |

+-------+--------+--------+--------+

| Setosa| 50 | 0 | 0 |

| Vers. | 0 | 48 | 2 |

| Vir. | 0 | 1 | 49 |

+-------+--------+--------+--------+

Accuracy:

96.67%

Result:

The iris dataset is classified with high accuracy using KNN.

You might also like