Next Article in Journal
Developmental and School-Related Risk Factors in Auditory Processing Disorder: A Pilot Study in Polish Children
Previous Article in Journal
B-Value Spatiotemporal Changes and Aftershock Correlation Prior to the Mwg 7.1 Dingri Earthquake in Southern Tibet: Implications for Land Deformation and Seismic Risk
Previous Article in Special Issue
A Deep Reinforcement Learning-Based Concurrency Control of Federated Digital Twin for Software-Defined Manufacturing Systems
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Predicting the Cooling Rate in Steel-Part Heat Treatment via Random Forests

Graduate School of Advanced Science and Engineering, Hiroshima University, Higashi-Hiroshima 739-8527, Japan
*
Author to whom correspondence should be addressed.
Appl. Sci. 2025, 15(21), 11676; https://doi.org/10.3390/app152111676
Submission received: 14 October 2025 / Revised: 28 October 2025 / Accepted: 30 October 2025 / Published: 31 October 2025

Abstract

Heat treatment is a thermal-processing method involving controlled heating and cooling cycles designed to achieve the desired properties of materials. Among these steps, the cooling rate in heat treatment plays a crucial role, as it significantly influences the resulting material properties. In this paper, we investigated the feasibility of random forests in estimating the cooling-rate parameters for the steel-part heat treatment process. Random forests are particularly appealing in modeling an ensemble of expressive decision trees from which cooling can be modeled and estimated from the interaction of metal features. Our computational experiments using real-world data from industrial-scale operations demonstrated the advantageous properties of random forest regression models, particularly when combined with a random oversampling scheme. We also found that the chemical composition—specifically carbon and chromium content—as well as the weight of the steel parts, are key features that predict the cooling rate of steel parts. Furthermore, our validation using real-world cooling scenarios aligned closely with the practical insights of seasoned operators who routinely recommend cooling parameters for the metal-normalizing process. Our results highlight the effectiveness of the ensemble approach of random forest for practical applicability in industrial-scale heat treatment.

1. Introduction

Iron-steel metals are widely used in construction and structural applications, as well as in consumer products involving machines, cars, gears, shafts, bolts, and axles. Heat treatment is advantageous for metals by inducing phase changes and by modifying mechanical properties such as hardness, toughness, impact resistance, ductility, and corrosion resistance. Heat treatment is a thermal processing technique that tunes the microstructure of metals by subjecting them to controlled heating and cooling cycles, often without changing the overall shape. Heat treatment parameters such as the heating temperature, the holding time, and the cooling rate determine the final mechanical properties of metals. As such, different combinations of heat-treatment parameters can lead to a diverse set of mechanical properties.
The Heat treatment of iron-steel metals is often conducted in carbon-emitting heating furnaces [1]. Such steel parts are placed on trays and heated to a desired temperature (often above 900 °C) and then cooled in the furnace (annealing), in air (normalizing), or in water/oil (hardening), depending on the desired target properties [2]. Annealing cools metals slowly and produces soft, ductile, and workable properties. In contrast, hardening involves faster cooling, resulting in metals that are hard and strong but brittle. Normalizing falls between these two processes, with moderate cooling that produces balanced mechanical properties [2].
The cooling rate during the heat treatment of metals allows for tuning the type, size, and distribution of precipitates, thereby determining a balance between strength—when precipitates are fine and densely or evenly distributed to impede dislocation motion—and ductility, when precipitates are spaced, allowing for plastic deformation [3]. Concomitant with the above, the cooling rate in heat treatment determines the width of layers in layered structures [4], the width of lamellar structures within grains [5], the refinement of coarse, fully lamellar microstructures [6], the extent of continuous layers in grain boundaries [5], the precipitate formation (e.g., boundary vs. intragranular) and changes in the fracture mechanism (e.g., intergranular cracking vs. transgranular cracking) [7], the spacing between dendrites—the tree-like crystal structures that form when a metal cools [8], the grain boundaries, and the generation of dislocation sites in accordance with the Hall–Petch effect [9,10,11], the growth and distribution of austenite and corrosion resistance [12], the magnetic permeability of amorphous magnetic alloys [13], the dislocation density and microstrain formation [14], and the kinetics of atomic nucleation–diffusion in phase transformations [15].
Estimating the quantitative relationship between the cooling rate after heat exposure and the resulting microstructure in metal alloys has attracted significant attention in the manufacturing community due to its practical benefits. It is known that the microstructural properties of metals are influenced by both cooling rates and chemical compositions [16,17,18,19], yet the relationships are known to be nonlinear, making them well suited for machine learning and data-based approaches. Li et al. [20] predicted intermetallic morphology in recycled Al-Si-Cu alloys using machine learning based on cooling rates and chemical compositions. Gao et al. [18] established an exponential relationship between the critical cooling rate in U75V rail steel and its chemical composition, specifically based on carbon (C), manganese (Mn), silicon (Si), and vanadium (V). Geng et al. [21] found that not only cooling time but also chemical composition—specifically carbon (C), molybdenum (Mo), manganese (Mn), and nickel (Ni)—determined the hardness of low-alloy steel in welding applications. Afflerbach et al. [22] used features of the constituent chemical elements of bulk metallic glasses to predict the critical cooling rate for glass formation. Schultz et al. [23] used calculated features derived from chemical elements and molecular properties to predict the critical cooling rate of metallic glasses. Mehmet Akif Koç et al. [24] used neural networks to forecast cooling rates based on pressure, distance to sections, and the duration throughout H-section profiles of steel beams S275/HEA120, S275/HEB120, and S275/HEB14. Liu et al. [25] proposed an equation to predict the critical cooling rate of U71Mn rail steel as a function of holding temperatures and austenitizing times, both of which are key parameters determining the microstructure and stability of austenite.
Rapid cooling rates refine metal microstructures, suppress atomic diffusion, reduce micropores and grain sizes, and lead to a homogeneous distribution of precipitates and higher corrosion resistance. However, too-rapid cooling may result in brittle microstructures, making metals prone to cracking and fracture; therefore, the strength of each metal alloy must be carefully controlled. Although the above-mentioned studies explored the relationships between cooling rates and chemical composition and other mechanical notions involved in heat treatment of metals, the applicability to different metal alloys’ being relevant to industrial-scale operations remains unclear. If a pragmatic approach were considered, it would be desirable to elucidate whether geometry, weight, and material play as significant a role as chemical composition in predicting the cooling rate of the heat treatment of industrial-scale iron-steel parts. This question has remained elusive in the related works. As such, we aim to forecast the cooling rate for industrial-scale steel parts involved in the operations of Tsukimi Factory of Nagato Co., Ltd. (Hiroshima, Japan), an industrial plant that operates furnaces and cooling devices for the heat treatment of steel parts. In this setting, heat treatment is performed using specialized equipment (heating furnaces), and steel parts are heated in trays and then cooled using air via a cooling fan, as shown in Figure 1, or by immersing them in oil. Heat-treatment parameters such as heating temperatures and cooling rates are entered by the operator, with the cooling rate typically set based on the results of past, similar steel parts, and the intuition of experienced operators. This practice often leads to issues with personalization, accuracy, and repeatability.
In this paper, to tackle the aforementioned, we investigate the feasibility of regression and classification models aided via the ensemble approach of random forests [26,27]. Our goal is to model decision trees that predict the cooling rate parameter based on features such as chemical composition, material type, weight, and the geometry of industrial-scale iron-steel parts—information that is solely obtained for each part from daily plant operations. Additionally, we aim to analyze feature importance when decision trees successfully predict the cooling rate. Our computational experiments demonstrate the merits of regression-based random forest models, particularly when combined with an oversampling scheme. Furthermore, our validation using real-world cooling scenarios shows that the cooling parameters recommended through the random forest model consistently produced steel parts whose hardenability was within the standard acceptable range. Our findings highlight the practical merits of random forests for predicting cooling rates in the normalization of industrial-scale steel parts.
Of the following sections, Section 2 explains the learning mechanism of the random forest algorithm [26,27], Section 3 presents our computational experiments and results, and Section 4 concludes the study by summarizing the key findings.

