In recent years, there has been a significant surge in interest among researchers in detecting falls using time-series data from various sensors, primarily due to its vital applications in healthcare, elderly care, and smart environments. However, many existing fall detection methods are either computationally expensive or overly reliant on domain-specific expertise, and some lack the adaptability needed to handle diverse activity sequences. In contrast, the proposed method adopts the bag-of-features model. It starts by segmenting continuous time-series data into overlapping subsequences using a sliding window approach, followed by clustering these subsequences with a k-means algorithm to construct a codebook, where each cluster center serves as a code word. Later, a feature vector is generated using the vector of locally aggregated descriptors encoding technique. Specifically, it computes the differences between local descriptors and their respective code words. These differences are aggregated and concatenated into a final feature vector used for classification. To assess the effectiveness of the proposed approach, four machine learning classifiers are applied alongside various cross-validation methods for classifying the encoded features. Extensive experiments were conducted on two benchmark datasets, yielding impressive accuracy rates of 99.50% on the UniMiB SHAR dataset and 95.54% on the dataset UMA Fall dataset. The robustness of the proposed method was also evaluated in recognizing daily human activities, yielding excellent performance.