Estimating physical properties from liquid crystal textures via machine learning and complexity-entropy methods

Imaging techniques are essential tools for inquiring a number of properties from different materials. Liquid crystals are often investigated via optical and image processing methods. In spite of that, considerably less attention has been paid to the problem of extracting physical properties of liquid crystals directly from textures images of these materials. Here we present an approach that combines two physics-inspired image quantifiers (permutation entropy and statistical complexity) with machine learning techniques for extracting physical properties of nematic and cholesteric liquid crystals directly from their textures images. We demonstrate the usefulness and accuracy of our approach in a series of applications involving simulated and experimental textures, in which physical properties of these materials (namely: average order parameter, sample temperature, and cholesteric pitch length) are predicted with significant precision. Finally, we believe our approach can be useful in more complex liquid crystal experiments as well as for probing physical properties of other materials that are investigated via imaging techniques.

READ FULL TEXT VIEW PDF
POST COMMENT

Comments

There are no comments yet.

Authors

page 2

page 4

05/12/2020

Machine Learning Guided Discovery of Gigantic Magnetocaloric Effect in HoB_2 Near Hydrogen Liquefaction Temperature

Magnetic refrigeration exploits the magnetocaloric effect which is the e...
03/06/2018

Deep Thermal Imaging: Proximate Material Type Recognition in the Wild through Deep Learning of Spatial Surface Temperature Patterns

We introduce Deep Thermal Imaging, a new approach for close-range automa...
06/21/2021

Liminal Tones: Swarm Aesthetics and Materiality in Sound Art

The application of swarm aesthetic in music composition is not new. Arti...
06/27/2017

Reduced Electron Exposure for Energy-Dispersive Spectroscopy using Dynamic Sampling

Analytical electron microscopy and spectroscopy of biological specimens,...
09/06/2016

Discriminating image textures with the multiscale two-dimensional complexity-entropy causality plane

The aim of this paper is to further explore the usefulness of the two-di...
03/16/2017

Autocomplete Textures for 3D Printing

Texture is an essential property of physical objects that affects aesthe...
06/02/2020

Careful analysis of XRD patterns with Attention

The important peaks related to the physical properties of a lithium ion ...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

I Introduction

Optical imaging techniques are important tools extensively used for probing a number of materials properties Chen et al. (2000). These imaging techniques are non-destructive and particularly convenient for dealing with biological and other complex materials Wang et al. (2017). Liquid crystals are among these materials widely studied via optical and image processing methods Prost and de Gennes (1995). This occurs because liquid crystals are birefringent materials, and as such, simple polarized optical microscope imaging already access some of their important properties, including birefringence and sample thickness Zola et al. (2013). Moreover, this technique estimates the local ordering properties (for instance, the director distribution) across a sample when coupled with variable retarders and different algorithms for fast and sensitive measurements Shribak and Oldenbourg (2003). This approach is known as LC-PolScope Oldenbourg (2005) and has been used for fine imaging of defect cores in lyotropic liquid crystals Zhou et al. (2017) and can describe the orientational order of active nematics DeCamp et al. (2015).

Despite the extensive use of optical imaging approaches in the study of liquid crystals Montrucchio et al. (1998); Sastry et al. (2012a, b, c), much less attention has been paid to the problem of extracting physical parameters directly from images of these materials. This is an important issue since several physical parameters of liquid crystals are only obtained by adjusting theoretical models to cumbersome and time demanding experimental results. Examples include the microscopic order parameter, from which several other parameters characterizing the nematic phase are dependent Prost and de Gennes (1995), and the pitch length of cholesteric liquid crystals. The latter is easily obtained under an optical microscope when the helical axis lies perpendicular to the viewing direction Zheng et al. (2017), but cannot be estimated from the most commonly used experimental arrangements, where the helix orients parallel to the viewing direction (often called Grandjean texture, used in reflective displays) Nemati et al. (2012).