2. Random Forest

In this section, we describe the key algorithm involved in constructing the trees within random forests. Let the training dataset be denoted as X = { x 0 , x 1 , , x n 1 } , where n is the total number of samples in the dataset, and let y = { y 0 , y 1 , , y n 1 } be the associated target values. Our goal is to find a tree-based mapping function, τ : X y . In what follows, we review the major components of the random forest implementation from scikit-learn [26,27], which constructs the function τ from a collection of trees (also known as a forest).

2.1. Bootstrap Sample

Each tree, T , in a random forest in scikit-learn [26,27] is trained on a bootstrap sample, X * , a subset of X, constructed as X * = { x u 0 , x u 1 , , x u k 1 } and y * = { y u 0 , y u 1 , , y u k 1 } , where u i [ 0 , n 1 ] , i [ 0 , k 1 ] , denotes the index of the selected sample. The bootstrap sample X * is constructed as follows: m sample indices I 0 , I 1 , , I m 1 are generated; each I j [ 0 , n 1 ] is drawn independently and uniformly at random (sampling with replacement):
I j Uniform ( 0 , n 1 ) , j = 0 , , m 1 .
As such, the set U = { u 0 , u 1 , , u k 1 } = { I j : j = 0 , , m 1 } corresponds to unique (non-repeating) indices associated with the bootstrap samples: x u 0 , x u 1 , , x u k 1 . Then, for each i = 0 , , k 1 , the sample weight w i is the count of the samples of the generated indices:
w i = j = 0 m 1 1 { I j = u i } where 1 { I j = u i } = 1 if I j = u i , 0 otherwise .
The above aims to randomly select (with replacement) k samples from the original dataset, in which samples picked multiple times get a higher weight and are to fit more closely than lower-weight samples. The above-mentioned mechanism extends Breiman’s original bootstrap sampling mechanism [28] and bagging (bootstrap aggregating) [29] to learn multiple versions of trees on bootstrap subsets of the training (learning) set.

2.2. Tree Construction

The tree construction algorithm in random forests follows a depth-first, stack-based routine (Algorithm 1) by default [26,27]; the inputs to the algorithm are the bootstrap sample X * = { x u 0 , x u 1 , , x u k 1 } , target y * = { y u 0 , y u 1 , , y u k 1 } , and its associated sample weights, w = ( w 0 , w 1 , , w k 1 ) . The output is the (binary) decision tree, T .
Instead of recursion, a stack is used to keep track of nodes to be processed. Each stack record corresponds to a node in the tree and contains information about the node’s data range (which is useful to compute regression metrics), tree depth, and parent information.
The root node is first pushed onto the stack, and the main loop pops nodes off the stack, splits them as needed, and pushes the resulting child nodes if they are not leaves. In what follows, we describe the key components of the tree construction routine within a regression framework.
Each node operates on a subset of the bootstrap sample, X * , rendered from the data range [ s , e ) as follows:
Sample : X [ s , e ) * = { x u s , x u s + 1 , , x u e 1 } , Target : y [ s , e ) * = { y u s , y u s + 1 , , y u e 1 } , Sample weights : w [ s , e ) = ( w s , w s + 1 , , w e 1 ) ,
where s denotes the start index of the data range, and e denotes the end index of the data range, with  s , e [ 0 , k 1 ] , and  e > s . As node ν operates on the data range [ s , e ) , the node impurity  Φ ( ν ) is computed as follows:
Φ ( ν ) = h [ s , e ) w h y u h * 2 h [ s , e ) w h h [ s , e ) w h y u h * h [ s , e ) w h 2 ,
where h denotes the index within the data range [ s , e ) . The node impurity  Φ ( ν ) represents a surrogate of the mean squared error (MSE), yet it is derived under the assumption that the mean target of small-sized bootstrap subsets can approximates the target prediction of such subsets; that is, assuming small n ν and equal sample weights, the impurity is derived from the MSE as follows:
MSE ( ν ) = 1 n ν i = 0 n ν 1 ( y i y ^ i ) 2 1 n ν i = 0 n ν 1 y i 2 1 n ν 2 i = 0 n ν 1 y i 2 ,
where y i is the target value, and y ^ i is the predicted value. The above-mentioned is a special case of Equation (2) for equal-weighted samples.
Algorithm 1: Binary decision tree construction.
Applsci 15 11676 i001
Furthermore, the tree construction routine checks whether a node, ν , is a leaf based on depth, sample counts, and impurity, as follows:
is _ leaf ( ν ) = d ν d max n ν < s min n ν < 2 l min w ν < 2 w min Φ ( ν ) ϵ i ,
where ∨ is the logical OR, d ν is the current node depth, d max is the maximum allowed depth, n ν is the number of samples at the node, s min is the minimum number of samples required to split, l min is the minimum number of samples per leaf, w ν is the weighted number of samples at the node, w min is the minimum weighted samples per leaf, Φ ( ν ) denotes the impurity of the node, ϵ i is a small positive threshold for impurity (corresponding to the value of machine epsilon which for double precision is approximately 2.22 × 10 16 ).
As such, if the node ν is a leaf, the node value θ ( ν ) is computed as follows:
θ ( ν ) = h [ s , e ) w h y u h * h [ s , e ) w h ,
where θ ( ν ) denotes the (output) prediction as the approximation from the bootstrap target mean over small-sized data ranges.
On the other hand, if the node ν is not a leaf, the best split is found, and child nodes are pushed onto the stack with split data ranges. The best split, p * , is found via a greedy search [26,27] over the data range [ s , e ) , as follows:
( p * , f * , t * ) = arg max f , t H , p P ψ ( p ) ,
where p denotes the split index over the range [ s , e ) with p s and p < e , P denotes the candidate set of split points, f denotes the selected feature of the bootstrap sample, t denotes the threshold associated with feature f, H denotes the collection of candidate thresholds, each of which is associated with the candidate set of split points P , and  ψ ( p ) denotes the proxy impurity improvement measure as a result of splitting the data range [ s , e ) at index p.
For each split index p P , child nodes can be denoted:
Left node : ν L with data range [ s , p ) , Right node : ν R with data range [ p , e ) .
And the proxy impurity improvement ψ ( p ) can be computed as follows:
ψ ( p ) = h [ s , p ) w h y u h * h [ s , p ) w h 2 + h [ p , e ) w h y u h * h [ p , e ) w h 2 ,
where y u h * denotes the corresponding bootstrap target value at sample point h, on either the left node ν L : [ s , p ) or right node ν R : [ p , e ) . The proxy impurity improvement measure can be obtained from (3), under the assumption that the target mean at small bootstrap samples approximate the prediction of such subsets and  that the overall sum of target values remains constant when the best split between the left and right nodes is searched for, as follows:
MSE ( ν L ) + MSE ( ν R ) = 1 n L i = 0 n L 1 ( y i y ^ i ) 2 + 1 n R i = 0 n R 1 ( y i y ^ i ) 2 1 n L 2 h [ s , p ) y u h * 2 1 n R 2 h [ p , e ) y u h * 2
where n L ( n R ) is the number of samples at the left (right) node. Then, for equal-weighted samples, the impurity improvement becomes the following:
φ ( p ) = 1 n L 2 h [ s , p ) y u h * 2 + 1 n R 2 h [ p , e ) y u h * 2 ,
where n L 2 ( n R 2 ) denotes the number of bootstrap samples in the left (right) node after splitting the node ν at data point p, and the positive sign of the terms in ψ ( p ) is due to the maximization of (6).
The greedy search mechanism that solves (6) in [26,27] selects the best split point p * that maximizes the proxy impurity improvement (7), which is an approximation surrogate of the mean squared error, over a set of selected features and decision thresholds; thus, the partition is expected to minimize regression errors. Concretely speaking, the search mechanism first selects D features uniformly at random, F = ( f 1 , f 2 , , f D ) , and then each selected feature, f d , of the bootstrap sample
X [ s , e ) * = { x u s ( f d ) , x u s + 1 ( f d ) , , x u e 1 ( f d ) }
is sorted, such that
x u ( s ) ( f d ) x u ( s + 1 ) ( f d ) x u ( e 1 ) ( f d ) ,
where x u ( s ) , x u ( s + 1 ) , , x u ( e 1 ) denote the sorted values of x u s , x u s + 1 , , x u e 1 in ascending order. Then, the candidate set of split points, P , is computed as follows:
P = p c ( f d ) | d = 1 , , D ; c = 1 , , C d ,
where f d is a selected feature, f [ 1 , D ] , c denotes the ordinal number of a split point, C d denotes the number of split points over feature f d , and p c ( f d ) denotes the c-th split point when the f d -th selected feature is used, which is computed iteratively over the data range [ s , e ) :
p 0 ( f d ) = s , p c + 1 ( f d ) = 1 + max i N p c ( f d ) i < e 1 , x u ( i + 1 ) ( f d ) x u ( i ) ( f d ) + ϵ p ,
where i denotes the split position, x u ( i ) ( f d ) denotes the value of the f d -th feature of the i-th sorted bootstrap sample x u ( i ) , and  ϵ p denotes a small threshold value, 10 7 , avoiding false mismatches caused by tiny-floating-point-rounding differences.
Also, for each split point, p P , over feature f d , the corresponding threshold of the feature value can be computed as follows:
t ( f d , p ) = x u p 1 ( f d ) + x u p ( f d ) 2 ,
and the candidate set of thresholds is defined as follows:
H = t ( f d , p ) | d = 1 , , D ; c = 1 , , C d .

