Skip to content

bonagirid/AIUsingWeka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

AIUsingWeka

Event Classifier

Description

The event-classifier project is a Java-based machine learning application developed as part of the coursework for the 7051CEM Web Applications and AI module at Coventry University. The primary objective of this project is to build a classification model using the WEKA library to predict the type of events (Conference, Wedding, Workshop, or Party) based on their attributes, such as location, date, and description-derived features. This AI component is designed to enhance the functionality of an event management platform by automating the categorization of new event listings, thereby improving user experience and operational efficiency.

Dataset and Features

To train the model, a synthetic dataset named events_dataset.arff was manually generated, consisting of 100 records with a balanced distribution of 25 instances per event type (Conference, Wedding, Workshop, Party). The dataset includes the following attributes:

  • eventType (nominal): The target class with four possible values—Conference, Wedding, Workshop, or Party.
  • location (nominal): A list of UK cities, including London, Manchester, Coventry, Birmingham, Edinburgh, Leeds, Cardiff, Glasgow, and Liverpool, reflecting realistic event locations.
  • date (date): Event dates in 2025, formatted as yyyy-MM-dd, to capture temporal patterns.
  • hasConferenceKeyword, hasWeddingKeyword, hasWorkshopKeyword, hasPartyKeyword (nominal): Binary flags (true/false) derived from the event description, indicating the presence of specific keywords (e.g., "conference," "wedding") to aid classification.

The dataset was carefully crafted to ensure variety and realism, with descriptions mimicking real-world event scenarios (e.g., "AI conference with workshops," "Garden wedding celebration").

Implementation

The core implementation resides in the App.java class, located in the org.events.classifier package. The application uses WEKA’s J48 decision tree classifier, chosen for its interpretability and effectiveness in handling categorical data. The dataset is loaded, shuffled using a fixed seed for reproducibility, and split into an 80/20 train-test ratio (80 instances for training, 20 for testing). The J48 classifier was trained on the training set and evaluated on the test set, achieving an impressive 100% accuracy, as shown in the confusion matrix below:

Confusion Matrix: a b c d <-- classified as 4 0 0 0 | a = Conference 0 7 0 0 | b = Wedding 0 0 4 0 | c = Workshop 0 0 0 5 | d = Party

Architecture and Dependencies

The project is structured as a Maven project, with dependencies managed via pom.xml. Key dependencies include:

  • WEKA (version 3.8.6): For machine learning capabilities, providing the J48 classifier and data processing utilities.
  • JUnit 5: For potential unit testing (to be implemented in future iterations).
  • Java 17: Ensuring compatibility with modern Java features and WEKA’s requirements.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Languages