I'm currently looking into different approaches to handle the following problem:

Let's say there is an X amount of Class A which embodies some kind of absence of work on a daily basis. E.g. Vacation, Sickness, Break, ...

There is also Class B embodying some kind of configuration object which is assigned to Object A. Thus Class B describes the type of absence of Class A. So there is an instance of Class B for Vacation, an Class B for sickness and so on.

So instances of Class A could look something like this:

UserId Class B Date
12345 VAC 14-12-2022
12345 VAC 15-12-2022
12345 VAC 16-12-2022
54321 SICKNESS 13-12-2022
54321 SICKNESS 14-12-2022

Those absences normally follow a similar pattern. A sickness here and there, some vacation and regular breaks. It being a highly customizable system, there are possible configurations where user create instances of Class B for other business scenarios without it being an absence.

Now, it's the goal to build and automatic solution to detect this problem. I would not see the problem as a time-series related problem, because it's not possible to detect faulted data of Class A through one object, but the whole picture has to be considered.

Unfortunately, there is only positive (non-faulted data) to train a model with. I was hoping to being able to train the model with the positive data and it recognizing when faulted data will be inputted.

Every input to tackle this problem would be greatly appreciated.

Edit: Short addition to describe the problem. Every instance creates its own objects of Class B, which are describing the absence type of objects of Class A.

Since the objects of Class A actually represent the absences, hence why those are the objects which can mainly be found within the system.

So faulted data are objects of Class A that are created with a misconfigured object of Class B. This faulted data should be recognized through quantity or occurring in a certain period while affecting a certain group of workforce.

There is a lot of positive data which I thought might be possible to train an model with, which should recognize if there are different patterns. Or return a probability to what extent the data corresponds to the training data.

So the goal would be

  • $\begingroup$ Welcome to DS Stach Exchange. What is a faulted data? Is it a mismatch between 2 instances in class A and class B? $\endgroup$ Dec 20, 2022 at 9:42
  • 1
    $\begingroup$ Thanks! I added the answer to the bottom of the post. If there are any other questions, let me know! $\endgroup$
    – bitfish31
    Dec 20, 2022 at 13:25

1 Answer 1


If you only have nonfaulty data, there is 2 efficient ways to detect faulted ones.

  • You can use a classification model based on nonfaulty data only. It could be a robust one like XGBoost or Random Forest. In production, if it can't classify the input value correctly (=low score), there are great chances to find a fault.

  • You can also apply a function that adds faults randomly (10% for example) and label them as faulty. Then, you can train a model on those valid faulty and nonfaulty data. The result in production should be probably very accurate.

The second option might be better than the first one, as it generalizes better.

  • $\begingroup$ Does it answer your question? If not, please let me know to provide additional information or other solutions. $\endgroup$ Dec 27, 2022 at 8:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.