2.3. Prediction

The random forest routine in the scikit-learn implementation [27] generates a collection (forest) of trees, { T 0 , T 1 , , T N 1 } , each generated via Algorithm 1. For a new observation, x, the prediction of a tree, T ( x ) , can be obtained by traversing the nodes of such a tree with the associated best features, f * , and thresholds, t * . Once the tree reaches a leaf node, ν , the (output) prediction of the tree can be estimated from its node value, that is, T ( x ) = θ ( ν ) . Then, the tree-based mapping function, τ , can be represented by the mean of the (output) prediction values of the collection of trees:
τ ( x ) = 1 N a = 0 N 1 T a ( x ) ,
where N is the number of trees in the collection (forest).

2.4. Best-First Mechanism

The above describes the (default) configuration for a depth-based random forest tree construction. When the maximum number of leaf nodes is specified by the user, the random forest routine in [26,27] switches to a best-first tree construction mechanism, in which nodes are popped up from the stack based on the highest priority (the greatest impurity improvement), thus expanding (splitting) towards the most promising nodes first and focusing on nodes that lead to the highest impurity improvement. After construction, the tree is pruned to meet the specified size constraint.

2.5. Classification Problems

Although the above describes the main tenets of a regression-based tree construction framework, trees for classification can be constructed using either a depth-based approach (the default configuration in [27]) or a best-first approach (when the maximum number of leaf nodes is specified). However, instead of using MSE-based proxies as impurity metrics, random forests for classification use the count-based Gini index [30], which measures how mixed classes are within a node, where lower impurity indicates that the node contains mostly samples from a single class. Similar to (7), the proxy impurity improvement at node ν combines the Gini-based metrics from the left node, ν L , and the right node, ν R .
The random forest for classification generates a collection of trees, { T 0 , T 1 , , T N 1 } , where N is the number of classification trees in the forest. Let K be the number of classes. The node value θ ( ν ) in a classification tree is a class probability vector, that is, θ ( ν ) [ 0 , 1 ] K , and λ = 1 K θ ( ν ) λ = 1 . For a new observation, x, the prediction of a tree, T ( x ) , is obtained by traversing the nodes of the tree using the associated best features, f * , and thresholds, t * . Once the tree reaches a node leaf, ν , the classification prediction of the tree is given by the node value, i.e.,  T ( x ) = θ ( ν ) . The class output vector for the random forest is then computed through a probabilistic aggregation across all trees:
p ^ ( y = λ x ) = 1 N a = 0 N 1 T a ( x ) λ ,
where p ^ ( y = λ x ) is the estimated probability that x belongs to class λ . Thus, the tree-based classification function τ predicts the class that has the highest mean probability across all trees:
τ ( x ) = arg max λ { 1 , , K } p ^ ( y = λ x ) .
Rather than using majority voting [28], the probabilistic aggregation approach [27]—also known as bagging-class probability estimates [29])—takes into account the confidence of each tree in its prediction and allows for probability estimates to be provided as needed.

3. Computational Experiments

This section presents our computational experiments and the observations obtained from evaluating the feasibility of using random forests to predict cooling conditions during the annealing process of steel parts.

3.1. Dataset

Our dataset consists of real-world records compiled from daily operations at Tsukimi Factory, an industrial plant that operates furnaces and cooling devices for the heat treatment of steel parts. Our goal is to predict the cooling conditions during the annealing process of steel parts. Accordingly, the target variable (also called the dependent or response variable) represents the cooling rate parameter to be set on the equipment. This parameter adjusts the fan speed: the higher the value, the faster the fan operates. Possible values are integers ranging from 0 to 60.
To avoid implying any unintended order or relationship between categories, categorical data were transformed using one-hot encoding prior to model training. Our dataset consisted of 993 observations and 21 input features, representing real-world cooling conditions from the heat treatment process of industrial steel parts. Furthermore, the explanatory variables (or input features in the context of random forest) are divided into the following types:
Chemical CompositionThe percentage of elements contained in a steel part is expressed as nine items: carbon (C), silicon (Si), manganese (Mn), phosphorus (P), sulfur (S), nickel (Ni), chromium (Cr), molybdenum (Mo), and copper (Cu). During heat treatment, these elements affect the treatment results in different ways, with carbon and chromium being particularly influential. The microstructural properties of metal alloys are influenced by both cooling rates and chemical composition [16,17,18,19]. Gao et al. [18] found an exponential relationship between the critical cooling rate in U75V rail steel and its chemical composition, specifically carbon (C), manganese (Mn), silicon (Si), and vanadium (V). Afflerbach et al. [22] used features of constituent elements, such as Al, Cu, Ni, Fe, B, Zr, Si, Co, Mg, and Ti, to predict the critical cooling rate for glass formation. Schultz et al. [23] utilized calculated features derived from chemical elements and molecular properties to predict the critical cooling rate of metallic glasses.
MaterialThe metals that serve as raw materials for constituting steel parts are used differently, depending on the application. For each material quality, standard values for the content of the above-mentioned chemical components are established. In the context of our dataset, seven different material qualities were included as categorical data.
WeightThe weight of each steel part. During heat treatment, there is a phenomenon called the mass effect, in which the greater the material’s mass, the weaker the heat treatment effect.
ShapeGeometry considerations of the steel part. Four visually distinguishable shapes: (1) gear shaft, for rod-shaped parts with gears; (2) washer, for cylindrical parts whose thickness is greater than their height; (3) ring, for cylindrical parts whose height is greater than their thickness, and (4) block, for parts without holes that are nearly three-dimensional

