# Deep Learning for Anomaly Detection in CNC Machine Vibration Data: A RoughLSTM-Based Approach
## 2 Materials and Methods
### Rough Set Theory  
RST [51] is a mathematical approach designed to manage uncertainties and incompleteness in data. Unlike other methods, it can directly reveal hidden patterns in data without the need for membership functions or additional information. This characteristic sets it apart from approaches such as fuzzy logic or Dempster-Shafer theory. RST is widely used in fields such as data mining, pattern recognition, and text mining. It also independently supports tasks such as classification, rule inference, feature selection, and dimensionality reduction [52; 53].  
RST operates by organizing data into structures called approximation sets. This method classifies uncertain data and generates approximate values for concepts. RST uses equivalence relations to classify data during analysis, deriving new concepts and rules in the process. While fuzzy set theory expresses uncertainty through membership functions, RST addresses uncertainties using precise boundaries. One of the fundamental components of RST is the \"information system\", which represents raw data collected from various sources [54]. This system provides a foundational framework for analyzing data and transforming them into meaningful insights. If a system contains decision attributes, it is referred to as a decision table. If decision attributes are not present, the system is termed an information table. Mathematically, a decision table or information system is represented as \(S=(U,A,D)\), where \(U=\{x_{1},x_{2},\ldots,x_{n}\}\) denotes the universal set consisting of objects, \(A=\{a_{1},a_{2},\ldots,a_{m}\}\) denotes a conditional attribute set, and \(D=\{d_{1},d_{2},\ldots,d_{k}\}\) denotes a decision attribute set. If \(D\
eq\emptyset\), (i.e., the set of decision attributes is not empty), the system \(S\) is considered a decision table. However, if \(D=\emptyset\), the system is referred to as an information table.  
The indiscernibility relation, also known as the discernibility relation, evaluates the similarity or distinction between objects within a knowledge system by considering a specific subset of attributes. For any subset of conditional attributes \(T\subseteq A\), referred to as \(IND(T)\), the _T-indiscernibility_ relation is defined as follows:  
\[IND(T)=\left\{\big{(}x_{i},x_{j}\big{)}\in U^{2}\Big{|}\forall a\in T,a(x_{i})=a \big{(}x_{j}\big{)}\right\} \tag{1}\]  
In the formula, the equivalence classes of the _T-indiscernibility relation_ are denoted as \(\left[x\right]_{T}\). RST employs lower (\(\overline{T}X\)) and upper (\(\overline{T}X\)) approximations to analyze subsets \(X\subseteq U\) based on attributes \(T\subseteq A\), as follows:  
\[\begin{array}{l}\overline{T}X=\left\{x\mid\left[x\right]_{T}\subseteq X \right\}:\text{ {Objects definitively in }}X.\\ \overline{T}X=\left\{x\mid\left[x\right]_{T}\cap X\
eq\varnothing\right\}: \text{Objects possible in }X.\end{array} \tag{2}\]  
These approximations help identify regions within rough sets, distinguishing between definite membership \(x\in\overline{T}X\) and possible membership (\(x\in\overline{T}X\)).