Skip to main content

Command Palette

Search for a command to run...

Week 0 : Project Description and Model Training

Published
6 min readView as Markdown
V

I am a CS student learning and exploring this technology field and eagerness to build something.

In today’s digital world, files accumulate faster than we realize. Documents, notes, reports, and text files often end up scattered in a single directory, making file management a frustrating and time-consuming task. Manually sorting these files into meaningful folders requires constant attention, human effort, and patience—resources that are often in short supply.

This challenge inspired the development of an AI-powered file organization system, available as both a GUI-based and CLI-based application, designed to automate the process of organizing disordered files intelligently.

The Problem with Traditional File organization

Most existing file organization tools rely heavily on metadata such as file names, extensions, or timestamps. While useful in some cases, metadata often fails to capture the actual meaning or context of a file. As a result, files with similar content may end up separated, while unrelated files are grouped together.

Moreover, manual file organization can be exhausting. Personally, I often find myself overwhelmed when faced with a cluttered directory containing dozens—or even hundreds—of files. Organizing them manually takes significant time and mental effort, which becomes increasingly impractical as data grows.

The AI Driven Solution

This application addresses the problem by focusing on what truly matters: file content.

Instead of relying on metadata, the system reads the actual content of files and applies text clustering techniques powered by an AI model. Based on the semantic similarity between files, the application:

  1. Analyzes the content of each file

  2. Groups similar files using text clustering

  3. Automatically creates appropriate folders

  4. Moves each file into its predicted folder

The result is a structured, meaningful directory where files are organized based on what they contain, not how they are named.

Key Features

  • Content-Based Classification: Files are grouped using semantic understanding rather than metadata.

  • AI-Powered Text Clustering: An intelligent model predicts the most suitable category for each file.

  • Automatic Folder Creation: Relevant folders are generated dynamically based on clustering results.

  • GUI and CLI Support: Users can interact with the application visually or via command line, depending on their preference.

  • Time and Effort Saving: Eliminates the need for manual sorting, significantly reducing human workload.

Motivation Behind the Project

The core motivation behind this project is simple: to save time and reduce cognitive fatigue. Organizing files manually is a repetitive task that demands focus and effort, yet adds little creative value. By automating this process using AI, the application allows users to focus on more important work while maintaining a clean and organized file system.

What started as a personal frustration evolved into a practical solution—one that replaces tedious manual organization with intelligent automation.

Model Training

Initial Model Selection and Training Strategy

Before building a fully intelligent file-organization system, it is essential to establish a working foundation. To achieve this, the project begins with training a simple and reliable machine learning model that allows the complete pipeline—data processing, prediction, folder creation, and file movement—to be designed and tested end to end.

At this stage, a Support Vector Machine (SVM) model is used with supervised learning. While the long-term goal is to shift toward unsupervised learning for true content-based clustering, starting with a supervised model helps validate the system architecture and workflow. Once the system is stable and functional, the final model selection and training strategy will be revisited and improved.

The choice of the final model is intentionally left open and will be discussed in a future blog post.


Why Start with a Simple Model?

Training a complex model without a fully working system often leads to wasted effort. Instead, this project follows a progressive development approach:

  1. Train a simple, well-understood model

  2. Build and test the complete file organization pipeline

  3. Validate predictions and system behavior

  4. Replace the initial model with a more advanced one later

This approach ensures that the system logic is correct before optimizing model performance.


What is a Support Vector Machine (SVM)?

A Support Vector Machine (SVM) is a supervised machine learning algorithm commonly used for classification tasks.

To understand SVM intuitively, consider a graph containing data points from two different classes. The objective of the SVM is to separate these classes optimally.

  • The SVM draws a decision boundary, also known as a hyperplane

  • The hyperplane is positioned to maximize the distance between the two classes

  • The data points closest to this boundary are called support vectors

  • The model continuously adjusts the boundary until it touches the nearest data points from each class while maintaining the maximum margin

Because the model relies on these critical data points (support vectors), it is referred to as a Support Vector Machine.


Dataset and Preprocessing

The dataset used for this initial experiment was sourced from Kaggle and consists of a wide variety of labeled text statements. Since supervised learning requires both input data and labels, the dataset was already well-suited for this approach.

To prepare the data:

  • The dataset was preprocessed to extract only text and label columns

  • A separate, clean file was created in a format compatible with supervised learning

  • Standard text preprocessing techniques were applied to ensure consistency and quality


Feature Extraction Using TF-IDF

Once the text data was prepared, it was converted into numerical form using TF-IDF (Term Frequency–Inverse Document Frequency) vectorization.

TF-IDF helps capture the importance of words in a document relative to the entire dataset by:

  • Increasing weight for meaningful words

  • Reducing weight for commonly occurring but less informative terms

This step transforms raw text into feature vectors that can be effectively processed by the SVM model.


Model Training and Configuration

For training the SVM model, the following parameters were used:

  • Regularization parameter (C): 10

    • Controls the trade-off between margin maximization and classification error
  • Kernel: Radial Basis Function (RBF)

    • Enables the model to handle non-linear decision boundaries

A machine learning pipeline was created to combine:

  • TF-IDF vectorization

  • SVM classification

This pipeline ensures consistent preprocessing during both training and inference.


Results and Observations

After training, the model achieved an accuracy of 98.48% on the evaluation dataset. While this result appears impressive, it is important to acknowledge that:

  • Such high accuracy is often dataset-dependent

  • Real-world, unseen data typically leads to lower performance

  • Practical accuracy may drop to around 50–60% in real usage scenarios

Despite this, the model successfully fulfills its role as a baseline system, enabling the development and testing of the overall file organization workflow.

Conclusion

This blog focused on establishing the foundation of the project by training a simple machine learning model and validating the overall system workflow. At this stage, the goal was not optimization, but to ensure that the core components—from data processing to prediction—work seamlessly together.

In the next blog, the focus will shift toward the project structure and the implementation of a Command Line Interface (CLI). We will explore how to design intuitive commands such as:

  • organize – to automatically classify and organize files into appropriate folders

This will demonstrate how the AI model integrates with practical system-level operations, bringing us closer to a fully functional and user-friendly file organization tool.

More from this blog

Implementation

6 posts