3.2. Model Settings

We evaluated the following types of random forest configurations:
  • Random forest with default configuration. Here, we used the default parameter settings of the random forest implementation of scikit-learn [27]. The key representative parameters are as follows: the number of estimators, n T = 100 , the maximum allowed depth, d max , is set at the largest integer that can be represented as a 32-bit signed integer in NumPy (e.g., 2 31 1 ), the minimum number of samples required to split a node s min = 2 , the minimum number of samples per leaf l min = 1 , and the minimum weighted count for splits w min = 0 . In the above, the number of estimators, n T , corresponds to the number of trees in the random forest.
  • Random forest with oversampling. Since the acquired real-world data are imbalanced—that is, the distribution of outputs is uneven—we implemented the oversampling technique (RandomOverSampler in [27]) to ensure a more balanced distribution of output classes. Random oversampling randomly duplicates samples from the minority class until all classes are equally distributed. Although alternative techniques for handling imbalanced data exist, such as resampling or class weighting, random oversampling is a straightforward method that avoids the creation of synthetic samples, thereby maintaining alignment with the real-world cooling conditions of steel parts.
  • Random forest with hyperparameter tuning. In this configuration, we performed hyperparameter tuning on several key parameters of the random forest. As such, we considered the following parameters and their respective ranges: the number of estimators, n T [ 50 , 500 ] , the maximum allowed depth, d max [ 5 , 200 ] , the minimum number of samples required to split a node, s min [ 2 , 100 ] , the minimum number of samples per leaf, l min [ 1 , 100 ] , and the maximum number of features considered when searching for the best split at each node during tree construction, f max { · , log 2 , 0.3 , 0.5 , 0.8 , 5 , 15 , 25 , 50 , 75 , 100 } . Here, f max represents either a function (or fraction) of the total number of features when specified as such or an absolute integer value otherwise. The parameters were selected to balance the trade-off between bias and variance, as extreme values can either increase or decrease the level of randomness, thereby affecting overfitting and underfitting in the model. Due to the computationally expensive nature of the objective function, we used 10-fold cross-validation and Bayesian optimization to efficiently search for optimized parameters using a surrogate-based optimization approach [31].
  • Random forests for both regression and classification. Since the real-world observations of cooling conditions for steel parts comprise a discrete set of output values in the range [ 0 , 60 ] , it is possible to train both classification and regression models and evaluate their corresponding performance. Thus, we trained both classification and regression models for each of the aforementioned random forest configurations. Furthermore, for the regression models, to enable a meaningful comparison with the discrete nature of the observed outputs, we implemented an approach that approximates each continuous prediction by rounding it to the nearest integer. This approach ensures that predictions reflect real-world observations, enhancing interpretability and producing outputs consistent with the expected format, thereby increasing their relevance for decision-making and further analysis.
Furthermore, to ensure a relevant evaluation of training and testing performance, we used a split ratio of 75% for training and 25% for testing. During the training–test split, we used stratification to prevent a bias toward underrepresented classes. Our computational experiments were conducted on an Intel i9 9900K @ 3.6 GHz.

3.3. Example of a Decision Tree for Predicting the Cooling Parameter

In order to exemplify the generation of both a tree and a random forest, we outline the configuration of a tree in Figure 2 and the configuration of a random forest in Figure 3. In particular, Figure 2a shows the configuration of a single tree, the feature values (denoted with x[number]), the decision thresholds, the corresponding decision branches (True to the left and False to the right), the node impurity (IMP), the number of samples in the node span, and the node value. The reader may note that, for a regression model, the value of the leaf nodes denotes the output of the tree. Also, Figure 2b denotes the values of the proxy impurity improvement when searching for the best splitting points in (6).
Furthermore, Figure 3 shows the configuration of all trees when we set the number of trees to five. The reader may note the relatively different configuration of each tree in terms of the decision threshold and node values. For a regression problem, the regression output is computed by the average of the five trees in Figure 3, following (16).

3.4. Data Distribution

The real-world data on the cooling conditions of steel parts comprises an imbalanced configuration, as shown with the training-testing split in Figure 4. Yet, the stratification scheme during splitting helps preserve the distribution of the classes. Furthermore, Figure 4 shows that the oversampling technique allows for an even distribution of the training data.

3.5. Regression with Default Configuration

To show a glimpse of the performance of random forest models under a default configuration scheme, Table 1 shows the results of 10 independent runs in terms of learning time and training–testing metrics. Here, metrics with the subindex n, such as in MSE n , indicate that the metric is calculated when each continuous prediction is approximated by rounding it to the nearest integer. By observing the results in Table 1, we note the following facts:
  • Computation time: Random forest quickly learned the suitable fitting, in around 0.19–0.20 s per trial.
  • Training Metrics: MSE ranges from 3.17 to 4.41, with high R 2 values above 0.98, indicating a strong model fit.
  • Testing Metrics: Test MSE varies more widely (11.43 to 33.44) with R 2 values between 0.84 and 0.94, showing a reasonable degree of variability in generalization.
  • Metrics with Nearest Approximation: MSE and R 2 with a nearest approximation closely follow their continuous counterparts, confirming consistency across scales.
  • Overall Performance: The model demonstrates a solid training accuracy and generally good testing performance, with some trials showing a decreased test accuracy.
Table 1. Regression performance metrics (training and testing) with default configuration.
Table 1. Regression performance metrics (training and testing) with default configuration.
TrainingTesting
TrialTime (s)MSE R 2 MSEn R n 2 MSE R 2 MSEn R n 2
10.194.200.98164.420.980611.430.935113.000.9262
20.193.690.98294.590.978816.090.924917.680.9175
30.194.410.98084.900.978720.140.881321.360.8741
40.203.500.98363.950.981526.670.879427.040.8777
50.193.870.98334.220.981819.720.880420.100.8781
60.203.930.98334.440.981116.470.893716.730.8920
70.204.130.98164.250.981018.430.903820.630.8923
80.203.790.98253.740.982713.060.938713.670.9359
90.193.170.98533.550.983633.440.842935.920.8312
100.203.800.98124.190.979320.490.919022.090.9126
Note: Arrows describe the desirable direction of the metric for better performance: ↓ implies lower is better, ↑ implies higher is better.

3.6. Regression with Oversampling

Also, to show a glimpse of the performance of random forest models under an oversampling scheme, Table 2 shows the results of 10 independent runs in terms of learning time and training-testing metrics. Similarly to the results described above, metrics with the subindex n indicate that these metrics were calculated when each continuous prediction was approximated by rounding it to the nearest integer. By observing the results in Table 2, we note the following facts:
  • Computation Time: All trials completed rapidly, with times tightly clustered between 0.42 and 0.44 s.
  • Training Metrics: Training MSE values are low (0.68 to 1.48), and R 2 values are consistently high (0.9961 to 0.9982), indicating an excellent model fit.
  • Testing Metrics: Test MSE ranges from 11.25 to 29.19, with R 2 values between 0.8685 and 0.9487, reflecting strong but variable generalization.
  • Metrics with Nearest Approximation: Normalized MSE and R 2 closely track their continuous counterparts, confirming stable performance across different scales.
  • Overall Performance: Random oversampling yields robust training accuracy and generally strong testing results, with a number of trials showing a higher test error yet achieving reasonable predictive performance.
