polymers
ArticleDevelopment of a Machine Learning Model to Predict the Colorof Extruded Thermoplastic Resins
Puay Keong Neo 1,2, *, Yew Wei Leong 3 , Moi Fuai Soon 2 , Qing Sheng Goh 2 , Supaphorn Thumsorn 4
and Hiroshi Ito 1,4, *
1

2

3

4

*

Citation: Neo, P.K.; Leong, Y.W.; Soon,
M.F.; Goh, Q.S.; Thumsorn, S.; Ito, H.
Development of a Machine Learning
Model to Predict the Color of
Extruded Thermoplastic Resins.
Polymers 2024, 16, 481.
https://doi.org/10.3390/
polym16040481

Graduate School of Organic Materials Science, Yamagata University, 4-3-16 Jonan,
Yonezawa 992-8510, Yamagata, Japan
Omni-Plus System Limited, 994 Bendemeer Road, 01-03 B-Central, Singapore 339943, Singapore;mfsoon.sg@ops-sys.com (M.F.S.); qsgoh.sg@ops-sys.com (Q.S.G.)
Matwerkz Technologies Pte Ltd., 994 Bendemeer Road, 01-03 B-Central, Singapore 339943, Singapore;enquiry@matwerkz.com
Research Center for GREEN Materials and Advanced Processing, Yamagata University, 4-3-16 Jonan,
Yonezawa 992-8510, Yamagata, Japan; thumsorn@yz.yamagata-u.ac.jp
Correspondence: pkneo@ops-sys.com (P.K.N.); ihiroshi@yz.yamagata-u.ac.jp (H.I.);
Tel.: +65-(98)-157552 (P.K.N.); +81-(23)-8263081 (H.I.)

Abstract: The conventional method for the color-matching process involves the compounding ofpolymers with pigments and then preparing plaques by using injection molding before measuring
the color by an offline spectrophotometer. If the color fails to meet the L*, a*, and b* standards, thecolor-matching process must be repeated. In this study, the aim is to develop a machine learningmodel that is capable of predicting offline color using data from inline color measurements, thereby
significantly reducing the time that is required for the color-matching process. The inline color
data were measured using an inline process spectrophotometer, while the offline color data were
measured using a bench-top spectrophotometer. The results showed that the Bagging with Decision
Tree Regression and Random Forest Regression can predict the offline color data with aggregatedcolor differences (dE) of 10.87 and 10.75. Compared to other machine learning methods, Bagging
with Decision Tree Regression and Random Forest Regression excel due to their robustness, ability
to handle nonlinear relationships, and provision of insights into feature importance. This study
offers valuable guidance for achieving Bagging with Decision Tree Regression and Random Forest
Regression to correlate inline and offline color data, potentially reducing time and material waste incolor matching. Furthermore, it facilitates timely corrections in the event of color discrepancies being
observed via inline measurements.
Keywords: compounding; coloration; thermoplastic; machine learning; color prediction

Academic Editor: Ming-Jay Deng
Received: 17 January 2024
Revised: 2 February 2024
Accepted: 6 February 2024
Published: 8 February 2024

Copyright: © 2024 by the authors.
Licensee MDPI, Basel, Switzerland.
This article is an open access article
distributed under the terms andconditions of the Creative Commons
Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).

1. Introduction
Color analysis stands as a crucial tool with a myriad of applications. Color analysis
plays a pivotal role in determining tolerances for automotive coatings, ensuring the ultimate
satisfaction of the end products. This becomes particularly crucial as automobiles arecomposed of a diverse range of materials. It is essential to verify that the color coating
maintains a consistent and uniform appearance when applied to different materials withvarying textures [1]. Additionally, Ariño et al. explored the impact of a plastic texture on
color perception. Their conclusion highlighted the noteworthy influence that the texture ofplastic exerts on color perception [2].
To create a standard for color communication during color analysis, the International
Commission on Illumination (CIE) developed the CIE L* a* b* color space in 1976. The CIE
1976 L* a* b* color space is a three-dimensional, approximately uniform color space, produced by plotting in rectangular coordinates, L*, a*, and b* [3]. L* indicates lightness, a* is

Polymers 2024, 16, 481. https://doi.org/10.3390/polym16040481

https://www.mdpi.com/journal/polymers

Polymers 2024, 16, 481

2 of 19

the red/green coordinate, and b* is the yellow/blue coordinate. The positive
2 of 19 a* axis points
roughly towards red color stimuli, the negative axis points approximately towards green
stimuli, the positive b* axis points approximately towards yellow stimuli, and the negative
b* axispointsapproximately
stimuli. L*towards
is associatedwith thetowards
red colorstimuli,the negative towards
axis pointsblue
approximately
green stimuli,
the luminance of
positive
axis pointsmaking
approximately
towards
yellowof
stimuli,and theb* axis points
theb*stimulus,
it a basic
indicator
lightness[4].negative
The differencesin L*, a *, and b*
approximately
blue stimuli.
L* is associatedthe luminanceof thestimulus,
betweentowards
two specimens,which
are also withreferred
to as Delta
Values,aremakcalculated using
ing it aEquations
basic indicatorof lightness [4]. The differences in L*, a *, and b* between two specimens,(1)–(3).
∗∗∆Lcalculated= L∗Sample− LEquations(1)
which are also referred to as Delta Values, areusingStandard (1)–(3).

Polymers 2024, 16, x FOR PEER REVIEW∆𝐿∗ = 𝐿∗∆a∗ =−a∗Sample
𝐿∗− a∗Standard

(1)

(2)

∗
∗∗
∗
− bStandard∆𝑎∗ = 𝑎∗∆b =−bSample
𝑎

(2)

(3)

Historically, the measurementof color
has typically been carried out via offline color∆𝑏 ∗ = 𝑏 ∗− 𝑏∗(3)measurements using offline bench-top spectrophotometers [5]. To achieve this, the materials
Historically,
the measurement
color hastypically
been carriedout viaoﬄine color
must undergomolding intoofplates
after
the extrusion
process.
However,the preparation
measurements
using
spectrophotometers[5]. To achieve this,mateof samples
foroﬄine
offlinebench-top
color measurement
is a labor-intensive
and thetime-consumingtask,
rials must
undergomolding
intoplatesafter
theextrusion
process.
However,thepreparesulting in delayed measurement reports. This delay carries a significant risk of producing
rationproductsof samples
formayoﬄine
measurement
is a duringlabor-intensive
and time-consumingthatnotcolormeetspecifications
the waiting
period [6].
task, resulting in delayed measurement reports. This delay carries a significant risk of proAn offline bench-top spectrophotometer serves as a specialized instrument, tailoredducing products that may not meet specifications during the waiting period [6].
for conducting color measurements and analyses in a laboratory or controlled environment.
An oﬄine bench-top spectrophotometer serves as a specialized instrument, tailored
In contrast
to inline
spectrophotometers
are seamlessly
integrated
into production
for conductingcolor
measurements
and analyses inthata laboratory
or controlledenvironlinesforreal-timepolymermelt
flow
measurements,
theofflinebench-top
variant excels in
ment. In contrast to inline spectrophotometers that are seamlessly integrated into producdelivering
preciseandaccuratecolor
measurements
withinastationary
setting.
tion lines for real-time polymer melt flow measurements, the oﬄine bench-top variant
The offline
bench-top
spectrophotometer
incorporates
sphericalsetting.
interior. The design
excels in delivering
preciseand accurate
color measurements
within a astationary
strategicallyobstructs
the light source,incorporates
directing ita fromthe color
chip
and
The
oﬄine bench-top
spectrophotometer
spherical
interior.
Thede-reflecting it atsign strategicallythe light
directingfrom the color ensureschip and thatreflecting
an 8-degreeobstructs
angle fromthe source,
specimen.
This itconfiguration
the reflected lightit at an8-degree angle
from theThisenabling
configuration
ensuresthat the reflectedis effectively
capturedbyspecimen.
the detector,
preciseand accurate
color measurements.
light iseﬀectively
capturedbythedetector,enabling
preciseandaccuratecolor measureTwo commonly employed measurement geometries in offline bench-top
spectrophotomements.
Twoemployedters
arecommonly
SCI and SCE[7]. measurement geometries in oﬄine bench-top spectrophotometers are SCI and SCE [7].
Specular Component Included (SCI): In SCI measurements, the spectrophotometer
Specular Component Included (SCI): In SCI measurements, the spectrophotometer
captures all reflected light, including both specular and diffuse components. This effectively
captures all reflected light, including both specular and diﬀuse components. This eﬀeceliminates the impact of specular reflection from the surface, allowing the measurement
tively eliminates the impact of specular reflection from the surface, allowing the measureAsaaresult,result,SCI
SCIisisuniversally
universally adopted byment totofocusfocus solely
solely on
on color
color rather
rather than
than appearance.
appearance. As
companies
forformulatingcolor
recipes.
adopted by companies for formulating color recipes.
SpecularComponent
Excluded
In SCE measurements,
the spectrophotometer
SpecularComponent
Excluded(SCE): In (SCE):
SCE measurements,
the spectrophotometerselectively
records
only
the reflection
diffuse reflectionof light
from the material’s
surface, excluding
selectively
records
only thediﬀuseof light fromthe material’s
surface, excluding specularreflection.
ThisThis
approachincorporates
the surface
into the measspecularreflection.
approachincorporates
the appearance
surface appearance
into the measureurement.
Consequently,
SCE proves
more valuable
for qualityfor
controlin theproduction
ment.
Consequently,
SCE proves
more valuable
qualitycontrolin the production
process,
especiallywhen awhen
balancebetween between
color and color
appearanceis crucial. is crucial.
process,
especiallya balance
and appearance
FigureFigure
1 shows1 theworkingprincipleofanofflinebench-top
spectrophotometerwith (a)shows the working principle of an offline bench-top spectrophotometerwithSpecularComponent
Excludedgeometryand(b)SpecularComponent
Includedgeometry.
(a) Specular Component Excluded geometry and (b) Specular Component Included geometry.

