Feature construction and selection are two key factors in the field of machine learning (ML). Usually, these are very timeconsuming and complex tasks because the features have to be manually crafted. The features are aggregated, combined or split to create features from raw data. In this paper, we propose a methodology that makes use of ontologies to automatically generate features for the ML algorithms. The features are generated by combining the concepts and relationships that are already in the knowledge base, expressed in form of ontology. The proposed methodology has been evaluated with three different activities of a popular dataset, showing its effectiveness in the recognition of activities of daily living (ADL). The obtained successful results indicate that the use of extended feature vectors provided by the use of ontologies offers a better accuracy, regarding the original feature vectors of the classic approach, where each feature corresponds to the activation of a sensor. Although the classic approach produces classifiers with accuracies above 92%, the proposed methodology improves those results by 1.9%, on average, without adding more information to the dataset.