Table 2. Regression performance metrics (training and testing) with random oversampling.
Table 2. Regression performance metrics (training and testing) with random oversampling.
TrainingTesting
TrialTime (s)MSE R 2 MSEn R n 2 MSE R 2 MSEn R n 2
10.421.100.99711.260.996611.250.948712.020.9452
20.440.990.99741.020.997321.460.900521.190.9017
30.420.780.99790.830.997821.590.901523.620.8922
40.420.880.99770.910.997625.790.880427.430.8728
50.421.030.99721.090.997118.210.918020.420.9080
60.441.190.99681.250.996729.190.868530.220.8639
70.440.860.99770.950.997518.600.915218.610.9151
80.430.760.99800.790.997911.660.945912.020.9443
90.440.680.99820.720.998113.290.938412.970.9399
100.421.480.99611.570.995815.510.928115.670.9274
Note: Arrows describe the desirable direction of the metric for better performance: ↓ implies lower is better, ↑ implies higher is better.

3.7. Regression with Hyperparameter Tuning

Also, to show the performance when using the hyperparameter tuning scheme, Table 3 shows the results of learning time and training–testing metrics. By observing the results in Table 3, we note the following facts:
  • Computation Time: Trials completed relatively fast, with learning time ranging from 0.16 to 2.12 s and an average time of 0.87 s.
  • Training Performance: The training MSE is low, at 0.99, with very high R 2 values averaging 0.9974.
  • Testing Performance: The test MSE averages 18.46, with an R 2 of around 0.9173, showing a competitive predictive accuracy compared to training.
  • MSE with Nearest Approximation: MSE and R 2 values under a nearest approximation to predictive value closely mirror their continuous counterparts, confirming stable model behavior across scales.
  • Variability: Standard deviations are moderate for MSE (training: 0.28, testing: 5.52) and very low for R 2 coefficients (training: 0.0009, testing: 0.023), indicating consistent performance across trials.
  • Computation Time: The models were learned efficiently, with learning times ranging between 0.13 and 2.05 s, averaging 1.10 s.
  • Training Performance: The mean training MSE is 0.97 with very high R 2 values, around 0.9976, indicating a highly accurate model fit.
  • Testing Performance: The test MSE averages 18.85, with an R 2 of approximately 0.9156, showing the strong predictive capability when unseen data are used.
  • MSE with Nearest Approximation: The normalized MSE and R 2 under a nearest-approximation approach closely align with continuous metrics, demonstrating the stable performance across scaling.
  • Variability: Moderate standard deviations for MSE (training: 0.25; testing: 5.36) and low variability for R 2 (training: 0.0007; testing: 0.022) reflect consistent results across trials.
Table 3. Regression performance metrics (training and testing) with hyperparameter tuning.
Table 3. Regression performance metrics (training and testing) with hyperparameter tuning.
TrainingTesting
TrialTime (s)MSE↓ R 2 MSEn R n 2 MSE↓ R 2 MSEn R n 2
12.011.080.99711.190.996811.130.949212.420.9433
22.120.990.99741.040.997222.200.897122.760.8945
30.170.790.99790.840.997823.910.890924.990.8860
40.170.880.99760.940.997522.560.895421.700.8994
50.731.050.99721.100.997117.700.920319.210.9135
60.181.150.99691.230.996726.690.879828.580.8713
71.690.840.99780.890.997619.010.913320.850.9049
80.210.730.99810.780.997911.150.948312.020.9442
90.160.620.99840.710.998113.930.935414.670.9320
101.251.470.99611.540.995915.530.928016.270.9246
Note: Arrows describe the desirable direction of the metric for better performance: ↓ implies lower is better, ↑ implies higher is better.

3.8. Classification with Default Configuration

Furthermore, to show the performance of random forest classification models under a default configuration scheme, Table 4 shows the results and metrics over 10 independent runs. By observing the results in Table 4, we note the following facts:
  • Computation Time: The classification models were learned at about 0.13 s. per trial, indicating a fast learning ability.
  • Training Performance: The classification models fit the training data with a very low MSE (0.78–2.06) and a high R 2 (0.9905–0.9964), showing strong learning from training data.
  • Testing Performance: The models achieved higher MSEs (27.14–63.39) and reduced R 2 values (0.7061–0.8778), indicating some overfitting and moderate generalization.
  • Variability: The classification models achieved low variability in training metrics and moderate variability in testing metrics, implying fluctuations in model generalization across trials.
Table 4. Classification performance metrics (training and testing) with default parameters.
Table 4. Classification performance metrics (training and testing) with default parameters.
TrainingTesting
TrialTime (s)MSE↓ R 2 MSE↓ R 2
10.132.030.990528.210.8713
20.131.520.992952.100.7584
30.131.320.993846.650.7872
40.132.060.990563.390.7061
50.131.620.992427.140.8778
60.131.760.991841.940.8111
70.131.350.993729.600.8650
80.130.920.995750.370.7664
90.130.780.996442.500.8029
100.131.390.993633.670.8439
Note: Arrows describe the desirable direction of the metric for better performance: ↓ implies lower is better, ↑ implies higher is better.

3.9. Classification with Oversampling

To show the performance of classification models under an oversampling scheme, Table 5 shows the rendered results in terms of learning and performance metrics. By observing Table 5, we note the following facts:
  • Computation Time: Slightly increased compared to default parameters, ranging from 0.20 to 0.21 s. per trial, yet remains consistent and efficient.
  • Training Performance: Models achieved low MSEs (0.73–1.96) and high R 2 values (0.9948–0.9980), indicating an excellent fit with the training data.
  • Testing Performance: The models achieved an improved MSE in some trials compared to the ones with default parameters, with MSEs ranging from 28.57 to 59.56 and R 2 values ranging from 0.7238 to 0.8697, showing the moderate generalization and the reduction in overfitting.
  • Variability: The models achieved low variability in computation times and training metrics and moderate variability in testing metrics, reflecting fluctuations in model generalization across trials.
Table 5. Classification performance metrics (training and testing) with random oversampling.
Table 5. Classification performance metrics (training and testing) with random oversampling.
TrainingTesting
TrialTime (s)MSE↓ R 2 MSE↓ R 2
10.211.420.996228.570.8697
20.211.190.996845.690.7881
30.200.930.997547.560.7830
40.211.420.996259.560.7238
50.211.420.996233.580.8487
60.201.620.995744.760.7984
70.201.140.997031.840.8547
80.200.730.998052.080.7585
90.210.780.997934.080.8420
100.201.960.994834.170.8415
Note: Arrows describe the desirable direction of the metric for better performance: ↓ implies lower is better, ↑ implies higher is better.

3.10. Classification with Hyperparameter Tuning