(a)

(b)

Figure 1. Working principle of an offline bench-top spectrophotometer with (a) Specular Component
Excluded and (b) Specular Component Included.

Polymers 2024, 16, x FOR PEER REVIEW

3 of 19

Polymers 2024, 16, 481

3 of 19

Figure 1. Working principle of an oﬄine bench-top spectrophotometer with (a) Specular Component Excluded and (b) Specular Component Included.

Conversely, an inline color measurement involves conducting direct color measureConversely,
an inline
measurement
involves conducting
direct color
measurementson the polymer
melt,color
which
is already pigmented,
preferably within
the compoundments onitself
the polymer
melt,anwhichalreadyspectrophotometer
pigmented, preferably
the compound
extruder[5], by using
inlineisprocess(IPS).within
This allows
operators
toexaminethe[5],
polymerduringproduction
and they are alertedsoon
as theoperacolor
extruderitselfby using
an inline
process[8],spectrophotometer(IPS).asThis
allowsbeginsdeviatethe
out-of-spec
so that production
corrections [8],can andbe madeimmediately
minimize
tors to to
examinepolymer during
they arealerted astosoon
as theproduct
rejects
wastage.
color begins
to anddeviateout-of-spec so that corrections can be made immediately to miniIPS works
illuminating
mizeTheproduct
rejectsby
andwastage. the molten polymer within the die using light fromthe source
at works
Angle by2, whichtravelsthe
throughfiber optics
Reflection
Polymer
The IPS
illuminating
moltenthe
polymerwithinandtheadieusing light
from
Melt
Probeat(RPMP).
reflected
fromthepolymerthen captured
at Angle
the source
Angle 2,The
which
travelssignal
throughthefiber
optics melt
and aisReflection
PolymerMelt
1Probeand (RPMP).
transported
to theIPS.from[9] Angle
1 aimsmelt
to closely
the sphere
Theback
reflected
signalthe polymer
is thenapproximate
captured at Angle
1 and◦ ) of a bench-top spectrophotometer,
measurement(commonly
to 1asaims
diffuse/8
transported backto the IPS.referred[9] Angle
to closely
approximate the sphere measurewhich
is set at 8 degrees.
However,owingofto
equipmentspectrophotometer,
constraints, the optimal
ment (commonlyreferred toas diﬀuse/8°)
a bench-top
whichangle
is setthatitcanattainis
Angle
1.
Figure2showstheworkingprinciple
oftheinlineprocess
at 8 degrees. However, owing to equipment constraints, the optimal angle that it can
attainspectrophotometer.
is Angle 1. Figure 2 shows the working principle of the inline process spectrophotometer.

principle ofof inline
inline processprocess spectrophotometer.
spectrophotometer.
Figure 2. Working principle

However, in previous research, it was observed that the scale of the colors of inline
and offline
thethecolor
changeinoﬄine color
color measurements
measurementsare
aredistinctly
distinctlydifferent
diﬀerent[10].
[10].Specifically,
Specifically,color
changeinlinemeasurements
isminimal,
whereasit
registersassignificantly
morepronounced
in
in inline measurements is minimal, whereas it registers as significantly more pronounced
offlinemeasurements.
This
discrepancyemphasizes
the need
for refined
approaches
in hanin oﬄine
measurements.
This
discrepancyemphasizes
the need
for refined
approaches
in
dling
data
from
these
two
distinct
measurement
methods.
Addressing
thisincongruity
will
handling data from these two distinct measurement methods. Addressing this incongrufacilitate
the predictionof the CIE
L*, CIEa*, andb* andvaluesfor thefor
outputsolid polymer
based
ity will facilitate
the predictionof theL*, a*,
b* values
the output
solid polymeronthe oninlinecolor measurement,
enabling
corrections
in caseinofcase
anyofdetected
deviations
based
the inline
color measurement,
enabling
corrections
any detected
deviandaverting
therejectionoftheentireproduction
batch.
ations and averting the rejection of the entire production batch.
In
In recentrecent times,
times, there
there has
has been
been aa discernible
discernible shift
shift towards
towards thethe application
application ofof machinemachinelearning
algorithms
andartificial
intelligence
to
model
and
optimizetherelationshipbetweenlearning algorithms and artificial intelligence to model and optimize the relationshipbeinput
andoutputvariables.
Illustrating
this
trend
is
Lee’s
study,
wherean
Artificial
Neuraltween input and output variables. Illustrating this trend is Lee’s study, where an Artificial
Network(ANN) was
implemented.
The ANNwasspecificallydesigneddesigned
to predict
Neural Network(ANN)
was implemented.
The
ANN
was specifically
toproduct
predict
properties
such
as
mass,
diameter,andheight[11].
Shams-Nateri’s
study
also
demonstrated
product properties such as mass, diameter, and height [11]. Shams-Nateri’s study alsoanapplication of
Networks
to relatethe color toof relatefibers inmentioned
directions[12].
demonstrated
anNeuralapplicationof Neural
Networks
thethecolor
of fibersin the menJeon constructed machine learning models to predict the melting temperature after plastitioned directions [12]. Jeon constructed machine learning models to predict the melting temcization [13]. Joo devised three models to predict the physical properties of PP composites,
perature after plasticization [13]. Joo devised three models to predict the physical properties
employing three distinct machine learning (ML) methods: Multiple Linear Regression (MLR),of PP composites, employing three distinct machine learning (ML) methods: Multiple Linear
Deep Neural Network (DNN), and Random Forest (RF) [14].
Regression (MLR), Deep Neural Network (DNN), and Random Forest (RF) [14].
The utilization of machine learning algorithms to develop predictive models from trainThe utilization of machine learning algorithms to develop predictive models from training data demonstrates significant potential for enhancing product quality and minimizing
ing data demonstrates significant potential for enhancing product quality and minimizing
waste and downtime in the polymer processing industries [15]. However, a common drawwaste and downtime in the polymer processing industries [15]. However, a common drawback that has been observed in many of the machine learning approaches and highlighted
back that has been observed in many of the machine learning approaches and highlighted inin the literature is the opaque nature of these algorithms. Often, it becomes challenging to
the literature is the opaque nature of these algorithms. Often, it becomes challenging to discern
discern the reasons behind the model’s accurate predictions, as they provide little insightthe reasons
behind themodel’saccurate
as influencing
they providethe
littleinsight
into the uninto
the underlying
process
factors
andpredictions,relationships
output[16].
derlying
process
factorsandrelationships
influencing
theoutput[16].
The objective of this study is to design a machine learning model to predict theoffline color measurement data using the inline color measurement and material dosage asPolymers 2024, 16, 481

4 of 19

input parameters. To achieve this, Bagging with Decision Tree Regression, Deep Neural
Network, Multiple Linear Regression, and Random Forest Regression are used as themachine learning model. The performance of the model will be evaluated using aggregateddE, which is similar to the root mean square error (RMSE). The insights gained from thisstudy will facilitate the real-time monitoring and prediction of offline color data duringcompounding through the utilization of inline color data. This approach enables timely
corrections to be implemented in the event of any detected deviations.
2. Materials and Methods
2.1. Materials
In this study, a compounding process, followed by an injection molding process,was conducted to gather a well-diversified set of data for training the machine learningmodels. The materials employed in this study include polycarbonate resin, dispersing
agent, and pigments. Polycarbonate (PC) (Makrolon® 2807) was supplied by Covestro,
Singapore. PC Makrolon 2807 has a density of 1.20 g/cm3 and a melt flow rate (MFR) of
10 g/10 min (measured at 300 ◦ C/1.2 kg). Polycarbonate was chosen for its high usage inengineering plastic manufacturing. Ethylene Bis Stearamide (EBS) L-205F dispersing agent
was supplied by DP Chemicals Pte Ltd., Singapore. Pigments, which included Tiona 288,
Raven 1010, Heliogen Green K8730, Ultramarine Blue 05, Solvent Yellow 114, and Plast Red
8355, were supplied by Hexachem (M) Sdn. Bhd, Selangor, Malaysia, and DP Chemicals
Pte Ltd., Singapore.
Formulations crafted for PC experiments are tabulated in Table 1. The components ineach formulation were first manually hand-tumbled to ensure uniformity before feedingthem into the extruder.
Table 1. Formulation of polycarbonate with different pigments to build the dataset.

Formulation

PC
Makrolon
2807

EBS
L-205F

Tiona
288

Raven 1010

HeliogenGreen K
8730

Ultramarine
Blue 05

Solvent
Yellow 114

Plast Red
8355

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28

100
99.65
99.6
99.45
99.2
98.7
97.7
96.7
94.7
98.7
98.7
98.7
98.7
98.7
98.7
99.69
99.68
99.65
99.6
99.5
99.3
99.1
98.7
99.69
99.68
99.65
99.6
99.5

0
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3

0
0.05
0.1
0.25
0.5
1
2
3
5
0.999
0.995
0.99
0.96
0.7
0.5
0
0
0
0
0
0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0
0
0.001
0.005
0.01
0.04
0.3
0.5
0
0
0
0
0
0
0
0
0.01
0.02
0.05
0.1
0.2

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0.01
0.02
0.05
0.1
0.2
0.4
0.6
1
0
0
0
0
0

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Polymers 2024, 16, 481

5 of 19

Table 1. Cont.

Formulation

PC
Makrolon
2807

EBS
L-205F

Tiona
288

Raven 1010

HeliogenGreen K
8730

Ultramarine
Blue 05

Solvent
Yellow 114

Plast Red
8355

29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

99.3
99.1
98.7
99.69
99.68
99.65
99.6
99.5
99.3
99.1
98.7
99.69
99.68
99.65
99.6
99.5
99.3
99.1
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7
99.69
99.68
99.65
99.6
99.5
99.3
99.1
98.7
98.7
98.7
98.7
98.7
98.7
98.7
98.7

0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3
0.3

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0.95
0.9
0.7
0.5
0.48
0
0
0.95
0.9
0.7
0.5
0.48
0
0
0.95
0.9
0.7
0.5
0.48
0
0
0
0
0
0
0
0
0
0
0.95
0.9
0.7
0.5
0.48
0
0

0.4
0.6
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0.02
0.025
0.05
0
0
0
0
0.02
0.025
0.05
0
0
0
0
0.02
0.025
0.05
0
0
0
0
0
0
0
0
0
0
0
0
0.02
0.025
0.05

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

0
0
0
0.01
0.02
0.05
0.1
0.2
0.4
0.6
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0.05
0.1
0.3
0.5
0.5
0.975
0.95
0.05
0.1
0.3
0.5
0.5
0.975
0.95
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0
0
0
0
0.01
0.02
0.05
0.1
0.2
0.4
0.6
1
0.05
0.1
0.3
0.5
0.5
0.975
0.95
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0.01
0.02
0.05
0.1
0.2
0.4
0.6
1
0.05
0.1
0.3
0.5
0.5
0.975
0.95

Polymers 2024, 16, x FOR PEER REVIEW

81
Polymers 2024,
82 16, 481

83

98.7
98.7
98.7

6 of 19

0.3
0.3
0.3

0.48
0
0

0.02
0.025
0.05

0
0
0

0
0
0

0
0
0

0.5
0.975
6 of 19
0.95

2.2.Compounding
CompoundingEquipment
Equipment
2.2.
Compounding was
was performed
performed byby using
using anan intermeshingintermeshing co-rotating
co-rotating twin
twin screw
screw exexCompounding
truder(Coperion(CoperionGmbH,GmbH,Stuttgart,
Stuttgart,Germany).
Germany). ItIt has
has aa 26
26mm
mmscrew
screwdiameter,
diameter,ananL-to-D
L-to-D
truderratioofof44,
44,is ispowereda 27-kWmotor,
features11 heating
the along
barrelratio
poweredbyby
a 27-kWmotor,
and andfeatures11 heatingzoneszones
for thefor
barrel◦ C for PC,
along
with
Thetemperatures
barrel temperatures
were
set at 260–280°C forPC,
with awithone
foronethe fordie.theThedie.
barrelwere setat 260–280
witha screw
screwofspeed
of 230Upon
rpm.exiting
Upon exiting
the extrudate
was quenched
cold water,
speed
230 rpm.
the die,thethedie,extrudate
was quenchedin coldinwater,
dried
using
andair,thenconverted
into pellets
a pelletizer.
The pellets
thenweremoldeddried air,
using
and
then converted
intoviapellets
via a pelletizer.
Thewerepelletsthenvia
injection
molding(Sumitomo
C250,
Singapore)
with
a
clamp
tonnage
of
100
tons
into
a
molded via injection molding (Sumitomo C250, Singapore) with a clamp tonnage of 100
cuboidcolor
chip (95mmchipby 55(95mm
byby
2 mm),as shown
in Figure3. Theoftons intoa cuboid
color
mm
55 mm
by 2 mm),as shown
in dimension
Figure 3. The
thecolor chip
selectedon the industrial
in thestandard
polymer incompounding
dimensionof wasthe color
chipbased
was selectedbased onstandard
the industrial
the polymer
industry.
The injection
barreltemperature
wasset at 260–280
injection
compounding
industry.
The injection
barreltemperaturewas◦ C
setatatan260–280°Cspeedat an of
in◦
120
mm/s,
with
temperaturesof 100temperatures
C. The specimen
conditioned
atwas
23 ±condi2 ◦Cjectionspeed
ofmold120 mm/sec,
with moldof 100was°C. Thespecimenfor24 h atbeforemeasurements.
tioned23 ± 2color°C for24 h before color measurements.

FigureFigure3.3.Image
Imageofofinjection-molded
injection-moldedcolor
colorchip
chipusedusedininthis
thisstudy.
study.

2.3. Color Measurement
2.3. Color Measurement
In our experiment, the color measurement of the polymer melt was conducted using
In ourEQUISPEC™
experiment, thecolormeasurementof the polymer
was conducted
Equitech’s
InlineProcess
Spectrophotometer(IPS)melt(Equitech,Charlotte,using
NC,
Equitech’s
EQUISPEC™
InlineProcess
Spectrophotometer(IPS)(Equitech,Charlotte,USA), along with a Reflection Polymer Melt Probe (RPMP). The RPMP was mounted
at NC,theUSA),
a Reflection
Polymer(RPMP).
The
RPMP
was mountedatdieheadalongof thewith
extruderand ensured
that Melt
thereProbe
was ample
shear
force
to consistently
cause
the
die
head
of
the
extruderandensured
that
there
was
ample
shear
force
to
consistently
the new polymer melt to shear across the RPMP.
cause
thedata
newacquisition
polymer melt
acrossthe RPMP. of polymer melts was set at everyTherate toof shearthe colormeasurement
The
data
acquisition
rate
of
the
color
measurementof polymer melts
was set atasevery
2 s. The CIE L* a* b* color reading [3] from the spectrophotometer
was recorded
the
2
s.
The
CIE
L*
a*
b*
color
reading
[3]
from
the
spectrophotometerwasrecordedas theinline measurement by using D65 as the standard illuminant [17] and a standard
observerinlineofmeasurement
by using
D65 as the standard
illuminant[17]
andstandardangle
10 degrees. IPS
has a measurement
uncertaintyof 0.01
unit
fora CIE
L* a* observerb* color
angle of The
10 degrees.
IPSwerehas aonly
measurement
uncertaintyof 0.01
for CIE
L* a* b* color
reading.
mean datacollected after
5 min when
theunitreading
is stabilizedandreading.
mean
datameasurement
were only collectedshownin TheTable
A1. Theperiodafter
was 55 minmin.when the reading is stabilized andshown
Tablecolor
A1. Themeasurement
5 min.
Forin
offlinemeasurement,
we period
used anwas
X-RiteCi7800 bench-top SpectrophotomeFor
oﬄine color measurement,
we usedan X-Ritewith
Ci7800bench-top
ter [18](X-Rite—Southeast
Asia and Pacific,
Singapore)a 400
mm UV Spectrophotomfilter, equipped
◦
eter
[18]
(X-Rite—Southeast
Asia
andPacific,
Singapore)
with
a
400
mm UV
filter,with Color iMatch professional software (Version 10.7.2). A 10 supplementarystandard
equipped
withiMatch[17]professional(Version10.7.2).Given
A 10° that
supplementary
observerand
D65Color
illuminant
were used,software
coupled withSCI mode.
the surface
standard
and D65 illuminant[17] ofwere
used,coupled withmode. Giventexturecanobserver
induce diffusionand scattering
light,
influencing
colorSCI
appearance[19], that
the
SCI mode was exclusively preferred for assessing color rather than appearance. The CIE L*
a* b* color readings from the spectrophotometer were documented as offline measurements.
The bench-top spectrophotometer used in this study has a measurement uncertainty ofPolymers 2024, 16, 481

the surface texture can induce diﬀusion and scattering of light, influencing color appearance [19], the SCI mode was exclusively preferred for assessing color rather than appear7 of 19
ance. The CIE L* a* b* color readings from the spectrophotometer were documented as
oﬄine measurements. The bench-top spectrophotometer used in this study has a measurement uncertainty of 0.01 unit for CIE L* a* b*. The mean data were calculated based on
0.01 unit for CIE L* a* b*. The mean data were calculated based on the average reading of
the average reading of 10 pieces of color chips for each dosage and shown in Table A1.
10 pieces of color chips for each dosage and shown in Table A1.
3. Machine
Machine Learning
Learning Architectures
3.
Architectures
In thisthis paper,
paper, four
four machinemachine learninglearning models
models were
were employedemployed forfor predictions:predictions: Bagging
BaggingIn
with Decision
Decision Tree
Tree Regression,
Regression, Deep
Deep Neural
Neural Network,
Network, Multiple
Multiple Linear
Linear Regression,
Regression, andandwithRandomForestRegression.
Random Forest Regression.
3.1. Bagging with Decision Tree
Tree Regression
Regression
The Bagging
model
is aiscombinationof Bagging
RegresBaggingwith
withDecision
DecisionTree
TreeRegression
Regression
model
a combinationof Bagging
ResionandDecision
Tree
Regression.
gression and Decision Tree Regression.
A Decision Tree
Tree Regression
Regression isis aa predictive
predictive model
model that maps features of an input tomake decisions
decisions ororpredictions
predictions[20].
[20].InIn
context
of regression,is usedto predictathethecontext
of regression,
it isitused
to predicta concontinuous
outcomebased
input
features[21].
structure
consists
nodes
reptinuous outcome
based
on on
input
features[21].
TheThetreetreestructure
consists
of of
nodes
repreresenting
decisionsbased
basedononfeaturesfeaturesand
andleavesleavesrepresenting
representingthe
thepredictedpredicted outcomesoutcomes [22].
[22].
senting decisions
Figure4shows
anexampleoftheDecision
Tree
Regression
thatwasgeneratedin
Figure 4 shows an example of the Decision Tree Regression that was generated in this
thisstudy.
study. The
The decision
decision tree
tree starts
starts with
with aa root
root condition
condition ofof Solvent
Solvent Yellow
Yellow 114
114 withwith aa dosage
dosageunderthethedata
to minimize
the themeansquarederrorerror(MSE).
It thenunder 0.005,
0.005,where
whereititbest
bestsplits
splitsdata
to minimizemeansquared(MSE).
It
createsaconditionforsplittingthedata,
aimingtoreducethevarianceinthepredicted
then creates a condition for splitting the data, aiming to reduce the variance in the prevalues
which whichis inline≤ 3.781010 1010≤ 0.013.
The Therecursive
splittingprocess
dicted values
is a*inlinea* ≤and
3.78Ravenand Raven≤ 0.013.
recursive
splittingprocontinues,
formingabinarytree
structure.
The
goal
is
to
iteratively
partition
the
data
into
cess continues, forming a binary tree structure. The goal is to iteratively partition the datasubsetsthatexhibitlower
varianceinthetargetvariable.
As
the
tree
grows,
leaf
nodes
into subsets that exhibit lower variance in the target variable. As the tree grows, leaf nodes
containmight
bebe
thethemean
or ormedianofcontain thethe predictedpredictedvalues
valuesfor
forthethetarget
targetvariable,variable,which
which
might
mean
medianthetargetvaluesintheleaf.
Duringtheprediction
phase,
a
new
data
point
traverses
theof the target values in the leaf. During the prediction phase, a new data point traverses the
tree,
until
it reaches
a leafnode.
The Thepredicted
valuevalue
is thentree, following
followingthe
thepathpathofofdecisions
decisions
until
it reaches
a leafnode.
predicted
isdetermined by the value that is associated with that leaf.
then determined by the value that is associated with that leaf.

Figure 4. Working principle of decision trees.
Figure 4. Working principle of decision trees.

Bagging Regression is an ensemble learning technique that involves training multiple
decision trees with different feature orders [23]. Figure 5 shows the working principleof Bagging Regression. In this process, features are randomly selected and arranged toPolymers 2024, 16, 481

sion trees. This is repeated multiple times (1000 times in this paper), resulting in a collectionof diverse decision trees. When making predictions for new data, the Bagging Regression aggregates the outputs of these individual trees, often by averaging, to provide a more robust
and generalized prediction. The randomness introduced in feature selection and ordering
helps reduce overfitting, making the model more effective and resilient. The parameters
8 offor19
Bagging with Decision Tree Regression used in this paper are summarized in Table 2.
Table
Machine trees.
learning
model
architectureof Bagging
withDecision
Regression.
create2.decisionThis
is repeatedmultiple
times
(1000
timesTreein thispaper), resulting

in a collection of diverse
decision trees. When making predictions
Parameter
Valuefor new data, theBagging Regression aggregates the outputs of these individual trees, often by averaging, toRandom state for Decision Tree Regression
42
provide a more robust and generalized prediction. The randomness introduced in feature
Number of base estimators
1000
selection and ordering helps reduce overfitting, making the model more effective andRandomstate for Bagging
Regression
42 in this paper are
resilient.
The parametersfor Bagging
with Decision Tree Regression usedof parallel jobs
−1summarizedNumber
in Table 2.

Figure 5. Working principle of Bagging with Decision Tree
Tree Regression.
Regression.

3.2.
Deep
Neural learning
Networkmodel architecture of Bagging with Decision Tree Regression.
Table
2. Machine
A Deep Neural Network makes predictions through a process called forward propagaParameter
tion, which involves
passing the input data through the network’sValuelayers of interconnected
Random state for Decision Tree Regression
Number of base estimators
Random state for Bagging Regression
Number of parallel jobs

42
1000
42
−1

3.2. Deep Neural Network
A Deep Neural Network makes predictions through a process called forward propagation, which involves passing the input data through the network’s layers of interconnected
neurons. Figure 6 shows the working principle of the Deep Neural Network. In this paper,
the network is trained for 50 epochs, with each epoch processing batches of 32 samples

Deep Neural Network is utilized to make predictions on new dataset features. The parameters
for the Deep Neural Network in this paper are summarized in Table 3.
Table 3. Machine learning model architecture of Deep Neural Networks.
Polymers 2024, 16, 481

9 of 19
Parameter
Value
Number of hidden layers
2
Number of input layer neurons
11
at a time,
considering
the smallNumberof hidden
layersample
neuronssize. The Deep Neural Network
192 comprises threelayers: an input layer with 128 neurons using Rectified Linear Unit (ReLU) activation, a
Number of output layer neurons
3
hidden layer with 64 neurons and ReLU activation, and an output layer with three neurons
Hidden layer activation function
Relu
corresponding to the targets (offline L*, a*, b*). The network is compiled using the Adam
Optimizer
Adam
optimizer and the mean squared error loss function, commonly chosen for regression
Loss function
problems. Once trained,
the Deep Neural Network is utilized toRMSE
make predictions on
Training
iterations(epochs)
50 in this paper are
new dataset features. The parameters for the Deep Neural Network
Batch
size
32
summarized in Table 3.

Neural Networks.
Networks.
Figure 6. Working principle of Deep Neural

3.3. Multiple
LinearRegression
Table
3. Machinelearning
model architecture of Deep Neural Networks.
Multiple Linear Regression makes predictions by combining the weighted sum of multiParameterValue
ple input features with a constant term. In our paper, the input features are the material dosage
Numberofhiddenlayersand inline L* a* b*. The model learns these weights during training to 2minimize the differenceof input layer neurons
11
betweenNumber
its predictions
and the actual target values, allowing it to generalize
and make accuNumber of hidden layer neurons
192
rate predictions
new data
considering multiple input features simultaneously.
The paNumber onof output
layerbyneurons3
rametersHidden
for Multiple
Linear Regressionin Table 4.
layer activation
function in this paper are summarized
Relu
Optimizer
Loss function
Training iterations (epochs)
Batch size

Adam
RMSE
50
32

3.3. Multiple Linear Regression
Multiple Linear Regression makes predictions by combining the weighted sum ofmultiple input features with a constant term. In our paper, the input features are thematerial dosage and inline L* a* b*. The model learns these weights during training tominimize the difference between its predictions and the actual target values, allowing it
to generalize and make accurate predictions on new data by considering multiple input
features simultaneously. The parameters for Multiple Linear Regression in this paper are
summarized in Table 4.

Table 4. Machine learning model architecture of Multiple Linear Regression.

Polymers 2024, 16, 481

Parameter
Value
fit_intercept
True
Normalize
False
Copy_X
True
Numberof jobs
None
Table 4. Machine learningmodel
architecture of Multiple Linear Regression.
3.4. Random ForestParameter
Regression

10 of 19

Value

fit_intercept
True Bagging principles
Random Forest
Regression, an ensemble learning technique, refines
Normalize
False
by introducing more
randomization into the construction of individual
decision trees. In
Copy_X
True
contrast to Bagging
with a Decision Tree Regression, Random Forest
Regression selects only
Number of jobs
Nonea random subset of features, not all, for splitting a node. This deliberate feature subset randomness aims to decrease correlations between trees, enhancing the overall robustness.
3.4. Random Forest Regression
However, it may potentially miss crucial features. The working principle of Random Forest
RandomForest Regression,
an7,ensemble
learning
Baggingprinciples
Regression
is illustrated
in Figurewhere a subset
of technique,features is refines
randomly
chosenfor eachbyintroducing
more
randomization
into
theconstructionofindividual
decisiontrees.
In
tree’s training. This process is iterated 1000 times. When given new data, the Random
Forestcontrast
to
BaggingwithaDecision
Tree
Regression,
RandomForestRegression
selects
Regression aggregates outputs from individual trees to provide a more robust prediction.
only
a random subset
of features,
notall, for splitting
node.areThis
deliberate feature
The parameters
for Random
ForestRegression
in thisapaper
summarizedin Tablesubset
5.
randomness aims to decrease correlations between trees, enhancing the overall robustness.
However,
it maylearningpotentiallymisscrucial features.
TheForest.
working principle of Random Forest
Table 5. Machinemodel
architectureof Random
Regression is illustrated in Figure 7, where a subset of features is randomly chosen for eachParameter
Value
tree’s training. This process
is iterated 1000 times. When given new data,
the Random Forest
Randomstate forRandom42 robust prediction.
Regression
aggregates
outputs
fromForest
individual trees to provide a more
Numberof base estimators
1000
The parameters
for Random
Forest Regression in this paper are summarizedin Table 5.

Figure 7.
7. Working
Working principle
principle ofof Random
RandomForest.
Forest.
FigureTable 5. Machine learning model architecture of Random Forest.
Parameter

Value

Random state for Random Forest
Number of base estimators

42
1000

Polymers 2024, 16, 481

11 of 19

4. Machine Learning Methodology
4.1. Data Exploration through the Pearson Correlation Coefficient
To enhance prediction accuracy, understanding the linear relationship between
features—material dosage and inline color data and the target variables—and offline
color data is crucial. The Pearson correlation coefficient (PCC) was employed for thispurpose. The PCC measures the strength and direction of the linear relationship between
two variables. The PCC was computed using Equation (4).
∑ Xi − X Yi − Y
r= q
2
2
∑ Xi − X ·∑ Yi − Y(4)where Xi and Yi are individual data points of the variables X and Y, and X and Y are themeans of variables X and Y, respectively.
This analysis was primarily undertaken to identify any linear relationships and thenecessity of data augmentation for improved model performance. Moreover, the statisticalsignificance of these correlations was assessed to ensure that the observed relationship is
not due to random chance but reflects a genuine association in the data.
Table 6 illustrates the correlations between each material and the offline a* value. It isevident that materials that are strongly correlated with the offline a* value include thered pigment, indicating a positive linear relationship, and the blue pigment, indicatinga negative linear relationship. This discovery piques interest, given that the a* value
is typically impacted by the dosage of both red and green pigments. Nevertheless, thedifference in correlation coefficients between green and blue pigments is not considerable.
Therefore, it is reasonable to propose that the blue pigment tends to exhibit a greenish tone.
Table 6. Pearson correlation coefficients between chemical components and offline a* value.
Chemical Component

Offline Color Data

Pearson Correlation Coefficient

Plast Red 8355
Solvent Yellow 114
EBS L-205F
PC Makrolon 2807
Raven 1010
Tiona 288
Heliogen Green K 8730
Ultramarine Blue 05

Offline a* value
Offline a* value
Offline a* value
Offline a* value
Offline a* value
Offline a* value
Offline a* value
Offline a* value

0.355185
0.119745
0.021655
0.001232−0.048207−0.074003−0.097658−0.106822

Table 7 illustrates the correlations between each material and the offline b* value.
The yellow pigment (revealing a positive linear relationship) and blue pigment (revealing anegative linear relationship) exhibit strong correlations with the b* value. This aligns with
the CIE L* a* b* color space, where the yellow pigment contributes a positive b* value, andthe blue pigment contributes a negative b* value.
Table 7. Pearson correlation coefficients between chemical components and offline b* value.
Chemical Component

Offline Color Data

Pearson Correlation Coefficient

Solvent Yellow 114
PC Makrolon 2807
Plast Red 8355
EBS L-205F
Tiona 288
Heliogen Green K 8730
Raven 1010
Ultramarine Blue 05

Offline b* value
Offline b* value
Offline b* value
Offline b* value
Offline b* value
Offline b* value
Offline b* value
Offline b* value

0.35970.105443
0.047905
0.012755−0.059283−0.074992−0.102322−0.359825

Polymers 2024, 16, 481

12 of 19

Table 8 presents the correlations between each material and the offline L* value.
The results show that the white pigment (indicating a positive linear relationship), as wellas the blue and black pigments (indicating a negative linear relationship), demonstratestrong correlations with the L* value. The positive association with the L* value aligns with
the CIE L* a* b* color space, where the white pigment contributes to a positive L* value.
Table 8. Pearson correlation coefficients between chemical components and offline L* value.
Chemical Component

Offline Color Data

Pearson Correlation Coefficient

Tiona 288
Solvent Yellow 114
PC Makrolon 2807
EBS L-205F
Plast Red 8355
Heliogen Green K 8730
Ultramarine Blue 05
Raven 1010

Offline L*
Offline L*
Offline L*
Offline L*
Offline L*
Offline L*
Offline L*
Offline L*

0.447425−0.008293−0.130144−0.162846−0.225973−0.23764−0.354951−0.359394

It is noteworthy that, apart from the black pigment, the blue pigment also significantly
contributes to the negative L* value. This observation suggests that the blue pigment could
serve as an alternative to the black pigment in contributing to a negative L* value.
Table 9 displays the correlations between the inline and offline color data, revealingrobust associations between the two. The results show that strong correlations between
inline and offline color data affirm the potential of inline color data to predict offline color
characteristics. These correlations between material dosage, inline L* a* b*, and offline
L* a* b* values are critical for identifying relevant features in model training, guiding theapproach towards more precise and reliable color prediction.
Table 9. Pearson correlation coefficients between inline and offline color data.
Inline Color Data

Offline Color Data

Pearson Correlation
Coefficient

Inline L*
Inline a*
Inline b*

Offline L*
Offline a*
Offline b*

0.583606
0.576646
0.522276

In summary, these findings not only demonstrate significant linear relationships between the chemical components and color data but also adhere to the established principlesof the CIE L* a* b* color space. This enhances the understanding of how different materials
influence color properties, which is vital for developing more accurate machine learningmodels for color prediction.
4.2. Dataset Allocation
Out of the complete dataset that was generated from the color measurement, which
comprises 83 color formulations as presented in Table 1, 74 datasets were designatedfor training, and the remaining 9 datasets were for testing to assess model performance.
The order of the data was randomized before splitting to reduce overfitting and improve
the generalization of the data.
Each dataset comprises 11 features and 3 target variables, as illustrated in Figure 8.
The features are categorized into two groups: the dosage of each material and inline L* a*b*. The target variables include offline L* a* b* values. These datasets will be employed formodel training and performance evaluation.

Polymers 2024,
2024, 16,
16, 481x FOR PEER REVIEWPolymers

13 of 19
13 of 19target variables.
variables.
Figure 8. Summary of features and target

4.3.
4.3. Evaluation
Evaluation Metric
MetricThe
performanceassessed using
using thethe aggregatedaggregated dE,
dE, aa domaindomainThe performance ofof eacheach model
model waswas assessed
specific
RMSE.
RMSE
is
definedasthestandard
metricinregression
analysisthatmeasuresspecific RMSE. RMSE is defined as the standard metric in regression analysis thattheaveragemagnitudeof the errors
predicted
actual values.
An aggregatedmeasurestheaverage magnitudeofbetween
the errors
betweenandpredicted
and actual
values. An
dEgaugestheaveragecolor
difference
betweenpredicted
andactualvaluesof thetest
aggregated dE gauges the average color diﬀerence between predicted and actual
valuesdataset, calculated using Equation (5). Equation (6) shows the equation for calculatingof the test dataset, calculated using Equation (5). Equation (6) shows the equation for calRMSE. Lower dE values signify greater accuracy in the model prediction.
culating RMSE. Lower dE values signify greater accuracy in the model prediction.
vuu n ( L̂∗ ∗− L∗∗)2 + ( â∗∗− a∗∗)2 + (b̂∗∗− b∗∗)2
t
i −𝐿
*
i )
(𝐿
(𝑎i − 𝑎i )(𝑏i − 𝑏i )Aggregated
dE
=
(5)
(5)
Aggregated dE ∗ = ∑n
i =1𝑛L̂∗1∗ , L̂2∗∗ ,. . ., L̂∗∗n , are predicted L* values, and L1∗∗, L2∗∗,. . . L∗n∗ are actual L* values.
𝐿 , 𝐿 ,…, 𝐿 , are predicted L* values, and 𝐿 , 𝐿 ,… 𝐿 are actual L* values.
â1∗∗, â2∗∗,. . ., a∗n ,∗ are predicted a* values, and a1∗ , ∗a2∗ ,. ∗. . a are actual a* values.
𝑎∗ , 𝑎∗ ,…, 𝑎∗ , are predicted a* values, and ∗𝑎 ,∗ 𝑎 ,…∗ a are actual a* values.
b̂1∗, b̂2∗,. . ., b̂n∗, are predicted b* values, and b1 ,∗b2 ,.∗. . bn are
actual b* values.
𝑏 , 𝑏 ,…, 𝑏 , are predicted b* values, and 𝑏 , 𝑏 ,… 𝑏 ∗ are actual b* values.
n is the number of samples.
𝑛 is the number of samples.
vu∗ 2u n (ŷ∗ −i ∗ −yi𝑦)∗ )t(𝑦RMSE = ∑RMSE =
n
i =1
𝑛

(6)
(6)

actual values.
ŷ1∗∗, ŷ2∗∗,. . ., ŷ∗n∗, are predicted values, and y1∗ ,∗y2∗ ,.∗. . y∗n are∗
𝑦 is, 𝑦𝑦 , areofpredictednthe,…,
numbersamples. values, and 𝑦 , 𝑦 ,… 𝑦 are actual values.
𝑛 is the number of samples.
5. Results
5. Results
5.1.
Performance of Machine Learning Model
5.1. Performanceof Machine
Learning Model
Table 10 displays
the aggregateddE of each model at a sample size of 83 and a test
samplesize10ofdisplays
9. Both Bagging
with Decision
Tree model
Regression
and Random
Table
the aggregateddE of eachat a sample
size ofForest
83 andexhibit
a testthelowestdE valuesof Decision
10.84 and
10.75,
respectively.
In contrast,
theexhibit
Deepsamplesizeaggregatedof 9. Both Bagging
with
Tree
Regression
and Random
ForestNeuralNetworkdemonstrates
a higheraggregated
dE, respectively.
indicating overfitting
causedthethe lowest
aggregateddE valuesof 10.84
and 10.75,
In contrast,
theby
Deep
limitedsamplesize.
Multiple
LinearRegression
also
exhibitsahighaggregateddE
due
Neural Network demonstrates a higher aggregated dE, indicating overfitting caused by
the limited sample size. Multiple Linear Regression also exhibits a high aggregated dE

Polymers 2024, 16, 481

14 of 19

to its inability to capture complex, nonlinear relationships that are present in the dataset,
limiting its predictive accuracy.
Table 10. Table of machine learning model and its aggregated dE values.
Model
Bagging Regression with Decision Tree
Regression
Deep Neural Networks
Multiple Linear Regression
Random Forest

Aggregated dE
10.84
22.90
25.39
10.75

In summary, Bagging with Decision Tree Regression and Random Forest Regression
exhibit the lowest aggregated dE values. However, the observed color difference remains
too high for practical production use. The impact of the sample size on reducing the color
difference will be explored in the next section to assess the feasibility of achieving moresatisfactory results.
5.2. Impact of Sample Size on Machine Learning Accuracy
To understand the effect of the sample size on model accuracy, a systematic analysis
of how increasing sample sizes influence the aggregated dE for various models that arereferenced in this paper was conducted. Each model architecture was trained and evaluatedusing various sample sizes. These samples were obtained as random subsets of the total
training samples and selected without replacement, ensuring the uniqueness and variabilityof each sample set. Figure 9 illustrates the aggregated dE plotted against the number ofsamples for each model type.
In Figure 9a, a decline in the aggregated dE is observed for Bagging with Decision Tree
Regression as the sample size increases. This trend suggests enhanced predictive accuracy,
likely due to the model’s exposure to a broader range of feature variations within the larger
datasets.
Conversely, Figure 9b demonstrates a decrease in the aggregated dE for the Deep
Neural Network model up to a sample size of 45. Beyond this point, the aggregated dE
increases. There might be several explanations for this, but it is likely an overfitting issue,
as the model learns the noise of the additional data instead of capturing the underlying
patterns [24].
Figure 9c reveals an initial rise in the aggregated dE for Multiple Linear Regression
with increasing sample sizes, followed by a decrease after reaching 45 samples. Thispattern is consistent with findings in Knofczynski’s research, underscoring the necessity ofa minimum sample size for accurate predictions [25]. Smaller sample sizes might result in
misleading outcomes due to insufficient data representation.
Finally, Figure 9d shows that the Random Forest Regression exhibits a trend that isakin to Bagging with Decision Tree Regression. The aggregated dE decreases as more
samples are introduced, which is expected given their common underlying mechanism
based on Decision Tree Regression.
These observations suggest that the Bagging with Decision Tree Regression and Random Forest Regression provide the highest and most consistent returns (in terms of aggregated dE) for a given increase in the dataset compared to other models.
Table 11 highlights the pros and cons of our study compared with previous studies.

Polymers 2024, 16, 481

of how increasing sample sizes influence the aggregated dE for various models that arereferenced in this paper was conducted. Each model architecture was trained and evaluated using various sample sizes. These samples were obtained as random subsets of thetotal training samples and selected without replacement, ensuring the uniqueness and
15 of 19
variability of each sample set. Figure 9 illustrates the aggregated dE plotted against the
number of samples for each model type.

(a)

(b)

(c)

(d)

Figure 9. Plot of root mean square error against sample size for (a) Bagging with Decision Tree RegresFigure 9. Plot of root mean square error against sample size for (a) Bagging with Decision Tree Regression, (b) Deep Neural Network, (c) Multiple Linear Regression, and (d) Random Forest Regression.
sion, (b) Deep Neural Network, (c) Multiple Linear Regression, and (d) Random Forest Regression.
Table 11. Table of comparison of pros and cons between current and previous studies.
MachineLearning Model

Pros

Bagging with Decision
Tree Regression
Less probability ofoverfitting [20]Simple model [20]

Neural Networks
Incorporated multi-task
learning, where learning
does not occur solely for
one task [11]Able to implicitly detectcomplex nonlinear
relationships between
dependent andindependent variables [27]Multiple Linear
Regression

Random Forest
Regression

Fast calculation speed [14]Effective for learning withlimited samples [26]Robust for learning withstrong data error [26]Feasible for nonlinear or
approximately linear
problems [26]Robust to the effect of
noisy data [28]Cons

Uses significant
computational complexity[29]
Loss of simplicity
compared to a simple
decision tree [29]Unexplained behaviors ofthe model [30]
The duration of training a
Neural Network is
unknown [30]
Proneness to overfitting[27]

Assumes data arenormally distributed,
homogenous in variance,
and independent of one
another [31]Uses significant
computational resources,
as they require several
splitting and evaluationsof candidate splits [20]There are no equations
linking the variables withthe predicted variable [32]Polymers 2024, 16, 481

16 of 19

6. Conclusions
In this study, machine learning algorithms were developed to predict offline color datausing both inline color measurements during polymer melt compounding and offline color
measurements on injection-molded cuboid color chips. Four machine learning models,
namely, Bagging with Decision Tree Regression, Deep Neural Network, Multiple Linear
Regression, and Random Forest Regression, were employed with the input of measurement
data and material dosage.
Among these models, Bagging with Decision Tree Regression and Random Forest
Regression demonstrated notable effectiveness, achieving the lowest aggregated dE valuesof 10.84 and 10.75. As the current aggregated dE values are somewhat high for productionlevel application, further analysis of the effect of the sample on model prediction accuracy
is required. Bagging with Decision Tree Regression and Random Forest Regression show aconsistent reduction in aggregated dE values with an increasing sample size. This suggeststhat the truth function for offline color is easily discoverable by increasing the training
sample size.
This methodology suggests a potentially more efficient approach to ensure color chip
conformity during production. As the model performance improves with the training
dataset size, the minimization of material and time wastage becomes more achievable.
Overall, the results indicate a promising avenue for integrating machine learning into color
quality control processes within the polymer manufacturing industry.
Author Contributions: Conceptualization, P.K.N., Y.W.L. and H.I.; methodology, P.K.N., Y.W.L. and
H.I.; software, P.K.N. and Q.S.G.; validation, M.F.S. and Y.W.L.; formal analysis, P.K.N.; investigation, P.K.N. and S.T.; resources, P.K.N., M.F.S. and Q.S.G.; data curation, P.K.N.; writing—originaldraft preparation, P.K.N.; writing—review and editing, P.K.N., Y.W.L., M.F.S., Q.S.G., S.T. and H.I.;
visualization, P.K.N. and Q.S.G.; supervision, Y.W.L., H.I. and S.T.; project administration, M.F.S.
and S.T.; funding acquisition, P.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.
Data Availability Statement: Data are contained within the article.
Conflicts of Interest: Authors Puay Keong Neo, Moi Fuai Soon, and Qing Sheng Goh were employedby the company Omni-Plus System Limited, Singapore. Author Yew Wei Leong was employed by
the company Matwerkz Technologies Pte Ltd., Singapore. The remaining author declares that the
research was conducted in the absence of any commercial or financial relationships that could beconstrued as a potential conflict of interest.

Appendix A
Table A1. Dataset of inline and offline color readings.
Formulation

Inline L*

Inline a*

Inline b*

Offline L*

Offline a*

Offline b*

1
2
3
4
5
6
7
8
9
10
11
12
13

14.37
24.74
31.44
39.17
44.48
48.25
49.93
50.57
50.94
48.46
45.14
41.25
33.54

2.11
0.45
−0.06
0.14
0.92
1.98
2.55
2.73
2.82
1.33
1.41
1.44
1.18

6.33
5.72
6.43
9.71
13.14
16.38
18.05
18.69
19.11
12.74
11.15
9.80
6.88

86.68
83.06
84.94
86.36
88.01
90.95
92.94
94.06
94.69
75.55
66.74
59.63
44.66

−0.49
−0.81
−0.17
0.32
−0.54
−0.36
−0.44
−0.42
−0.43
−0.42
−0.4
−0.37
−0.17

8.87
12.15
10.64
8.24
6.13
5.56
5.23
5.02
4.58
3.21
1.29
0.29
−1.03

Polymers 2024, 16, 481

17 of 19

Table A1. Cont.
Formulation

Inline L*

Inline a*

Inline b*

Offline L*

Offline a*

Offline b*

14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83

24.03
18.00
14.40
14.55
14.73
14.86
14.96
15.07
15.14
15.24
15.78
15.88
15.19
15.20
15.26
15.29
15.70
15.44
16.27
16.39
16.50
16.56
16.56
16.59
16.58
16.60
16.73
17.65
18.18
19.27
20.13
20.83
21.54
16.86
23.20
26.16
24.52
22.49
17.75
14.72
16.86
44.78
43.13
38.48
33.61
26.99
19.75
15.50
24.01
24.80
22.68
20.43
16.84
16.12
18.07
14.63
14.82
15.03
15.18
15.28
15.40
15.45
15.11
38.76
35.32
27.58
23.15
19.75
16.01
15.10

1.08
1.80
1.96
1.65
1.05
0.60
0.29
0.00
−0.15
−0.27
1.98
1.98
1.96
1.98
1.99
2.01
2.05
2.14
2.13
2.09
2.10
2.15
2.19
2.21
2.24
2.29
1.94
1.19
0.47
−0.59
−1.29
−1.69
−1.47
2.15
3.49
3.96
5.51
7.12
2.92
1.65
2.15
−0.56
−1.17
−2.03
−2.12
−0.62
1.17
1.88
−7.16
−8.09
−6.96
−5.85
−4.22
−2.08
1.02
3.75
4.31
4.80
5.22
5.61
5.88
6.02
6.08
26.41
31.16
33.64
29.58
18.42
7.91
5.79

4.19
5.10
5.25
5.05
4.82
4.76
4.71
4.64
4.59
4.63
6.40
6.35
6.19
6.24
6.26
6.33
6.53
6.60
6.41
6.33
6.25
6.12
6.09
6.04
5.96
5.88
6.35
8.44
10.76
14.36
17.61
21.01
22.98
33.52
21.00
35.05
40.48
43.69
38.77
34.56
33.52
7.72
5.29
−0.71
−6.24
−0.80
1.70
4.61
9.50
9.88
9.21
8.68
8.02
7.01
6.25
7.24
7.53
7.92
8.17
8.39
8.53
8.58
8.48
5.81
4.25
3.26
4.38
3.11
5.62
6.90

27.95
26.48
70.81
63.96
52.7
41.81
32.2
26.06
24.97
24.87
24.84
23.97
23.98
24.03
24.03
24.11
24.12
23.96
81.44
76.34
65.04
55.55
42.42
34.15
30.78
27.16
82.68
82.12
79.87
76.68
73.5
70.14
67.68
64.26
82.69
80.77
76.42
72.3
39.12
26
25.08
75.89
71.97
60.6
52.94
38.43
23.98
23.62
67.86
62.57
50.62
43
34.84
24.68
24.95
61.4
55.5
51.42
48.08
44.86
41.3
39.12
36.6
65.73
61.39
53.28
49.94
34.64
28.04
27.16

0.39
0.38
−56.05−68.34−70.06−53.38−26.83
−5.42
−1.18
−0.66
1.09
0.4
0.4
0.4
0.4
0.4
0.41
0.4
−3.39
−6.06
−10.42−10.49
0.09
16.07
20.03
19.01
−10.3
−6.79
1.66
11.56
21.74
30.64
36.11
42.23
−5.13
−1.15
9.22
17.24
−3.05
0.69
0.54
−5.33
−6.19
−5.24
−1.99
−2.25
0.68
0.65
−39.25−44.73−46.06−39.76−18.75
−0.58
−1.37
63.16
71.35
69.84
65.4
61.18
56.05
52.5
47.55
51.64
58.12
62.67
61.27
25.15
10.24
7.41

−0.44
0.07
10.94
16.37
20.14
15.94
7.7
0.62
−0.9
−1.19
3.15
1.98
1.97
1.94
1.95
1.91
1.94
2.01
1.34
−6.03
−22.51−36.02−50.14−54.19−50.65
−40.4
79.52
85.79
90.88
90.26
87.14
82.29
78.3
72.51
61.86
69.22
76.01
75.34
21.52
3.3
1.71
−6.27
−12.14−26.93−35.12
−8.83
−0.97
0.53
3.2
8.02
5.83
6.06
2.12
1.04
0.83
−6.31
1.46
17.81
31.76
36.52
33.22
29.7
25.41
3.92
6.59
14.54
17.73
4.53
8.2
7.06

Polymers 2024, 16, 481

18 of 19

References
1.
2.
3.
4.
5.
6.
7.
8.
9.
10.
11.
12.
13.
14.
15.
16.

17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.

Kirchner, E.J.J.; Ravi, J. Setting tolerances on color and texture for automotive coatings. Color Res. Appl. 2014, 39, 88–98. [CrossRef]
Arino, I.; Johansson, S.; Kleist, U.; Liljenström-Leander, E.; Rigdahl, M. The Effect of Texture on thePass/Fail Colour Tolerances of
Injection-Molded Plastics. Color Res. Appl. 2007, 32, 47–54. [CrossRef]
ISO/CIE 11664-4:2019(E); Colorimetry—Part 4: CIE 1976 L*A*B* Colour Space. International Commission on Illumination (CIE):
Vienna, Austria, 2017.
Schanda, J. Colorimetry: Understanding the CIE System; John Wiley & Sons: Hoboken, NJ, USA, 2007; p. 496.
Reshadat, R.; Balke, S.T.; Calidonio, F.; Dobbin, C.J. In-line Color Monitoring of Pigmented Polyolefins During Extrusion. I.
Assessment. In Coloring Technology for Plastics; William Andrew: Norwich, NY, USA, 1999; pp. 141–148.
Krumbholz, N.; Hochrein, T.; Vieweg, N.; Hasek, T.; Kretschmer, K.; Bastian, M.; Mikulics, M.; Koch, M. Monitoring polymericcompounding processes inline with THz time-domain spectroscopy. Polym. Test. 2009, 28, 30–35. [CrossRef]
X-Rite, Incorporated. Measuring “True” Color; Should I Use SCE or SCI? X-Rite, Incorporated. Available online: https://www.xrite.com/service-support/measuringtruecolorshouldiusesceorsci (accessed on 30 June 2023).
Reshadat, R.; Desa, S.; Joseph, S.; Mehra, M.; Stoev, N.; Balke, S.T. In-line near-infrared monitoring of polymer processing. Part I:
Process/monitor interface development. Appl. Spectrosc. 1999, 53, 1412–1418. [CrossRef]
Equitech. Probes For Difference Applications. Equitech. Available online: https://equitechintl.com/products/probes/ (accessedon 4 October 2023).
Keong, N.P. Inline colour monitoring of thermoplastic extrusion: Correlation of colour measurement and rheological behavior. In
Proceedings of the 13th SPSJ International Polymer Conference (IPC2023), Hokaido, Japan, 18–21 June 2023.
Lee, J.; Kim, J.; Kim, J. A Study on the Architecture of Artificial Neural Network Considering Injection-Molding Process Steps.
Polymers 2023, 15, 4578. [CrossRef]
Shams-Nateri, A.; Amirshahi, S.; Latifi, M. Prediction of Yarn Cross-Sectional Color from Longitudinal Color by Neural Network.
Res. J. Text Appar. 2006, 10, 25–35. [CrossRef]
Jeon, J.; Rhee, B.; Gim, J. Melt Temperature Estimation by Machine Learning Model Based on Energy Flow in Injection Molding.
Polymers 2022, 14, 5548. [CrossRef]
Joo, C.; Park, H.; Kwon, H.; Lim, J.; Shin, E.; Cho, H.; Kim, J. Machine Learning Approach to Predict Physical Properties of
Polypropylene Composites: Application of MLR, DNN, and Random Forest to Industrial Data. Polymers 2022, 14, 3500. [CrossRef]
Munir, N.; Nugent, M.; Whitaker, D.; McAfee, M. Machine Learning for Process Monitoring and Control of Hot-Melt Extrusion:
Current State of the Art and Future Directions. Pharmaceutics 2021, 13, 1432. [CrossRef]
Munir, N.; McMorrow, R.; Mulrennan, K.; Whitaker, D.; McLoone, S.; Kellomäki, M.; Talvitie, E.; Lyyra, I.; McAfee, M.
Interpretable Machine Learning Methods for Monitoring Polymer Degradation in Extrusion of Polylactic Acid. Polymers 2023,
15, 3566. [CrossRef] [PubMed]
ISO/CIE 11664-2:2022(E); Colorimetry—Part 2: CIE Standard Illuminants. International Commission on Illumination (CIE):
Vienna, Austria, 2022.
X-Rite, Incorporated. Ci7800 Sphere Benchtop Spectrophotometer. Available online: https://www.xrite.com/categories/
benchtop-spectrophotometers/ci7x00-family/ci7800 (accessed on 30 June 2023).
Agate, S.; Williams, A.; Dougherty, J.; Velev, O.D.; Pal, L. Polymer Color Intelligence: Effect of Materials, Instruments, andMeasurement Techniques—A Review. ACS Omega 2023, 8, 23257–23270. [CrossRef] [PubMed]
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.
Breiman, L. Pasting small votes for classification in large databases and on-line”, Machine Learning. Mach. Learn. 1999, 36, 85–103.
[CrossRef]
Ho, T. The random subspace method for constructing decision forests. IEEE Trans. Pattern Anal. Mach. Intell. 1998, 20, 832–844.
Breiman, L. Bagging predictors. Mach. Learn. 1996, 24, 123–140. [CrossRef]
Amini, M.; Abbaspour, K.C.; Khademi, H.; Fathianpour, N.; Afyuni, M.; Schulin, R. Neural network models to predict cationexchange capacity in arid regions of Iran. Eur. J. Soil Sci. 2005, 56, 551–559. [CrossRef]
Knofczynski, G.T.; Mundfrom, D. Sample Sizes When Using Multiple Linear Regression for Prediction. Educ. Psychol. Meas. 2007,
68, 431–442. [CrossRef]
Ao, Y.; Li, H.; Zhu, L.; Ali, S.; Yang, Z. The linear random forest algorithm and its advantages in machine learning assisted logging
regression modeling. J. Pet. Sci. Eng. 2019, 174, 776–789. [CrossRef]
Tu, J.V. Advantages and disadvantages of using artificial neural networks versus logistic regression for predicting medical
outcomes. J. Clin. Epidemiol. 1996, 49, 1225–1231. [CrossRef]
Pramanik, S.; Chowdhury, U.N.; Pramanik, B.K.; Huda, N. A comparative study of bagging, boosting and C4. 5: The recent
improvements in decision tree learning algorithm. Asian J. Inf. Technol. 2010, 9, 300–306.
Machova, K.; Puszta, M.; Barcak, F.; Bednar, P. A comparison of the bagging and the boosting methods using the decision trees
classifiers. Comput. Sci. Inf. Syst. 2006, 3, 57–72. [CrossRef]
Mijwel, M.M. Artificial neural networks advantages and disadvantages. Mesop. J. Big Data 2021, 2021, 29–31. [CrossRef]

Polymers 2024, 16, 481

31.
32.

19 of 19

Vittinghoff, E.; Glidden, D.V.; Shiboski, S.C.; McCulloch, C.E. Linear, Logistic, Survival, and Repeated Measures Models.
In Regression Methods in Biostatistics; Springer: New York, NY, USA, 2011; p. 509.
Langsetmo, L.; Schousboe, J.T.; Taylor, B.C.; Cauley, J.A.; Fink, H.A.; Cawthon, P.M.; Kado, D.M.; Ensrud, K.E.; Osteoporotic
Fractures in Men (MrOS) Research Group. Advantages and disadvantages of random forest models for prediction of hip fracturerisk versus mortality risk in the oldest old. JBMR Plus 2023, 7, e10757. [CrossRef] [PubMed]

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 topeople or property resulting from any ideas, methods, instructions or products referred to in the content.