header pic

Artificial Intelligence

Developing AI System for Predicting Official
Regulation Violations in Trucking Industry


The customer is a North American company offering a smartphone-based solution for small and mid-sized truck fleets. It was designed to help meet federal electronic logging device requirements while minimizing the financial impact of traffic offenses. Commercial truck carriers and drivers are bound by the constraints of the Hours of Service (HOS) rules from the Federal Motor Carrier Safety Administration (FMCSA). If a truck driver fails to follow HOS regulation, it can potentially lead to a trucking accident. The major feature of the customer’s product is a driver’s hours of service tracking and reporting (RODS reports) in an automatic way.


Within the framework of initial cooperation, the customer entrusted MERA with the development of the fleet management WEB portal with real-time equipment tracking. The task included backend and frontend development along with Android and iOS apps. However, the customer’s product was not the only solution available in the market. With a view to standing out from competitors, the company decided to offer the end customers a brand new functionality. After one year of collaboration with the customer, the MERA team took full responsibility for the development of a system that can predict the probability of all types of HOS violation for a driver in the next 24 hours.

The MERA team needed to develop from scratch a prototype within extremely tight deadlines. In as little as two months, MERA designers were to prove that the task can be solved using a machine learning approach.


About 190 GB of drivers’ work history data were collected during the product’s functioning. It included hours history, location, and more. It was a crucial input for machine learning algorithms development. ML is a branch of artificial intelligence based on the idea that systems can learn from data, identify patterns, and make predictions. Keeping this in mind, MERA provided the solution that in terms of architecture comprises three independent data processing layers. The first one is the data access module, which processes raw data from MySQL and DynamoDB to get consolidated data samples. The output of this component is provided as an input for the feature engineering layer that reduces amount of valuable data up to 5 MB in turn. Then the core layer separates extracted features to two data sets for training ML model and its validation.

During implementation, MERA development team faced two main challenges that were successfully overcome. It was not possible to extract any data for training ML model on the fly since the data was stored separately inside several databases, in MySQL and in DynamoDB in particular. Furthermore, there are four types of HOS violations and there is no common solution for such types of prediction problems.


The created system is able to predict cases of HOS violation with accuracy close to 80%. The prototype makes possible to do one full data processing iteration within one day, which is pretty fast. It was found that different ML models are more suitable for various HOS violation types, thus ensuring the highest accuracy. The MERA team has proven that obtained result can be improved by analyzing more data points, adjusting chosen ML models, making statistical analysis to get more critical HOS violation factors. MERA has shown that its development team can resolve tough tasks under tight schedule pressure and provide the customers with the solution they need to gain a larger market share.

Major functions:

  • Building graphics for statistical analysis
  • MySQL and DDB compilation into JSON
  • Processing data to generate features
  • Finding optimal parameters for ML models
  • Execution time reduction


  • MySQL
  • Amazon DynamoDB
  • Python
  • Various Machine Learning models (SVM, Random Forest, Gradient Boosting, etc.)

This website uses cookies. If you continue to browse the site, we assume you are fine with how we use cookies on the web. Read more

This website uses cookies. Read more