Finally, to show the performance of classification models with the hyperparameter tuning scheme, Table 6 shows the rendered performance metrics. By observing Table 6, we note the following facts:
  • Computation Time: The models were learned with more variability compared to previous approaches, with learning times ranging from 0.09 to 1.80 s. per trial, reflecting the increased computational cost of 10-fold cross-validation.
  • Training Performance: The models achieved low MSEs (0.73–1.96) and high R 2 values (0.9948–0.9980), indicating a strong model fit on training data.
  • Testing Performance: The model achieved MSEs on testing ranging from 15.65 to 54.46 and R 2 values from 0.7516 to 0.9274, suggesting better generalization and reduced overfitting in certain cases.
  • Variability: The models achieved high variability in computation times and moderate variability in testing metrics, reflecting the effects of cross-validation and parameter tuning on model performance.
Table 6. Classification performance metrics using hyperparameter tuning.
Table 6. Classification performance metrics using hyperparameter tuning.
TrainingTesting
TrialTime (s)MSE↓ R 2 MSE↓ R 2
11.661.420.996217.990.9179
20.231.190.996843.620.7977
30.090.930.997554.460.7516
40.411.420.996243.150.7999
50.161.420.996223.390.8947
60.171.620.995736.820.8342
71.081.140.997028.720.8690
80.110.730.998033.350.8454
91.580.780.997915.650.9274
101.801.960.994821.840.8987
Note: Arrows describe the desirable direction of the metric for better performance: ↓ implies lower is better, ↑ implies higher is better.

3.11. Overall Comparison

In order to compare the performance of the above-mentioned random forest models, we performed 100 independent runs and compared the MSE and R 2 metrics, as shown in Figure 5 and Figure 6, respectively. By looking at these results, one can note the following facts:
  • Random forests utilizing oversampling and hyperparameter tuning outperform the default configuration in both MSE and R 2 metrics. However, the difference in performance between oversampling and hyperparameter tuning alone is not substantial. Given that hyperparameter tuning is a relatively computationally intensive process, the oversampling approach provides comparable performance benefits with significantly lower computational costs, making it a more efficient choice in practice.
  • Although classification models initially outperformed regression models under default parameter configurations, the performance gap between the two approaches diminished significantly when oversampling and hyperparameter tuning were applied. In fact, regression models consistently outperformed classification models across all instances on the testing dataset. This finding underscores the practical advantages of using regression trees for estimating the cooling conditions of steel parts.
Figure 5. Comparison of MSE over 100 independent runs (smaller MSE values are better).
Figure 5. Comparison of MSE over 100 independent runs (smaller MSE values are better).
Applsci 15 11676 g005
Figure 6. Comparison of R 2 coefficient over 100 independent runs (higher values of R 2 are better).
Figure 6. Comparison of R 2 coefficient over 100 independent runs (higher values of R 2 are better).
Applsci 15 11676 g006

3.12. Feature Importance

To illustrate the importance of each feature in constructing decision trees within a random forest, Figure 7 presents the degree of importance for nine independent random forest models derived from a regression under an oversampling scheme. By examining the results in Figure 7, we observed the following key findings:
  • Chemical Composition: Carbon and chromium were found to play significant roles in determining the cooling conditions of steel parts. In heat treatment, carbon is widely recognized as the most influential element, as it directly affects wear resistance, hardness, and strength. The microstructural properties of metals are influenced by both cooling rates and chemical composition [16,17,18,19]. Under air cooling, increasing the carbon content induces an increase in hardness and brittleness [32]. Our results showed that carbon was the most important feature when decision trees were constructed to predict the cooling parameters of steel parts. Furthermore, chromium, which is also considered important in heat treatment due to its effect on hardenability and corrosion resistance, exhibited relatively high importance values in our analysis.
  • Material: No consistent pattern was observed regarding the importance of the seven materials in model development. While some materials contributed more than others, there were no notable commonalities among them. Overall, this suggests that material type is not a significant factor in determining the cooling conditions of steel parts.
  • Weight: After carbon, the weight of each steel part emerged as the second most important factor in building decision trees for estimating cooling parameters. This can be attributed to the well-known mass effect in steel-part annealing: heavier parts are less likely to be quenched thoroughly to the center, whereas smaller parts cool more quickly and uniformly, making complete quenching easier. Thus, differences in mass directly influence the efficiency of heat transfer and cooling, establishing weight as a crucial factor in determining optimal cooling conditions.
  • Shape: Although it was initially thought that the ease of heat conduction due to part shape might have a significant impact, overall, none of the shapes emerged as particularly important factors. However, the washer and ring shapes showed relatively higher importance. This is likely because both shapes have a hollow center, which facilitates more efficient cooling compared to other shapes.
Based on the above findings, the amounts of chemical components—particularly carbon and chromium—as well as the weight of the steel parts, were identified as key factors in constructing highly effective decision trees for determining optimal cooling conditions. Using only these explanatory variables, it is possible to build decision trees that achieve a coefficient of determination R 2 of 0.92, indicating performance nearly equivalent to regression models that include all explanatory variables. Conversely, since other factors contribute only marginally to model improvement, focusing on chemical composition and weight is both efficient and practical for real-world applications. The above observations align closely with the practical expertise of seasoned operators who routinely recommend cooling parameters for the metal-annealing process.
Our results highlight that both the intrinsic properties of steel parts (determined mainly by C and Cr composition) and extrinsic factors such as part weight collectively govern the cooling parameter and, thus, the resulting microstructure. From a heat-transfer perspective, the chemical composition in terms of C and Cr influences several key thermal properties: (1) Regarding surface oxide characteristics, chromium (Cr) is known to form stable and protective oxide layers [33]. These layers act as thermal barriers and reduce the rate of heat transfer from the steel to the environment. In contrast, steels with higher carbon (C) but low chromium (Cr) tend to form less-protective iron oxides, which are less effective at impeding the heat flow; thus, the composition of both C and Cr influences surface heat transfer during cooling. (2) Regarding the heat-transfer coefficient within steel, a higher C content in steel reduces thermal conductivity due to C atoms acting as scattering centers for heat carriers (electrons and phonons), thus making it difficult for heat to move from the steel’s interior to its surface. Similarly, the addition of Cr changes steel’s microstructure and lattice, introducing further scattering sites, which lowers thermal conductivity compared to plain carbon steels. As a result, steels with higher C and Cr content exhibit more distorted crystal structures and increased electron scattering, impeding the conduction of heat and causing them to cool more slowly. (3) Regarding the latent heat of phase transformation, the latent heat released or absorbed during steel phase transformations is strongly influenced by C and Cr. While carbon can shift the transformation temperatures of steel, chromium can stabilize certain phases and alter the transformation pathway. These changes in the transformation pathway affect the amount of energy that must be removed for the steel to fully transform, thus potentially impacting the cooling rate. (4) Regarding specific heat, carbon enables the formation of iron carbide, which changes the microstructure and thereby influences how thermal energy is absorbed and stored in steel. Chromium primarily influences steel’s hardenability, thereby potentially lowering the critical cooling rate required to form martensite during quenching. (5) Regarding the surface heat-transfer coefficient, chromium (Cr) enhances the formation of a dense, protective oxide layer, potentially reducing the thermal conductivity and decreasing the rate at which heat can be transferred to the cooling medium.
Additionally, to validate our observations, we processed approximately 40 steel parts in a real-world setting using parameter values estimated from one of the constructed decision trees. The applied parameters consistently resulted in the hardenability of the steel parts falling within the standard acceptable range. These results show the practical feasibility of using random forests for predicting the cooling conditions in steel part annealing.
Further accuracy improvements are expected as data continues to be accumulated. While the random forest inherently includes stochastic elements, prediction performance can be maintained by increasing the number of trees and the tree depth and by using ensemble averaging. Additionally, since training time occurs on the order of less than one second (about 0.4 s when random oversampling is used), carefully selected additional data has the potential to improve model generalization for existing models by covering a wider range of cooling conditions.
Although our study has focused on air-based cooling rate parameters, further research to elucidate the feasibility of random forests in modeling other commonly used heat treatment processes with high repeatability—such as vacuum heat treatment (HT) combined with gas cooling—remains highly relevant for industry. These processes are valued for their controlled cooling rates, which help achieve consistent microstructures and mechanical properties. Given the diversity of cooling media—including water, oil, polymers, and gases—each with distinct effects on steel microstructure, developing reliable cooling rate prediction models for such standard processes has the potential to enhance predictability and quality control. This targeted approach could also streamline industrial process optimization and reduce trial and error in production environments.
Our results demonstrate the feasibility of using random forests to predict cooling rates in steel part annealing. However, as steels exhibit diverse transformation behaviors, depending on their composition and cooling conditions—as illustrated by the variety of continuous cooling transformation (CCT) diagrams available for different grades—an enhanced dataset that includes a broader range of steels, along with validation against experimental cooling diagrams, has the potential to aid in constructing robust random forest models applicable across different steel grades and heat treatment scenarios.
Figure 7. Feature importance over nine independent instances using regression under an oversampling scheme.
Figure 7. Feature importance over nine independent instances using regression under an oversampling scheme.
Applsci 15 11676 g007
Furthermore, although we considered the geometry of steel parts as one feature, size and batch limits may play important roles in cooling rate prediction. For instance, oversized steel parts and larger batch sizes may lead to non-uniform temperature distribution and cooling rates, potentially impacting microstructure composition. In future work, we plan to investigate the effect of steel part size and batch limits on cooling-rate prediction within heat treatment contexts, further elucidating the reliability of random forests within practical boundaries.