In this context, image-based characterization of liquid crystals can benefit hugely from state-of-the-art machine learning techniques Hastie et al. (2013). These approaches have been available since the 1990s, but it was only during the last decade that such methods gained impressive popularity in several areas of science where unveiling meaningful patterns in data is fundamental. Naturally, physics is not an exception, and indeed there are several recent works employing machine learning algorithms for studying many physical systems Arsenault et al. (2014); Kusne et al. (2014); Cubuk et al. (2015); Kalinin et al. (2015); Carrasquilla and Melko (2017); Wei et al. (2017); Hu et al. (2017); Dietz et al. (2017); Venderley et al. (2018). Here we present an approach that is capable of extracting physical properties of nematic and cholesteric liquid crystals directly from their textures images. Our approach is based on the evaluation of two complexity measures related to the arrangement of pixels in the textures, combined with simple machine learning algorithms employed for classification and regression tasks. We demonstrate the potential of this approach in a series of applications based on numerically-generated and experimental textures, from which physical parameters of liquid crystals are predicted with high accuracy.

In what follows, we present our results on simulated and experimental nematic liquid crystals, where we show that our approach predicts the average order parameter from simulated textures with an accuracy of 99% and the sample temperature with an accuracy of

93%. We further show that this approach classifies different pitches of cholesteric textures with an overall accuracy of

85%. Next, we present our conclusions and methodological details of the proposed approach as well as our experimental procedure and numerical methods used for obtaining liquid crystal textures.

Ii Results

In all studies presented here, we have calculated two simple complexity measures directly obtained from liquid crystal textures: the permutation entropy and the statistical complexity  Bandt and Pompe (2002); Rosso et al. (2007); Ribeiro et al. (2012a); Zunino and Ribeiro (2016). As detailed in Appendix A

, these two quantities are estimated from an ordinal probability distribution

, whose components represent the probability of finding a given two-dimensional local ordering pattern of size (the embedding dimensions) over the pixels of a texture. The entropy quantifies the degree of disorder regarding the occurrence of these local patterns. A texture characterized by has pixels randomly distributed in space, while for , these pixels appear practically at the same order along the texture. The complexity quantifies the degree of “structuredness” in the arrangement of pixels in a texture. A value of occurs for both extremes of order and disorder, whereas represents a texture with more complex spatial patterns.

We employ only these two measures as predictive features of physical properties of liquid crystals. The predictions are obtained by training the nearest neighbors algorithm Hastie et al. (2013) with the values of and from a set of textures in which the physical property in question is known, and next the trained algorithm is exposed to values of and from another set of textures in order to predict the physical property. The nearest neighbors algorithm is one of the simplest machine learning algorithms for classification and regression tasks Hastie et al. (2013), but it already provides excellent accuracy in our results. Details of the implementation of this algorithm are given in Appendix E.

ii.1 Monte Carlo simulated textures

We start by analyzing nematic textures generated by Monte Carlo simulations of the model described in Appendix B. Examples of these textures are shown in Figure 1 for different reduced temperatures

. This system undergoes a nematic to isotropic phase transition when

exceeds the critical temperature . Each texture has a different average order parameter that depends on the temperature (see Eq. 6 for details), and our goal is to predict the value of directly from these images by using the values of and . We note that the textures exhibit visually distinct patterns between the nematic and isotropic phases; in particular, for we observe the emergence of isotropic domains that predominate in the texture as the temperature increases beyond . While nematic and isotropic textures are easily distinguished from each other, even a well-trained eye of an experimental physicist will be in trouble for distinguishing among nematic textures with different temperatures (for instance, between and ) as well as among isotropic textures at different temperatures.

Figure 1: Examples of a nematic liquid crystal texture at different temperatures and phases. These textures are generated by using the Monte Carlo method described in Appendix B. Each texture corresponds to a different reduced temperature (as indicated within the plots) and this system presents a nematic to isotropic phase transition at the critical temperature . We note that textures from different phases are easily distinguishable, while nematic textures () from different reduced temperatures are very similar to each other as well as the ones from the isotropic phase ().

Despite the visual similarity among the textures, we show that the values of

and are capable of distinguishing among these images as well as identifying the nematic-isotropic transition. To do so, we create a dataset composed of several realizations of simulated nematic textures for different temperatures , and evaluate the values of and for each one. Figures 2A and 2B show the dependence of the average values of and on the reduced temperature . We observe that has a trend to increase with the temperature but shows a sharp minimum at . Similarly, the values of tend to decrease with the temperature and present a sharp maximum at . Figure 2C depicts the dependence of the order parameter on the reduced temperature , where the critical temperature is defined as the value that maximizes the absolute value of the derivative of with respect to .

Figure 2: Dependence of the image quantifiers and the order parameter on the temperature. (a) Values of the permutation entropy and (b) the statistical complexity as a function of the reduced temperature . The solid curves represent average values over 50 realizations, and the shaded areas are the

bootstrap confidence intervals. (c) Dependence of the order parameter

versus the reduced temperature . In all panels, the dashed line indicates the critical temperature () of the nematic-isotropic phase transition. We note that the phase transition is clearly and properly identified by the extreme values of the complexity measures.

The well-defined dependence of the average values of and on the temperature , combined with the fact that the order parameter is also a function of , indicates that we can predict the values of directly from the images. It is worth noting that the values of and are not uniquely defined for a given temperature, displaying some random fluctuations associated with the process that generates these textures. Thus, to test the predictive power of these image quantifiers in a more practical situation, we have trained a -nearest neighbors algorithm for the regression task of predicting the order parameter based on the values of and

and a dummy variable that is zero for

, 1 for , and -1 for . This dummy variable is necessary due to the non-biunivocal relations between the image quantifiers and the temperature. However, the value of can be directly estimated from the image quantifiers. As detailed in Appendix E, the -nearest neighbors algorithm is among the most straightforward statistical learning approaches that assigns to an unlabeled object (the value of from a texture) the most frequent label among the training nearest neighbors (the parameter of the method) in the features space (the extracted image features).

Figure 3A shows the validation curves, that is, the training and cross-validation scores as a function of the number of neighbors . We note that the algorithm overfits the data for , that is, the algorithm is not complex enough to capture the underlying structure of the data. On the other hand, the algorithm begins to underfit the data for , meaning that the learning method is getting too complex and modeling even the random noise in the training set. Figure 3B shows the learning curves, which represents the scores as a function of the fraction of the data used for training the algorithm (with ). We observe no significant improvement in the cross-validation score when more than 35% of the data is used as training set. Thus, the -nearest neighbors algorithm achieves a remarkable accuracy of in the regression task of predicting the order parameter solely based on the values of and . We further observe that pratically the same accuracy is obtained when using only the values of or only the values of . This happens because the values of and are strongly correlated to each other for these textures. However, in general, the values of are not a trivial function of and usually care additional information related to the “structural” complexity of images Ribeiro et al. (2012a); Zunino and Ribeiro (2016); Sigaki et al. (2018). The performance of this algorithm is much higher than those obtained from simple baseline regressors that always predict the expected values or the median (accuracy of ). Figure 3C shows a comparison between the actual values of the order parameter as a function of the reduced temperature in a particular simulation and the values predicted by the -nearest neighbors algorithm (with ). We note that the predictions are very close to the actual values of the order parameter, which confirms the efficiency and usefulness of our approach.

Figure 3: Predicting the order parameter with a machine learning algorithm. (a) Training and cross-validation scores of the -nearest neighbors algorithm as a function of the number of neighbors . The scores represent the coefficient of determination () of the relationship between the predicted and true values, and can be interpreted as the percentage (or fraction) of data variation that is explained by the model. We note that the algorithm overfits the data when , whereas for it starts underfitting the data. (b) Learning curves, that is, training and cross-validation scores as a function of the training size (fraction of the whole data used for training the model) with . We observe no significant improvement in the cross-validation score when more than of the data is used. The shaded areas in both plots represent the confidence intervals obtained in a 3-fold-cross-validation splitting strategy. We note the high accuracy achieved by the algorithm (). (c) True and predicted order parameter as a function of the reduced temperature . These predictions were generated by exposing the trained regressor (with ) to a set of textures never presented before to the algorithm.

ii.2 Nematic textures of experimental samples

In another application, we study nematic textures obtained from samples of the E7 liquid crystal, a multicomponent mixture composed by cyanobiphenyl and cyanoterphenol that is commonly employed in the industry for producing displays. This liquid crystal exhibits a nematic-isotropic transition at Zola et al. (2013). Details about the experimental procedures are provided in Appendix C, but it basically consists in using polarized optical microscope imaging for taking pictures of these textures at different temperatures . Figure 4A shows examples of textures obtained from a sample with temperature varying from 40 C to 60 C. We observe that there are no visually significant changes in the patterns of these textures when the temperature increases until 55 C. As the sample temperature exceeds the critical temperature , we observe the growth of isotropic domains which makes easier the visual distinction among these textures.

We collect data from six different E7 samples by following the same experimental protocol. Figures 4B and 4C depict the average behavior of the entropy and complexity on the temperature . These results are similar to those obtained via Monte Carlo simulation (see Figure 2A), that is, tends to increase with and shows a sharp minimum at the critical temperature, while has a decreasing trend with and displays a maximum at the critical temperature. Once again, we observe that the values of and are well-defined functions of the temperature and capable of precisely identifying the nematic-isotropic transition.

Figure 4: Examples of E7 liquid crystal textures at different temperatures and phases, and the dependence of the complexity measures on the temperature. (a) Experimental textures of an E7 liquid crystal sample at different temperatures. We observe that practically no visual change is observed until the critical temperature C. (b) Dependence of the permutation entropy and (c) the statistical complexity on the temperature . The solid curves represent the average of the quantities calculated over the results of six samples. The shaded areas are bootstrap confidence intervals. The vertical dashed lines indicate the critical temperature . We note that the phase transition is properly identified by the extreme values of the complexity measures.
Figure 5: Predicting the temperature with a machine learning algorithm. (a) Training and cross-validation scores of the -nearest neighbors algorithm as a function of the number of neighbors . The scores represent the coefficient of determination () of the relationship between the predicted and true values, and can be interpreted as the percentage (or fraction) of data variation that is explained by the model. Note that for the algorithm overfits the data, while for the model starts to underfit the data. (b) Learning curves, that is, the training and cross-validation scores as a function of the training size (fraction of the whole data) for . The shaded areas in both plots represent the confidence intervals obtained in a 3-fold-cross-validation splitting strategy. We observe practically no significant improvement in the cross-validation score when more than of the data is used to train the model. (c) True versus predicted temperatures obtained by exposing the trained regressor to a set of experimental textures never presented before to the algorithm. The dashed line represents the 1:1 relationship. We observe an excellent agreement between the true and predicted temperatures, reinforcing the great accuracy achieved by the method ().

Differently from our previous results on the simulated textures, we now propose to predict the sample temperature (instead of the order parameter ) directly from the experimental textures. However, it is worth mentioning that in this simple experimental setup the order parameter can be estimated from the temperature Wu and Yang (2006), so that predicting the temperature is comparable to predicting the order parameter. We also note that most of the models for liquid crystals fail to predict the order parameter for temperatures much lower than  Wu and Yang (2006), and that in general, measuring the order parameter requires complicated procedures, such as light scattering experiments Stinson and Litster (1970). In order to perform these predictions, we proceed as in the simulated case, that is, we train a -nearest neighbors algorithm for the regression task of predicting the values of from the image quantifiers ( and ) and from a dummy variable that is zero for , 1 for , and -1 for . Figure 5A shows the validation curves, where we observe that the algorithm overfits the data for , while it starts to underfit the data for greater than . Figure 5B depicts the learning curves for , where we note no significant improvement in the cross-validation score when the training set exceeds 80% of the whole data. Thus, the -nearest neighbors algorithm achieve an accuracy of with and by using 80% of data as training set. These scores are reduced in when using the values of and separately, which reinforce the fact these complexity measures are not related to each other in a trivial manner. Furthermore, these scores are much higher than those obtained from regressors that always predict the expected values or the median (accuracy of ). Figure 5C illustrates the accuracy of these predictions by showing a scatter plot between the predicted temperature values and the actual values. We note that this relationship is an almost perfect 1:1 relation (indicated by the dashed line), which reinforces the overall quality of the -nearest neighbors predictions and demonstrates the potential of our approach with experimental data.

ii.3 Simulated cholesteric textures

As a last application, we investigate simulated textures of cholesteric liquid crystals. These materials display a helical structure composed of layers in between which the preferential director axis varies periodically with a period (that is, the distance to complete a full rotation of the director axis) known as the pitch . Among other properties, the pitch of a cholesteric liquid crystal defines the wavelength of the reflected light as a consequence of the Bragg reflection in short pitch materials Prost and de Gennes (1995). The pitch length modifies the textures of these materials, so that, a cholesteric texture can mimic a nematic one for large values of the pitch or be entirely different for short pitches. In a cell treated to impose homeotropic alignment, for example, the pitch length determines if the texture observed is homeotropic, fingerprint or focal-conic Wu and Yang (2006).

Our goal in this case is to identify the pitch of a cholesteric liquid crystal based on the values of and obtained from the textures. To do so, we create a dataset of textures composed of one hundred replicas for each pitch value  nm, where  nm is large enough to mimic a nematic texture. The optical textures are numerically obtained by solving the model described in Appendix D, which is based on the Landau-de Gennes theory Ravnik and Žumer (2009). In our simulations, we have used real values for the physical parameters of this model but a small lattice size (see Appendix D for further details). This choice leads to unrealistic cholesteric pitches but generates textures very similar to those obtained from experimental results. In particular, we use the process of quenching a cholesteric sample from the isotropic state to generate the set of textures. Figure 6 shows the values of and estimated from five random selected textures for each value of the pitch as well as three typical textures for  nm,  nm and  nm (insets of that figure). We observe that although there exists some overlapping, textures with different pitches tend to occupy different regions on the complexity-entropy plane, indicating that and are capable of distinguishing among different cholesteric textures. We further note that the larger the values of , the higher the complexity and the lower the entropy values. Thus, large values of pitch produce textures more locally ordered, while small values generate textures that are locally more irregular.

Figure 6: Discriminating among cholesteric textures with different pitches via the complexity-entropy plane. Each colorful marker represents the values of and for 5 realizations of the cholesteric textures with different pitches (as indicated by the different markers). We note that the values of and for each cholesteric pitch are localized over a small region in the complexity-entropy plane. We further observe that the textures from small pitches are localized in a high entropy region, while those from large pitches are in a low entropy region. This result indicates that textures from large pitches are more ordered than those obtained for small pitches (as illustrated by the insets).

We train a -nearest neighbors algorithm for the classification task of predicting the pitches solely based on the values of and . Figure 7A shows the validation curves. We observe that this algorithm overfits the data when the number of neighbors is smaller than 3, and for larger number of neighbors, it slowly starts underfitting the data. We highlight that this simple algorithm achieves an accuracy of , which is much higher than the baseline accuracy () obtained from a classifier that makes uniformly random predictions. . The scores of -nearest neighbors algorithm are reduced in when using the values of and separately, similarly to what happens with the E7 nematic textures. Also, the learning curves depicted in Figure 7B indicate that

of the data is enough for fitting this algorithm to the cholesteric data. We have further estimated the confusion matrix, as shown in Figure 

7C. The elements of this matrix represent the fraction of textures with pitch that the algorithm predicts to have pitch

; thus, a perfect classifier is represented by an identity matrix (

). In practical applications, the closer to 1 are the diagonal elements of , the better is the performance of the classifier. In our case, we observe that nearly all nonzero elements of are within a diagonal band of width 1 of this matrix, with the main diagonal concentrating at least of the predictions. Thus, even when the algorithm incorrectly classifies the pitch of a texture (which occurs in about of the predictions), it tends to predict a pitch value that is very close to the actual value, with a higher probability of underestimate the value (notice that the elements preceding the main diagonal are larger than those appearing after). These results thus corroborate to the usefulness of our approach for investigating more complex textures.

Figure 7: Predicting the cholesteric pitch with statistical learning algorithms. Training and cross-validation scores (fraction of correct classifications) of the -nearest neighbors algorithm as a function of the number of neighbors in (a) and as a function of the training size in (b). The shaded areas in both plots are the confidence intervals obtained in a 5-fold-cross-validation splitting strategy with the number of neighbors equal to 20. Note that for the number of neighbors smaller than 15 the algorithm overfits the data, but for more than 20 neighbors it starts underfitting the data. We also notice that when more than of the data is used to train the model (training size), there is no significant score improvement. (c) True and predicted cholesteric pitch. This confusion matrix shows the good performance achieved by the algorithm represented by the high values of right predictions in the diagonal. In some cases, the algorithm underestimates the pitch. This results from the overlap observed in the complexity-entropy plane in Figure 6.

Iii Conclusions

We have proposed an approach for extracting physical properties of liquid crystals directly from textures images of these materials. Our method is based on estimating two simple complexity measures (permutation entropy and statistical complexity) directly from the textures, which are used as features in supervised learning tasks of regression and classification of physical parameters of these materials. We have demonstrated the usefulness and accuracy of this approach in a series of numerical and experimental applications. Our results have shown that the average order parameter can be directly estimated from images of nematic textures obtained from Monte Carlo simulations with accuracy of 98%. Similar precision is obtained in the regression task of directly estimating the temperature from E7 liquid crystal textures at different temperatures and phases. We have further presented results based on cholesteric textures, in which we have probed the cholesteric pitch length with significant accuracy.

In spite of the significantly achieved accuracies, our approach is indeed quite simple and based on intuitive features very familiar to any physicist. Due to this underlying simplicity and also because our approach is very fast and scalable from the computational point of view, we believe it can be easily implemented and adapted for other more complex experimental situations involving the study of liquid crystals and perhaps for probing physical properties of different materials.

Acknowledgements.
This research was supported by CNPq and CAPES. HVR thanks the financial support of the CNPq under Grants 440650/2014-3, 303642/2014-9, and 407690/2018-2. RSZ thanks the National Institute of Science and Technology Complex Fluids (INCT-FCx), and the Sao Paulo Research Foundation (FAPESP – 2014/50983-3).

Appendix A Complexity-entropy plane

The normalized permutation entropy  Bandt and Pompe (2002) and statistical complexity  López-Ruiz et al. (1995) are two complexity measures originally proposed for characterizing time series Rosso et al. (2007), and that were more recently generalized for considering higher dimensional data such as images Ribeiro et al. (2012a); Zunino and Ribeiro (2016). We refer the more detail-oriented reader to the previously-cited references, where a complete description of these techniques can be found. Here we shall present both approaches through an illustrative example. For that, the matrix

represents an hypothetical texture of size . The elements of this matrix indicate the light intensity transmitted through the sample around a particular site. For the experimental textures, these elements are obtained by averaging the shades of red, green, and blue of the image files in the RGB “color space” (see Appendix C for further details). We thus define sliding sub-matrices of size by (the embedding dimensions) in the form

which for this particular example are

Next, we associate a sequence of symbols to each sub-matrix for representing the ordinal patterns of occurrence of their elements. In this case, is associated with since , where is the permutation that sorts the elements of in ascending order (line by line). Similarly, is represented by , since its elements are already in ascending order; is described by , since ; finally, is associated with because . In case of draws, the occurrence order of the tied elements is kept. By calculating the relative frequency of occurrence of each permutation, we estimate the probability distribution for each one of the ordinal patterns. Among the possible ordinal patterns, only four permutations have appeared once in our example, and therefore, is the ordinal distribution associated with the matrix .

The ordinal distribution is thus used for estimating and . The permutation entropy is the normalized Shannon entropy of , that is,

(1)

where corresponds to the maximum value of the Shannon entropy , occurring when all permutations are equally likely to occur (). While the statistical complexity is defined by

(2)

in which

(3)

is the Jensen-Shannon divergence between

and the uniform distribution

and is a normalization constant [obtained by calculating when ].

The entropy is a measure of “disorder” in the occurrence order of the elements of . Values of indicate that these elements appear in random order, while values of imply that they tend to appear in a certain order. On the other hand, the values of quantify the “structural” complexity present in the matrix . For a given value of , the complexity can assume values between a minimum and a maximum and provides important additional information about the correlational structure of that is not properly carried out by the values of . Mainly for this reason, we have used the diagram of versus (the so-called complexity-entropy plane) as a discriminating tool for investigating the liquid crystal textures. This framework has been successfully used in several applications with time series Jovanovic et al. (2016); Li and Zuntao (2014); Stosic et al. (2016); Ribeiro et al. (2017, 2012b) and image analysis Schlemmer et al. (2015); Antonelli et al. (2017); Sigaki et al. (2018); Antonelli et al. (2018). In addition to their simplicity and intuitive meaning, these complexity measures are very fast and scalable from the computational point of view. This approach has also only the embedding dimensions and as “tuning parameters”. However, this choice is not completely arbitrary, and the condition must hold in order to obtain a reliable estimation of . We have used in the study of simulated nematic textures and and in all other applications due to the dimensions of the matrices associated with the textures. However, very similar results are obtained when considering and , and or in all applications.

Appendix B Monte Carlo simulations

In order to obtain the nematic textures analyzed in Section II.1, we have simulated a system composed of headless spins located over the sites of a tridimensional cubic lattice of dimensions (with and

). These spins have directions represented by unit vectors

[, with ]. The spins in the first layer of the -direction are fixed and point to the -direction, while those in the last layer are fixed along the -direction. These two layers of fixed spins mimic the surface region (denoted by ) and supply an anchoring direction that twists the alignment of the spins across the sample. The other spins in the bulk region (denoted by ) interact with their nearest neighbors via the Lebwohl-Lasher potential Lebwohl and Lasher (1972) with periodic boundary conditions along the and directions. The Hamiltonian of this system can be written as

(4)

in which is the strength of the anchoring energy and

(5)

with when and are nearest neighbors, and zero otherwise.

All textures are obtained with , and the bulk spins are initially aligned making an angle with respect to the -direction [] for avoiding the appearance of unstable defects Chiccoli et al. (2015, 2017). The lattice updates are obtained through the Metropolis algorithm. Each new configuration is generated by following the Barker-Watts technique Barker and Watts (1969) and is accepted with probability , where is the energy difference between the old and new states, the temperature, and the Boltzmann constant. A Monte Carlo step is completed when all spins are updated on average.

The simulations start with a given reduced temperature , and the system is initially simulated for Monte Carlo steps to avoid transient behaviors. Next, we consider another

Monte Carlo steps for estimating the average order parameter over each layer of the system. The local order parameter is the largest eigenvalue of the order matrix

(6)

where and are the -th and -th components of the unitary vector associated with the -th spin, and stands for the Kronecker delta. The order parameter across the entire sample () is calculated by averaging the mean value of each free layer of the system. This model is well-known to present a bulk phase transition at the critical temperature  Fabbri and Zannoni (1986), that decreases when considering a confined sample with hybrid boundary conditions Chiccoli et al. (2003). In our case, we have found that the critical temperature is . For simulations with reduced temperatures closer to this critical temperature, the system is initially simulated for Monte Carlos steps for avoiding transient behaviors related to the phase transition. The textures are obtained by averaging the latest 50 Monte Carlo steps via the Stokes-Muller methodology Berggren et al. (1994). This procedure consists in treating incoming light (parallel to the -direction) as a Stokes vector, and describing each site as a Muller matrix. We have considered for the extraordinary refraction index, for the ordinary refraction index, a sample thickness of 5.3 m, and wavelength of 545 nm for the incoming light. The resulting texture is represented by a matrix with dimensions , whose elements stand for the transmitted light intensity around a particular site of the surface area.

Appendix C Experimental proceedings and image files processing

The experimental textures analyzed in Section II.2 are obtained via polarized optical microscope imaging of liquid crystal samples at different temperatures. The samples consist of rectangular capillaries with no surface treatment (300 m mm) filled with the E7 mixture at C to avoid flow alignment. Next, the samples are cooled up to room temperature and placed on a temperature controller under the polarized optical microscope setup. We start taking pictures of textures from samples at C. The samples are slowly heated at a constant rate of C per minute, and pictures are taken every  s until the temperature reaches C. For higher temperatures, the heating rate is reduced to C per minute, and pictures are taken every  s until the temperature of C is achieved.

All acquired image files are in PNG format with dimensions of pixels width by pixels height, and 24 bits per pixel (8 bits for each one of the three layers in the RGB “color space”). This means that each pixel has 256 possible intensities of red, green, and blue colors, allowing more than 16 million color variations. These files can be represented by a three-layer matrix of dimensions (image width) by (image height), in which each layer corresponds to a color channel whose elements are the color intensities (ranging from 0 to 255). We have calculated , that is, a weighted-average over the three layers, where , and stand for the shade intensities of red, green, and blue colors of each pixel. This procedure corresponds to the gray-scale luminance (or reflectance) transformation van der Walt et al. (2014), which is considered to mimic the color sensibility of the human eye. This procedure yields a single matrix for each image file from which the values of and are calculated.

Appendix D Simulations of the continuum elastic theory

The cholesteric textures investigated in Section II.3 are obtained via the continuum elastic theory. In particular, we have used the Landau-de Gennes approach Ravnik and Žumer (2009) for describing the energy density associated with variations in the tensorial order parameter around the equilibrium state. By letting , , and represent the spatial coordinates, the energy density can be written as

(7)

where , , , and are elastic constants, , , and are thermodynamic parameters, and is the cholesteric pitch length. Here, we have assumed implicit summation in repeated indexes. The time evolution of the components of is given by

(8)

where is the liquid crystal rotational viscosity, is the time and is the derivative of relative to .

The system of equations 8 is numerically solved via finite differences method in a uniform grid with grid points. All distance units are normalized by the grid distance  nm,  nm and  nm. The liquid crystal parameters used are  MJ/(Km),  MJ/m,  MJ/m,  Pa s,  pN,  pN,  pN, and  pN. These parameters are obtained from the literature and are well-known to roughly describe the 5CB liquid crystal Prost and de Gennes (1995). Thus, instead of rescaling the elastic and thermodynamic constants to unrealistic values Ravnik and Žumer (2009), we have used real values for these parameters but a small lattice size (). This choice implies in using small and unrealistic values for the cholesteric pitches. However, the textures produced with this approach are qualitatively very similar to those obtained when using unrealistic values for the physical parameters. Also, these textures are well-known to mimic well those obtained from experimental studies. We have considered different values for the pitch and the Dormand-Prince of fourth-order Dormand and Prince (1980) for the time integration. The initial condition is randomly chosen from a uniform distribution and periodic boundary conditions are considered in all directions for avoiding surface effects. Finally, the resulting optical textures are generated by applying the Jones method Wu and Yang (2006) with the liquid crystal cells placed between crossed polarizers. This approach is the same used in reference Seč et al. (2012) for generating the optical images.

Appendix E Implementation of the machine learning algorithms

Machine learning tasks include classification and regression. Classification is the task of predicting a discrete class label by providing a correctly labeled training set of data, whereas in regression tasks the algorithm predicts a continuous quantity. Thus, the predictions of the order parameter from the simulated nematic textures and the predictions of the temperature from the experimental nematic textures represent a regression task. On the other hand, the predictions of the discrete set of cholesteric pitches represent a classification task. For both tasks, we have used the -nearest neighbors algorithms as implemented in the Python module scikit-learn Pedregosa et al. (2011). This is one of the simplest machine learning algorithms that make predictions based on the classes (or values) of -closest neighbors Hastie et al. (2013). The only parameter of this algorithm is the number of nearest neighbors .

The best value of

is chosen to simultaneously minimize the bias and variance errors of the predictions (the so-called bias-variance tradeoff  

Hastie et al. (2013)). Bias errors occurs when the statistical learning algorithm is not complex enough to capture the underlying structure of the data (underfitting). On the other hand, variance errors appear when the algorithm is too complex and starts to model even the noise in the training set, but fail in predicting future observations in unseen data (overfitting). There is thus a trade-off between minimizing the bias and variance errors concerning the algorithm complexity.

To address this question, we employ a resampling strategy known as -fold cross-validation Hastie et al. (2013). This approach consists in randomly splitting the data into subsamples of approximately equal size. One of the subsamples is separated for validating the algorithm, and the remaining are used for training the algorithm. This process is thus repeated times. The accuracy obtained from the training set is the training score, and the one obtained from the validation set is the cross-validation score. At the end of repetitions, we have estimates for the training and cross-validation scores, from which we calculate average values and confidence intervals. The plot of the training and cross-validation scores as a function of model parameters (in our case, the number of nearest neighbors ) is known as validation curves. In our regression tasks, the scores represent the coefficient of determination () of the relationship between the predicted and true values. When positive, the

is also interpreted as the percentage (or fraction) of the response variable variation that is explained by the model. Also, in our classification task, the score (or accuracy) represents the fraction of correct classifications. An underfitting situation happens when both training and validation scores are low; whereas overfitting is represented by good training scores and poor validation scores. The best bias-variance tradeoff occurs when the highest values are obtained for both scores. We have also estimated the learning curves, which represent the dependence of the training and the cross-validation scores on the size of the training set. This is an important matter for statistical learning methods because small training sets may not be enough for correctly fitting the model, while unnecessary data may introduce noise to the model.

We have further compared the performance of the

-nearest neighbors algorithm with other more complex machine learning methods (namely: random forest, support vector machine, and neural network). However, the scores for these methods are very similar to those obtained for the

-nearest neighbors. For this reason and also due to the simplicity of the -nearest neighbors, we have only reported the results for this machine learning method.

References