Alexandre Millot

Romain Mathonat

Rémy Cazabet

Jean-François Boulicaut

Actionable Subgroup Discovery and Urban Farm Optimization

Keywords: Subgroup Discovery, Virtuous Circle, Urban Farms

Designing, selling and/or exploiting connected vertical urban farms is now receiving a lot of attention. In such farms, plants grow in controlled environments according to recipes that specify the different growth stages and instructions concerning many parameters (e.g., temperature, humidity, CO2, light). During the whole process, automated systems collect measures of such parameters and, at the end, we can get some global indicator about the used recipe, e.g., its yield. Looking for innovative ideas to optimize recipes, we investigate the use of a new optimal subgroup discovery method from purely numerical data. It concerns here the computation of subsets of recipes whose labels (e.g., the yield) show an interesting distribution according to a quality measure. When considering optimization, e.g., maximizing the yield, our virtuous circle optimization framework iteratively improves recipes by sampling the discovered optimal subgroup description subspace. We provide our preliminary results about the added-value of this framework thanks to a plant growth simulator that enables inexpensive experiments.

Introduction

Conventional farming methods have to face many challenges like, for instance, soil erosion and/or an overuse of pesticides. The crucial problems related to climate change also stimulate the design of new production systems. The concept of urban farms (see, e.g., AeroFarms, FUL, Infarm1 ) could be part of a solution. It enables the growth of plants in fully controlled environments close to the place where consumers are [START_REF] Harper | Openag: A globally distributed network of food computing[END_REF]. Most of the crop protection chemical products can be removed while being able to optimize both the quantity and the quality of plants (e.g., improving the flavor [START_REF] Johnson | Flavor-cyber-agriculture: Optimization of plant metabolites in an open-source control environment through surrogate modeling[END_REF] or their chemical proportions [START_REF] Wojciechowska | Effects of led supplemental lighting on yield and some quality parameters of lamb's lettuce grown in two winter cycles[END_REF]).

Urban farms can generate large amounts of data that can be pushed towards a cloud environment such that various machine learning and data mining methods can be used. We may then provide new insights about the plant growth process itself (discovering knowledge about not yet identified/understood phenomena) but also offer new services to farm owners. We focus here on services that rely on the optimization of a given target variable, e.g., the yield. The number of parameters influencing plant growth can be relatively large (e.g., temperature, hygrometry, water pH level, nutrient concentration, LED lighting intensity, CO 2 concentration). There are numerous ways of measuring the crop end-product (e.g., energy cost, plant mass and size, flavor and chemical properties). In general, for a given type of plants, expert knowledge exists that concerns the available sub-systems (e.g., to model the impact of nutrient on growth, the effect of LED lighting on photosynthesis, the energy consumption w.r.t. the temperature instruction) but we are far from a global understanding of the interaction between the various underlying phenomena. In other terms, setting the optimal instructions for the diverse set of parameters given an optimization task remains an open problem.

We want to address such an issue by means of data mining techniques. Plant growth recipes are made of instructions in time and space for many numerical attributes. Once a recipe is completed, collections of measures have been collected and we assume that at least one numerical target label value is available, e.g., the yield. Can we learn from available recipe records to suggest new ones that should provide better results w.r.t. the selected target attribute ? For that purpose, we investigate the use of subgroup discovery [START_REF] Klösgen | Explora: A multipattern and multistrategy discovery assistant[END_REF][START_REF] Wrobel | An algorithm for multi-relational discovery of subgroups[END_REF]. It aims at discovering subsets of objects -called subgroups -with high quality according to a quality measure calculated on the target label. Such a quality measure has to capture deviations in the target label distribution when we consider the overall data set or the considered subset of objects. When addressing only subgroup discovery from numerical data, a few approaches for numerical attributes [START_REF] Grosskreutz | On subgroup discovery in numerical domains[END_REF][START_REF] Mampaey | Efficient algorithms for finding richer subgroup descriptions in numeric and nominal data[END_REF] and numerical target labels [START_REF] Lemmerich | Fast exhaustive subgroup discovery with numerical target concepts[END_REF] have been described. To the best of our knowledge, the reference algorithm for subgroup discovery in purely numerical data is SD-Map * [START_REF] Lemmerich | Fast exhaustive subgroup discovery with numerical target concepts[END_REF]. However, like other methods, it uses discretization and leads to loss of information and sub-optimal results. Our first contribution concerns the proposal of a simple branch and bound algorithm called MinIntChange4SD that exploits the exhaustive enumeration strategy from [START_REF] Kaytoue | Revisiting numerical pattern mining with formal concept analysis[END_REF] to achieve a guaranteed optimal subgroup discovery in numerical data without any discretization. Discussing details about this algorithm is out of the scope of this paper and we recently designed a significantly optimized version of MinIntChange4SD in [START_REF] Millot | Optimal subgroup discovery in purely numerical data[END_REF]. Our main contribution concerns a new methodology for plant growth recipe optimization that (i) uses MinIntChange4SD to find the optimal subgroup of recipes and (ii) exploits the subgroup description to design better recipes which can in turn be analyzed with subgroup discovery, and so on.

The paper is organized as follows. Section 2 formalizes the problem. In Section 3, we discuss related works and their limitations. In Section 4, we introduce our new optimal subgroup discovery algorithm and we detail our framework for plant growth recipe optimization. An empirical evaluation of our method is in Section 5. Section 6 briefly concludes. 2 Problem Definition Numerical dataset. A numerical dataset (G, M, T ) is given by a set of objects G, a set of numerical attributes M and a numerical target label T . In a given dataset, the domain of any attribute m ∈ M (resp. label T ) is a finite ordered set denoted D m (resp. D T ). Fig. 1 (left) provides a numerical dataset made of two attributes M = {m 1 , m 2 } and a target label T . A subgroup p is defined by a pattern, i.e., its intent or description, and the set of objects from the dataset where it appears, i.e., its extent, denoted ext(p). For instance, in Fig. 1, the domain of m 1 is {1, 2, 3, 4} and the intent [START_REF] Bosc | Anytime discovery of a diverse set of patterns with monte carlo tree search[END_REF][START_REF] Garriga | Closed sets for labeled data[END_REF], [START_REF] Atzmueller | SD-map -a fast algorithm for exhaustive subgroup discovery[END_REF][START_REF] Fayyad | Multi-interval discretization of continuous-valued attributes for classification learning[END_REF] (see the definition of interval patterns later) denotes a subgroup whose extent is {g 3 , g 4 , g 5 , g 6 }.

Quality measure, optimal subgroup. The interestingness of a subgroup in a numerical dataset is measured by a numerical value. We consider here the quality measure based on the mean introduced in [START_REF] Lemmerich | Fast exhaustive subgroup discovery with numerical target concepts[END_REF]. Let p be a subgroup. The quality of p is given by: q a mean (p

) = |ext(p)| a × (µ ext(p) -µ ext(∅) ), a ∈ [0, 1]. |ext(p)| denotes the cardinality of ext(p), µ ext(p)
is the mean of the target label in the extent of p, µ ext(∅) is the mean of the target label in the overall dataset, and a is a parameter that controls the number of objects of the subgroups. Let (G, M, T ) be a numerical dataset, q a quality measure and P the set of all subgroups of (G, M, T ). A subgroup p ∈ P is said to be optimal iff ∀p ∈ P : q(p ) ≤ q(p).

Plant growth recipe and optimization measure. A plant growth recipe (M, P, T) is given by a set of numerical parameters M specifying the growing conditions thanks to intervals on numerical values, a numerical value P representing the number of stages of the growth cycle, and a numerical target label T to quantify the recipe quality. In a given recipe, each parameter of M is repeated P times s.t. we have |M | × P numerical attributes. Our goal is to optimize recipes and we want to discover actionable patterns in the sense that delivering such patterns will support the design of new growing conditions. An optimization measure f quantifies the quality of an iteration. We are interested in the mean of the target label of the objects of the optimal subgroup after each iteration.

The measure is given by f mean = i∈ext(p) T (i)

|ext(p)|
where T (i) is the value of the target label for object i.

Related Work

Designing recipes that optimize a given target attribute (e.g., the mass, the energy cost) is often tackled by domain experts who exploit the scientific literature. However, in our setting, it has two major drawbacks. First, most of the literature remains oriented towards conventional growing conditions and farming methods. In urban farms, there are more parameters that can be controlled. Secondly, the amount of knowledge about plants is unbalanced from one plant to another. Therefore, relying only on expert knowledge for plant recipe optimization is not sufficient. We have an optimization problem and the need for a limited number of iterations. Indeed, experimenting with plant growth recipes is time consuming (i.e., asking for weeks or months). Therefore, we have to minimize the number of experiments that are needed to optimize a given recipe. There are two main families of methods addressing the problem of optimizing a function over numerical variables: direct and model-based [START_REF] Rios | Derivative-free optimization: a review of algorithms and comparison of software implementations[END_REF]. For direct methods, the common idea is to apply various strategies to sequentially evaluate solutions in the search space of recipes. However such methods do not address the problem of minimizing the number of experiments. For model-based methods, the idea is to build a model simulating the ground truth using available data and then to use it to guide the search process. For instance, [START_REF] Johnson | Flavor-cyber-agriculture: Optimization of plant metabolites in an open-source control environment through surrogate modeling[END_REF] introduced a solution for recipe optimization using this type of method with the goal of optimizing the flavor of plants. Their framework is based on using a surrogate model, in this case a Symbolic Regression [START_REF] Koza | Genetic programming: On the programming of computers by means of natural selection[END_REF]. It considers recipe optimization by means of a promising virtuous circle. However, it suffers from several shortcomings: there is no guarantee on the quality of the generated models (i.e., they may not be able to model correctly the ground truth), the number of tested parameters is small (only 3), and the ratio between the number of objects and the number of parameters in the data needs to be at least ten for Symbolic Regression [START_REF] Jones | Efficient global optimization of expensive black-box functions[END_REF]. Clearly, it would restrict the search to only a few parameters.

Heuristic [START_REF] Mampaey | Efficient algorithms for finding richer subgroup descriptions in numeric and nominal data[END_REF][START_REF] Bosc | Anytime discovery of a diverse set of patterns with monte carlo tree search[END_REF] and exhaustive [START_REF] Atzmueller | SD-map -a fast algorithm for exhaustive subgroup discovery[END_REF][START_REF] Grosskreutz | Fast and memory-efficient discovery of the top-k relevant subgroups in a reduced candidate space[END_REF] solutions have been proposed for subgroup discovery. Usually, these approaches consider a set of nominal attributes with a binary label. To work with numerical data, prior discretization of the attributes is then required (see, e.g., [START_REF] Fayyad | Multi-interval discretization of continuous-valued attributes for classification learning[END_REF]) and it leads to loss of information and suboptimal results. A major issue with exhaustive pattern mining is the size of the search space. Fortunately, optimistic estimates can be used to prune the search space and provide tractability in practice [START_REF] Wrobel | An algorithm for multi-relational discovery of subgroups[END_REF][START_REF] Grosskreutz | Tight optimistic estimates for fast subgroup discovery[END_REF]. [START_REF] Lemmerich | Fast exhaustive subgroup discovery with numerical target concepts[END_REF] introduces a large panel of quality measures and corresponding optimistic estimates for an exhaustive subgroup mining given numerical target labels. They describe SD-Map * , the reference algorithm for subgroup discovery in numerical data. Notice however that for [START_REF] Lemmerich | Fast exhaustive subgroup discovery with numerical target concepts[END_REF] or others [START_REF] Grosskreutz | On subgroup discovery in numerical domains[END_REF][START_REF] Mampaey | Efficient algorithms for finding richer subgroup descriptions in numeric and nominal data[END_REF], discretization techniques over the numerical attributes have to be performed. When looking for an exhaustive search of frequent patterns -not subgroups -in numerical data without discretization, we find the MinIntChange algorithm [START_REF] Kaytoue | Revisiting numerical pattern mining with formal concept analysis[END_REF]. Using closure operators (see, e.g., [START_REF] Garriga | Closed sets for labeled data[END_REF]) has become a popular solution to reduce the size of the search space. We indeed exploit most of these ideas to design our optimal subgroup discovery algorithm.

Optimization with Subgroup Discovery

An Efficient Algorithm for Optimal Subgroup Discovery

Let us first introduce MinIntChange4SD, our branch and bound algorithm for the optimal subgroup discovery in purely numerical data. It exploits smart concepts about interval patterns from [START_REF] Kaytoue | Revisiting numerical pattern mining with formal concept analysis[END_REF].

Interval patterns, extent and closure. In a numerical dataset (G, M, T ), an interval pattern p is a vector of intervals p = [a i , b i ] i∈{1,...,|M |} with a i , b i ∈ D mi , where each interval is a restriction on an attribute of M , and |M | is the number of attributes. Let g ∈ G be an object. g is in the extent of an interval

pattern p = [a i , b i ] i∈{1,...,|M |} iff ∀i ∈ {1, ..., |M |}, m i (g) ∈ [a i , b i ].
Let p 1 and p 2 be two interval patterns. p 1 ⊆ p 2 means that p 2 encloses p 1 , i.e., the hyperrectangle of p 1 is included in that of p 2 . It is said that p 1 is a specialization of p 2 . Let p be an interval pattern and ext(p) its extent. p is defined as closed if and only if it is the most restrictive pattern (i.e., the smallest hyper-rectangle) that contains ext(p). Traversing the search space with minimal changes. To guarantee the optimal subgroup discovery, we proceed to the so-called minimal changes introduced in MinIntChange. It enables an exhaustive enumeration within the interval pattern search space. A left minimal change consists in replacing the left bound of an interval by the current value closest higher value in the domain of the corresponding attribute. Similarly, a right minimal change consists in replacing the right bound by the current value closest lower value. The search starts with the computation of the minimal interval pattern that covers all the objects of the dataset. The premise is to apply consecutive right or left minimal changes until obtaining an interval whose left and right bounds have the same value for each interval of the minimal interval pattern. In that case, the algorithm backtracks until it finds a pattern on which a minimal change can be applied. Fig. 1 (right) depicts the depth-first traversal of attribute m 2 from the dataset of Fig. 1 (left) using minimal changes.

Compressing and pruning the search space We leverage the concept of closure to significantly reduce the number of candidate interval patterns. After a minimal change and instead of evaluating the resulting interval pattern, we compute its corresponding closed interval pattern. We exploit advanced pruning techniques to reduce the size of the search space thanks to the use of a tight optimistic estimate. We also exploit a combination of forward checking and branch reordering. Given an interval pattern, the set of all its direct specializations (application of a right or left minimal change on each interval) are computedforward checking -and those whose optimistic estimate is higher than the best subgroup quality are stored. Branch reordering by descending order of the optimistic estimate value is then carried out which enables to explore the most promising parts of the search space first. It also enables a more efficient pruning by raising the minimal quality early. In fact, providing details about the algorithm is out of the scope of this paper though its source code is available at https://bit.ly/3bA87NE. The important outcome is that it guarantees the discovery of optimal subgroups for a given quality measure. Indeed, provided that it remains tractable, the runtime efficiency is not here an issue given that we want to use the algorithm at some steps of quite slow vegetable growth processes.

Leveraging Subgroups to Optimize Recipes

A virtuous circle. Our optimization framework can be seen as a virtuous circle, where each new iteration uses information previously gathered to iteratively improve the targeted process. First, a set of recipe experiments -which can be created with or without the use of expert knowledge -is created. With the use of expert knowledge, values or domain of values are defined for each attribute and then recipes are produced using these values. When generating recipes without prior knowledge, we create recipes by randomly sampling the values of each attribute. Secondly, we use subgroup discovery to find the best subgroup of recipes according to the chosen quality measure (e.g., the subgroup of recipes with the best average yield). Then, we exploit the subgroup description -i.e., we apply new restrictions on the range of each parameter according to the descriptionto generate new, better, recipe experiments. Finally these recipes are in turn processed to find the best subgroup for the new recipes, and so on until recipes cannot be improved anymore. This way, we sample recipes in a space which gets smaller after each iteration and where the ratio between good and bad solutions gets larger and larger. Fig. 2 depicts a step-by-step example of the process behind the framework. Our framework makes use of several hyperparameters that affect runtime efficiency, the number of iterations and the quality of the results.

Convergence. The first hyperparameter is the parameter a used in the q a mean quality measure. In standard subgroup discovery, it controls the number of objects in the returned subgroups. A higher value of a means larger subgroups. For us, a larger subgroup means a larger search space to sample. By extension, a higher value of a means more iterations to be able to reach smaller subspaces of the search space. For that reason, we rename the parameter as the convergence rate. The second hyperparameter is called the minimal improvement (minImp). It defines the minimal improvement of the Optimization measure -f mean in our setting -needed from one iteration to another for the framework to keep running. After each iteration, we check whether the following statement is true or false. Fig. 2. Example of execution of the optimization framework in 3 iterations. We consider a two-dimensional space (i.e., 2 attributes m1 and m2) where 4 recipes are generated during each iteration using our first sampling method. The best subgroup (optimizing the yield) of each iteration (hatched) serves as the next iteration sampling space.

f meanit -f meanit-1 f meanit-1 ≥ minImp m1 m2 0
If it is true, then the optimization framework keeps running, else we consider that the recipes cannot be improved any further. This parameter has a direct effect on the number of iterations needed for the algorithm to converge. A higher value for minImp means a lower number of iterations and vice versa. We can also forget minImp and set the number of iterations by means of another parameter that would denote a budget.

Sampling the subspace. After each iteration, to generate new recipes to experiment with, we need to sample the subspace corresponding to the description of the best subgroup. Three sampling methods are currently available and this defines again a new hyperparameter. The first method consists in sampling recipes using the original set of values of each attribute (i.e., in the first iteration) minus the excluded values due to the new restrictions applied on the subspace. Let D 1 m be the domain of values of attribute m at Iteration 1 and [a i m , b i m ] be the interval of attribute m at Iteration i according to the description of the best subgroup of Iteration i -

1. Then, ∀v ∈ D 1 m , v ∈ D i m ⇔ b i m ≥ v ≥ a i m .
Using this method, the number of values available for sampling for each attribute gets smaller after each iteration, meaning that each iteration is faster than the previous one. The second consists in discretizing the search space through the discretization of each attribute in k intervals of equal length. Parameter k is set before launching the framework. Recipes are then sampled using the discretized domain of values for each attribute. Finally, we can use Latin Hypercube Sampling [START_REF] Mckay | A comparison of three methods for selecting values of input variables in the analysis of output from a computer code[END_REF] as a third method. In Latin Hypercube Sampling, each attribute is divided in S equally probable intervals, with S the number of samples (i.e., recipes). Using this method, recipes are sampled such that each recipe is the only one in each hyperspace that contains it. The number of samples generated for each iteration is also a hyperparameter of the framework.

An explainable generic framework. Our optimization framework is explainable contrary to black box optimization algorithms. Each step of the process is easily understandable due to the descriptive nature of subgroup discovery. Although we have been referring to our algorithm MinIntChange4SD when introducing the optimization framework, other subgroup discovery algorithms can be used, including [START_REF] Lemmerich | Fast exhaustive subgroup discovery with numerical target concepts[END_REF] and [START_REF] Millot | Optimal subgroup discovery in purely numerical data[END_REF]. Notice however that the better the quality of the provided subgroup, the better the results returned by our framework will be. Finally, our method can be applied to quite many application domains where we want to optimize a numerical target given collections of numerical features (e.g., hyperparameter optimization in machine learning).

Experiments

We work on urban farm recipe optimization while we do not have access to real farming data yet. One of our partners in the FUI DUF 4.0 project (2018-2021) is designing new types of urban farms. We found a way to support the empirical study of our recipe optimizing framework thanks to inexpensive experiments enabled by a simulator. In an urban farm, plants grow in a controlled environment. In the absence of failure, recipe instructions are followed and we can investigate the optimization of the plant yield at the end of the growth cycle. We simulate recipe experiments by using the PCSE2 simulation environment by setting the characteristics (e.g., the climate) of the different growth stages. We focus on 3 variables that set the amount of solar irradiation (range [0,25000]), wind (range [0,30]) and rain (range [0,40]). The plant growth is split into 3 stages of equal length such that we finally get 9 attributes. In real life, we can control most of the parameters of an urban farm (e.g., providing more or less light) and a recipe optimization iteration needs for new insights about the promising parameter values. This is what we can emulate using the crop simulator: given the description of the optimal subgroup, we get insights to support the design of the next simulations, say experiments, as if we were controlling the growth environment. At the end of the growth cycle, we retrieve the total mass of plants harvested using a given recipe. Note that in the following experiments, unless stated otherwise, no assumption is made on the values of parameters (i.e., no restriction is applied on the range of values defined above and expert knowledge is not taken into account). Table 1 features examples of plant growth recipes. The source code and datasets used in our evaluation are available at https://bit.ly/3bA87NE.

MinIntChange4SD vs SD-Map *

We study the description of the best subgroup returned by MinIntChange4SD and SD-Map * , the state-of-the art algorithm for subgroup discovery in numerical data. Table 2 depicts the descriptions for a dataset comprised of 30 recipes generated randomly with the simulator. Besides the higher quality of the subgroup returned by MinIntChange4SD, the optimal subgroup description also enables to extract information that is missing from the description obtained with SD-Map * . In fact, where SD-Map * only offers a strong restriction on 3 attributes, MinIntChange4SD provides actionable information on all the considered attributes, i.e., the 9 attributes. This confirms its qualitative superiority over SD-Map * which has to proceed to attribute discretizations.

Empirical Evaluation of the Model Hyperparameters

Our optimization framework involves several hyperparameters whose values need to be studied to define proper ranges or values that will lead to optimized results with a minimized number of recipe experiments. We choose to apply a random search on discretized hyperparameters. Note that in this setting, grid search is a bad solution due to the combinatorial number of hyperparameter values and the high time cost of the optimization process itself. We discretize each hyperparameter in several values (the convergence rate is split into 10 values ranging from 0.1 to 1, the minimal improvement parameter is split into 12 values between 0 and 0.05, the sampling parameter is split between the 3 available methods, and the number of recipes for each iteration is either 20 or 30). We run 100 iterations of random search, with each iteration -read set of parameter values -being tested 10 times and averaged to account for randomness of the recipes generated. After each iteration of random search, we store the set of hyperparameter values and the corresponding best recipe found. Fig. 3 depicts results of the experiments. Optimal values for convergence rate seem to be around 0.5, between 0.001 and 0.01 for minimal improvement, and the best sampling method is tied between the first and second one. Generating 30 recipes for each iteration yields better results than 20 (average yield of 23857 for 30 recipes against 22829 for 20 recipes). To compare our method against other methods, we run our framework with the following parameters: 30 recipes times 5 iterations (for a total of 150 recipes), 0.5 convergence rate, using the second sampling method with k = 15. To address the variance in the yield due to randomness in the recipe generation process, we run the framework 10 times, we store the best recipe found at each iteration and then compute the average of the stored recipes. We report the results in Table 3.

Comparison with Alternative Methods

Good hyperparameter values have been defined for our optimization framework and we can now compare our method with other ones. Let us consider the use of expert knowledge and random search. First, we want to create a model using expert knowledge. With the help of an agricultural engineer, we defined a priori good values for each parameter using expert knowledge and we generated a recipe that can serve as a baseline for our experiments. We then choose to compare our method against a random search model without expert knowledge. We set the number of recipes to 150 for all methods to provide a fair comparison with our own model where the number of recipes is set to 150. To account for randomness in the recipe generation, we run 10 iterations of the random search model, we store the value of the best recipe found in each iteration, and we compute their average yield. Results of the experiments and a description of the best recipe for each method are available in Table 3. Random search and expert knowledge find recipes with almost equal yields, while our framework find recipes with higher yield. Note that in industrial settings, an improved yield of 3% to 4% has a significant impact on revenues.

Let us now compare our framework to the Surrogate Modeling method presented in [START_REF] Johnson | Flavor-cyber-agriculture: Optimization of plant metabolites in an open-source control environment through surrogate modeling[END_REF]. To be fair, we give the same number of data points to build the Symbolic Regression surrogate model as we used in previous experiments, i.e., 150 for training the model (we evaluated the RMSE of the model on a test set of 38 other samples). We use gplearn [START_REF] Stephens | gplearn[END_REF], with default parameters, except for the number of generations and the number of models evaluated for each generations, which are respectively of 1000 and 2000, as in [START_REF] Johnson | Flavor-cyber-agriculture: Optimization of plant metabolites in an open-source control environment through surrogate modeling[END_REF]. Note that the model obtained has a RMSE of 2112, and it is composed of more than 2000 terms (including mathematical operators), therefore the argument of interpretability is questionable. A grid search is finally done on this model and we select the best recipe and obtain their true yield using the PCSE simulation environment. The number of steps for each attribute for the grid search has to be defined. We set it to 5. As we have 9 parameters, it means that the model needs to be evaluated on nearly 9 million potential recipes. Also, the model is composed of hundreds of terms such that experiments are computationally expensive. The best recipe found so far is given in Table 3. The surrogate model predicts a yield value of 21137. Compared to the ground truth of 10170, the model has a strong bias. It illustrates that using a surrogate model for this kind of problem will give good recipes only if it is reliable enough. Interestingly, the RMSE seems to be quite good at first glance, but this does not guarantee that the model will behave correctly on all elements of the search space: on the best recipe found, it largely overestimates the yield, leading to a non-interesting recipe. It seems that this method performs poorly on recipes with more attributes than in [START_REF] Johnson | Flavor-cyber-agriculture: Optimization of plant metabolites in an open-source control environment through surrogate modeling[END_REF]. Further studies are here needed.

Conclusion

We investigated the optimization of plant growth recipes in controlled environments, a key process in connected urban farms. We motivated the reasons why existing methods fall short of real life constraints, including the necessity to minimize the number of experiments needed to provide good results. We detailed a new optimization framework that leverages subgroup discovery to iteratively find better growth recipes through the use of a virtuous circle. We also introduced an efficient algorithm for the optimal subgroup discovery in purely numerical datasets. It has been recently improved much further in [START_REF] Millot | Optimal subgroup discovery in purely numerical data[END_REF]. We avoid discretization and it provides a qualitative added-value (i.e., more interesting optimal subgroups). Future work includes extending our framework to deal with multiple target labels at the same time (e.g., optimizing the yield while keeping the energy cost as low as possible).

Acknowledgment. Our research is partially funded by the French FUI programme (project DUF 4.0, 2018-2021).

Fig. 1 .

 1 Fig. 1. (left) Purely numerical dataset. (center) Non-closed (p1 = [2, 4], [1, 3] , nonhatched) and closed (p2 = [2, 4], [2, 3] , hatched) interval patterns. (right) Depth-first traversal of m2 using minimal changes.

Fig. 1 (

 1 center) depicts the dataset of Fig. 1 (left) in a cartesian plane as well as examples of interval patterns that are closed (p 2 ) or not (p 1 ).

Fig. 3 .

 3 Fig. 3. Yield of the best recipe depending on the value of different hyperparameters using 100 sample recipes for each hyperparameter.

Table 1 .

 1 Examples of growth recipes split in 3 stages (P1, P2, P3), 3 attributes, and a target label (Yield). R Rain P 1 Irrad P 1 Wind P 1 Rain P 2 Irrad P 2 Wind P 2 Rain P 3 Irrad P 3 Wind P 3 Yield

	r1 10	23250	5	10	23250	5	15	21000	10	22000
	r2 35	10000	14	5	25000	10	16	19500	30	20500
	r3 15	17500	26	22	15000	18	30	4000	3	8600
	r4 18	22800	17	38	17000	25	38	12000	19	14200

Table 2 .

 2 Comparison between descriptions of the overall dataset (DS), the optimal subgroup returned by MinIntChange4SD (MIC4SD), the optimal subgroup returned by SD-Map * . "-" means no restriction on the attribute compared to DS, Q and S respectively the quality and size of the subgroup. Subgroup Rain P 1 Irrad P 1 Wind P 1 Rain P 2 Irrad P 2 Wind P 2 Rain P 3

	Irrad P 3	Wind P 3 Q S

Table 3 .

 3 Comparison of the description and the yield of the best recipe returned by each method. EK = Expert Knowledge, RS = Random Search, SM = Surrogate Modeling, VC = Virtuous Circle (our framework). Method Rain P 1 Irrad P 1 Wind P 1 Rain P 2 Irrad P 2 Wind P 2 Rain P 3 Irrad P 3 Wind P 3

	Yield

https://aerofarms.com/, http://www.fermeful.com/, https://infarm.com/.

https://pcse.readthedocs.io/en/stable/index.html


Numerical Approach to the Optimal Control and Efficiency of the Copepod Swimmer.

55th IEEE Conference on Decision and Control

Bernard Bonnard, Monique Chyba, Jérémy Rouot and Daisuke Takagi 1

Context

• Geometric optimal control . Maximum principle . Second order optimality conditions (local, conjugate points)

• Swimming at low Reynolds number . sub-Riemannian (SR) geometry framework . Varational approach to find trajectoires of a Hamiltonian system with periodic projections . Find optimal stroke (efficiency concept) . micro-device implementation (D. Takagi, M. Chyba) Smooth optimal control system in R n min c( q(0), q(T ))

subject to q = F(q, u), q0 = L(q, u) ( q(0), q(T )) ∈ B

• final time T is fixed

• q = (q, q 0 ), q state, q 0 ∈ R • u(.) ∈ L ∞ ([0, T ],U), U ⊂ R m • B : smooth closed set of R n × R n , ( q(0), q(T )) ∈ B stands for mixed boundary conditions. Ex. : B = {q(0) = q(T ), q 0 (0) = 0}, B = {q(0) = q 0 , q(T ) = q f , q 0 (0) = 0}...

Pontryagin Maximum Principle

Necessary condition. ( q, u) optimal =⇒ ∃ p = (p, p 0 ) : [0, T ] → (R n × R) abs. continuous and λ ≥ 0 cst with ( p, λ ) = (0, 0) and s.t.

˙ q = ∂ H ∂ p , ˙ p = - ∂ H ∂ q , H( q, p, u) = max v∈U H ( q, p, v)
where H ( q, p, u) = p • F(q, u) + p 0 L(q, u).

Transversality conditions:

( p(0), -p(T )) -λ ∂ c ∂ q(0) ( q(0), q(T )), ∂ c ∂ q(T ) ( q(0), q(T )) ∈ (T ( q(0), q(T )) B) ⊥ Definition 1. ( q, p, λ , u) is a normal extremal if λ > 0, abnormal if λ = 0.
An abnormal trajectory q which is not a projection of normal extremal is said strict.

Life at low Reynolds number -Purcell, 1977

Reynolds number

Swimmer deformations Zooplankton

Copepod Model (Takagi, 2014)

Symmetric 2-link swimmer

x(t) x θ 1 (t) θ 1 (t) l l θ 2 (t) θ 2 (t) θ = π θ = 0 Controlled dynamic (Takagi, 2014) ẋ = ∑ 2 i=1 l 2 θi sin(θ i ) 2 + ∑ 2 i=1 sin 2 (θ i ) , θi = u i , i = 1, 2 , state constraints: 0 ≤ θ 1 ≤ θ 2 ≤ π.
Criterion : min of the dissipative energy: qS(q) q where q = (x, θ 1 , θ 2 ) and S is a positive-definite matrix =⇒ quadratic form in (u 1 , u 2 ).

types of swimming

Definition 2. An admissible stroke is a periodic motion of the shape variables (θ 1 , θ 2 ) associated with a periodic control and producing a displacement of the position variable after one period T (we can fix T = 2π). SR problem

E = Geometric Efficiency = x(T )/l SR (q) SR length: l SR (q) = T 0 L(q, u) dt, L(q, u) = a(q) u 2 1 + 2b(q) u 1 u 2 + c(q) u 2 2 min l SR (q) ⇐⇒ min T 0 | q| 2 L dt = min T 0 L(q, u)dt With c( q(0), q(T )) = q 0 (T ) : q = 2 ∑ i=1 u i F i ← min T 0 L(q, u)dt, max E ⇐⇒      min T 0 L(q, u)dt with x(T) fixed, then select max x(T ) E transversality cond.     
Compute points on the SR-sphere → provide candidates to maximize the efficiency.

Application of the Pontryagin Maximum Principle

q = 2 ∑ i=1 u i F i (q), q = (x, θ 1 , θ 2 ) F i = sin(θ i ) ∆ ∂ ∂ x + ∂ ∂ θ i , ∆ = 2 + sin 2 (θ 1 ) + sin 2 (θ 2 )
PMP:

H (z, u) = u 1 H 1 (z) + u 2 H 2 (z) + p 0 L(q, u), z = (q, p)
with

H i = p • F i , i = 1, 2.
• normal case: p 0 = -1/2 and u i , i = 1, 2 given by ∂ H /∂ u = 0

H n = 1/2 (a(q) H 2 1 + 2b(q) H 1 H 2 + c(q) H 2 2 )
• abnormal case:

p 0 = 0 hence H 1 = H 2 = {H 1 , H 2 } = 0, then u 1 {{H 1 , H 2 } , H 1 } + u 2 {{H 1 , H 2 } , H 2 } = 0.
Abnormals extremals Proposition 3. The surface Σ : { q; det(F 1 (q), F 2 (q), [F 1 , F 2 ](q))=0 } contains abnormal trajectories and is characterized by

• θ i = 0 or π, for i = 1, 2, • θ 1 = θ 2 .
→ physical boundary of the state domain.:

θ i ∈ [0, π], i = 1, 2, θ 1 ≤ θ 2 . 0 . . π π θ 1 : abnormal trajectories in the plane (θ 1 , θ 2 ) θ 2
Boundary conditions defined by

x(0) = 0, x(T ) = x f , θ i (0) = θ i (T ), i = 1, 2
Transversality conditions

p θ i (0) = p θ i (T ), i = 1, 2
Shooting problem

       ż = - → H n (z) x(0) = 0, x(T ) = x f (fixed) , θ i (0) = θ i (T ), i = 1, 2 p θ i (0) = p θ i (T ), i = 1, 2
• HamPath indirect method: based on the PMP, Newton type algorithm and compute necessary second order optimality conditions, not robust w.r.t. initialization.

• Bocop direct method : give an initialization of the shooting algorithm of the HamPath code.

Exponential mapping

First conjugate time t t t c c c : the exponential mapping exp q 0 : IR × C → M, (t, p 0 ) → q(t, q 0 , p 0 )

is not an immersion at (t c , p 0 ).

Theorem 4. Let q : [0, T ] -→ IR n a strict normal stroke. If q(.) has at least one conjugate point on ]0, T [, then q is not a local minimizer for the L ∞ topology on controls, considering the fixed extremities problem. Theorem 5 (Numerical result). For each fixed displacement x(T ), one can find a simple loop associated with an energy level =⇒ one parameter family of strokes. Select a stroke with transversality conditions. Geometric efficiency, c c c( ( ( q q q( ( (0 0 0) ) ), , , q q q( ( (T T T ) ) )) ) ) = = = ---x x x( ( (T T T ) ) ) / / / l l l SR ( ( ( q q q) ) ) Transversality conditions. p x (T ) = q 0 (T )/x(T ), p 0 (T ) = -1/2

exp q 0 C = { p 0 | H 2 1 (q 0 , p 0 )+H 2 2 (q 0 , p 0 ) = 1 } IR × 0.5 1

Hn

Efficiency curve with continuation method on x(T ). Corresponding optimal stroke Theorem 6. The abnormal stroke is not minimizing for the two costs (length with fixed displacement and geometric efficiency).

• Local geometric study

Nilpotent model

ẋ = u 1 F1 + u 2 F2 , min T 0 (u 2 1 + u 2 2 ) dt
. Interior point of the triangle:

weigths x 1 , x 2 ← 1, x 3 ← 2 F1 = ∂ ∂ x 1 + x 2 (1 + Q(x 1 , x 2 )) ∂ ∂ x 3 , F2 = ∂ ∂ x 2 -x 1 (1 + Q(x 1 , x 2 )) ∂ ∂ x 3
=⇒ simple loops and limaçons families . Point on the edges and = vertices of the triangle: weghts x 1 , x 2 ← 1,

x 3 ← 3 F1 = ∂ ∂ x 1 + x 2 2 2 ∂ ∂ x 3 , F2 = ∂ ∂ x 2 .
metric : g = (1 + αx 2 ) 2 dx 1 + (1 + β x 1 + γx 2 ) 2 dx 2 . =⇒ eight strokes

  controls. (Right) Piecewise controls.

  Only simple loops doesn't have a conjugate point on ]0, T [: they are the only candidates for optimality.