4. Conclusions

We investigated the feasibility of using random forests to predict cooling-rate parameters for the heat treatment of steel parts. Our computational experiments, based on real-world records collected from the daily operations of an industrial furnace and cooling device operator, demonstrated the advantageous properties of regression random forest models, particularly when combined with an oversampling scheme. We also found that the chemical composition—specifically, the carbon and chromium content—as well as the weight of the steel parts, are key factors in constructing highly effective decision trees for estimating optimal cooling conditions. These findings highlight the effectiveness and practical value of random forests for estimating cooling conditions in steel part annealing. The ensemble approach of random forests, along with their ability to handle feature interactions, makes them well-suited to modeling useful decision trees, further emphasizing their practical applicability for industrial annealing processes.

Author Contributions

Conceptualization, I.N., V.P., Y.I. and K.N.; Methodology, I.N., V.P., Y.I. and K.N.; Software, I.N. and V.P.; Validation, I.N.; Investigation, I.N. and V.P.; Resources, I.N.; Data curation, I.N. and V.P.; Writing—original draft, V.P.; Writing—review & editing, I.N., V.P., Y.I. and K.N.; Visualization, I.N. and V.P.; Supervision, V.P., Y.I. and K.N.; Project administration, I.N., V.P., Y.I. and K.N. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Institutional Review Board Statement

Not applicable.

Informed Consent Statement

Not applicable.

Data Availability Statement

The raw data supporting the conclusions of this article will be made available by the authors on request.

Conflicts of Interest

The authors declare no conflicts of interest.

References

  1. Yi, Q.; Wu, X.; Zhuo, J.; Li, C.; Li, C.; Cao, H. An incremental data-driven approach for carbon emission prediction and optimization of heat treatment processes. Case Stud. Therm. Eng. 2025, 72, 106320. [Google Scholar] [CrossRef]
  2. Mudda, S.; Hegde, A.; Sharma, S.; Gurumurthy, B. Optimization of various heat treatment parameters for superior combination of hardness and impact energy of AISI 1040 steel. J. Mater. Res. Technol. 2025, 38, 3900–3908. [Google Scholar] [CrossRef]
  3. Yang, P.; Su, H.; Guo, Y.; Zhou, H.; Xia, L.; Shen, Z.; Wang, M.; Zhang, Z.; Guo, M. Influence of cooling rate during the heat treatment process on the precipitates and ductility behavior of inconel 718 superalloy fabricated by selective laser melting. Mater. Sci. Eng. A 2024, 902, 146603. [Google Scholar] [CrossRef]
  4. Yan, M.; Zhang, H.; Yang, F.; Gui, Y.; Han, Z.; Fu, H. The Effect of Heat Treatment on the Microstructure and Mechanical Properties of Powder Metallurgy Ti-48Al Alloy. Metals 2024, 14, 661. [Google Scholar] [CrossRef]
  5. Lütjering, G. Influence of processing on microstructure and mechanical properties of (α + β) titanium alloys. Mater. Sci. Eng. A 1998, 243, 32–45. [Google Scholar] [CrossRef]
  6. Zhang, K.; Hu, R.; Li, J.; Yang, J.; Gao, Z. Grain refinement of 1 at.% Ta-containing cast TiAl-based alloy by cyclic air-cooling heat treatment. Mater. Lett. 2020, 274, 127940. [Google Scholar] [CrossRef]
  7. Yao, X.; Wang, W.; Qi, X.; Lv, Y.; Yang, W.; Li, T.; Chen, J. Effects of heat treatment cooling methods on precipitated phase and mechanical properties of CoCrFeMnNi–Mo5C0.5 high entropy alloy. J. Mater. Res. Technol. 2024, 29, 3566–3574. [Google Scholar] [CrossRef]
  8. Milenkovic, S.; Sabirov, I.; LLorca, J. Effect of the cooling rate on microstructure and hardness of MAR-M247 Ni-based superalloy. Mater. Lett. 2012, 73, 216–219. [Google Scholar] [CrossRef]
  9. Patil, M.A.; Ghara, T.; Das, B.; Kulkarni, D.M. Influence of cooling rate on microstructure, dislocation density, and associated hardness of laser direct energy deposited Inconel 718. Surf. Coat. Technol. 2025, 495, 131575. [Google Scholar] [CrossRef]
  10. Hall, E.O. The Deformation and Ageing of Mild Steel: III Discussion of Results. Proc. Phys. Soc. Sect. B 1951, 64, 747. [Google Scholar] [CrossRef]
  11. Petch, N.J. The Cleavage Strength of Polycrystals. J. Iron Steel Inst. 1953, 174, 25–28. [Google Scholar]
  12. Shin, B.H.; Park, J.; Jeon, J.; Heo, S.B.; Chung, W. Effect of cooling rate after heat treatment on pitting corrosion of super duplex stainless steel UNS S 32750. Anti-Corros. Methods Mater. 2018, 65, 492–498. [Google Scholar] [CrossRef]
  13. Skulkina, N.; Ivanov, O.; Deanisov, N.; Chekis, V. Cooling rate upon in air heat treatment and magnetic properties of amorphous soft magnetic alloys. J. Magn. Magn. Mater. 2019, 470, 156–158. [Google Scholar] [CrossRef]
  14. Ahmed, M.; Savvakin, D.G.; Ivasishin, O.M.; Pereloma, E.V. The effect of cooling rates on the microstructure and mechanical properties of thermo-mechanically processed Ti–Al–Mo–V–Cr–Fe alloys. Mater. Sci. Eng. A 2013, 576, 167–177. [Google Scholar] [CrossRef]
  15. Xu, J.; Zeng, W.; Zhao, Y.; Sun, X.; Du, Z. Influence of cooling rate following heat treatment on microstructure and phase transformation for a two-phase alloy. J. Alloys Compd. 2016, 688, 301–309. [Google Scholar] [CrossRef]
  16. Feng, L.; Hu, F.; Zhou, W.; Ke, R.; Zhang, G.; Wu, K.; Qiao, W. Influences of Alloying Elements on Continuous Cooling Phase Transformation and Microstructures of Extremely Fine Pearlite. Metals 2019, 9, 70. [Google Scholar] [CrossRef]
  17. Dey, I.; Ghosh, S.K.; Saha, R. Effects of cooling rate and strain rate on phase transformation, microstructure and mechanical behaviour of thermomechanically processed pearlitic steel. J. Mater. Res. Technol. 2019, 8, 2685–2698. [Google Scholar] [CrossRef]
  18. Gao, M.; Yang, J.; Zhang, Y.; Song, H. Effect of Alloying Elements on Pearlite Critical Cooling Rate of U75V Rail-steel. Trans. Indian Inst. Met. 2023, 76, 665–673. [Google Scholar] [CrossRef]
  19. Abdali, A.; Hossein Nedjad, S.; Hamed Zargari, H.; Saboori, A.; Yildiz, M. Predictive tools for the cooling rate-dependent microstructure evolution of AISI 316L stainless steel in additive manufacturing. J. Mater. Res. Technol. 2024, 29, 5530–5538. [Google Scholar] [CrossRef]
  20. Li, Q.; Wang, J.; Xue, C.; Miao, Y.; Hou, Q.; Meng, Y.; Yang, X.; Li, X. Quantifying the effects of cooling rates on Fe-rich intermetallics in recycled Al-Si-Cu alloys by machine learning. J. Alloys Compd. 2025, 1014, 178718. [Google Scholar] [CrossRef]
  21. Geng, X.; Mao, X.; Wu, H.H.; Wang, S.; Xue, W.; Zhang, G.; Ullah, A.; Wang, H. A hybrid machine learning model for predicting continuous cooling transformation diagrams in welding heat-affected zone of low alloy steels. J. Mater. Sci. Technol. 2022, 107, 207–215. [Google Scholar] [CrossRef]
  22. Afflerbach, B.T.; Francis, C.; Schultz, L.E.; Spethson, J.; Meschke, V.; Strand, E.; Ward, L.; Perepezko, J.H.; Thoma, D.; Voyles, P.M.; et al. Machine Learning Prediction of the Critical Cooling Rate for Metallic Glasses from Expanded Datasets and Elemental Features. Chem. Mater. 2022, 34, 2945–2954. [Google Scholar] [CrossRef]
  23. Schultz, L.E.; Afflerbach, B.; Voyles, P.M.; Morgan, D. Machine learning metallic glass critical cooling rates through elemental and molecular simulation based featurization. J. Mater. 2025, 11, 100964. [Google Scholar] [CrossRef]
  24. Akif Koç, M.; Ahlatci, H.; Esen, İ.; Eroğlu, M. Prediction of accelerated cooling rates in H-section steels using artificial neural networks. Case Stud. Therm. Eng. 2025, 74, 106939. [Google Scholar] [CrossRef]
  25. Liu, A.; Liu, F.; Zhao, S.; Ren, R.; Zhou, Y.; Shi, T.; Liu, J. Prediction of critical cooling rate under rapid heating rate and short holding time for pearlitic rail steel. J. Mater. Res. Technol. 2025, 36, 6534–6541. [Google Scholar] [CrossRef]
  26. Pedregosa, F.; Varoquaux, G.; Gramfort, A.; Michel, V.; Thirion, B.; Grisel, O.; Blondel, M.; Prettenhofer, P.; Weiss, R.; Dubourg, V.; et al. Scikit-learn: Machine Learning in Python. J. Mach. Learn. Res. 2011, 12, 2825–2830. [Google Scholar]
  27. Scikit-Learn: Machine Learning in Python, Version 1.7.2. 2025. Available online: https://scikit-learn.org/stable/ (accessed on 7 September 2025).
  28. Breiman, L. Random Forests. Mach. Learn. 2001, 45, 5–32. [Google Scholar] [CrossRef]
  29. Breiman, L. Bagging predictors. Mach. Learn. 1996, 24, 123–140. [Google Scholar] [CrossRef]
  30. Breiman, L.; Friedman, J.; Olshen, R.A.; Stone, C.J. Classification and Regression Trees, 1st ed.; Chapman and Hall/CRC: New York, NY, USA, 1984. [Google Scholar] [CrossRef]
  31. Sequential Model-Based Optimization in Python, Version 0.8.1. 2025. Available online: https://scikit-optimize.github.io/stable/index.html (accessed on 7 September 2025).
  32. Wang, X.; Chen, Y.; Wei, S.; Zuo, L.; Mao, F. Effect of Carbon Content on Abrasive Impact Wear Behavior of Cr-Si-Mn Low Alloy Wear Resistant Cast Steels. Front. Mater. 2019, 6, 153. [Google Scholar] [CrossRef]
  33. Hebbale, A.M.; Ramesh, M.; Petru, J.; Chandramouli, T.; Srinath, M.; Shetty, R.K. A microstructural study and high-temperature oxidation behaviour of plasma sprayed NiCrAlY based composite coatings. Results Eng. 2025, 25, 103926. [Google Scholar] [CrossRef]
Figure 1. Concept of fan-assisted air cooling in the heat treatment of steel parts.
Figure 1. Concept of fan-assisted air cooling in the heat treatment of steel parts.
Applsci 15 11676 g001
Figure 2. (a) Example of a tree and (b) impurity improvement when searching for node splits. Each non-terminal node generates left and right children, following a splitting strategy that aims to maximize the proxy impurity improvement metric.
Figure 2. (a) Example of a tree and (b) impurity improvement when searching for node splits. Each non-terminal node generates left and right children, following a splitting strategy that aims to maximize the proxy impurity improvement metric.
Applsci 15 11676 g002
Figure 3. Example of trees in a random forest model for regression and the associated thresholds, impurity, and values in each node.
Figure 3. Example of trees in a random forest model for regression and the associated thresholds, impurity, and values in each node.
Applsci 15 11676 g003
Figure 4. Data distribution in training (left), testing (center), and oversampling mechanism (right).
Figure 4. Data distribution in training (left), testing (center), and oversampling mechanism (right).
Applsci 15 11676 g004
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Nakatsukasa, I.; Parque, V.; Ito, Y.; Nakano, K. Predicting the Cooling Rate in Steel-Part Heat Treatment via Random Forests. Appl. Sci. 2025, 15, 11676. https://doi.org/10.3390/app152111676

AMA Style

Nakatsukasa I, Parque V, Ito Y, Nakano K. Predicting the Cooling Rate in Steel-Part Heat Treatment via Random Forests. Applied Sciences. 2025; 15(21):11676. https://doi.org/10.3390/app152111676

Chicago/Turabian Style

Nakatsukasa, Ikuto, Victor Parque, Yasuaki Ito, and Koji Nakano. 2025. "Predicting the Cooling Rate in Steel-Part Heat Treatment via Random Forests" Applied Sciences 15, no. 21: 11676. https://doi.org/10.3390/app152111676

APA Style

Nakatsukasa, I., Parque, V., Ito, Y., & Nakano, K. (2025). Predicting the Cooling Rate in Steel-Part Heat Treatment via Random Forests. Applied Sciences, 15(21), 11676. https://doi.org/10.3390/app152111676

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop