# HMP-Coffee: A Hierarchical Multicriteria Model to Estimate the Profitability for Small Coffee Farming in Colombia

Leidy Casilimas, David Camilo Corrales, Mayra Solarte Montoya, Eric Rahn, Juan Carlos Corrales, Marie-Hélène Robin, Jean-Noël Aubertot, Juan Carlos Corrales

► To cite this version:

Leidy Casilimas, David Camilo Corrales, Mayra Solarte Montoya, Eric Rahn, Juan Carlos Corrales, et al.. HMP-Coffee: A Hierarchical Multicriteria Model to Estimate the Profitability for Small Coffee Farming in Colombia. Applied Sciences, 2021, 11 (15), 10.3390/app11156880. [https://doi.org/10.3322447](https://doi.org/10.3322447)

HAL Id: hal-03322447

https://hal.inrae.fr/hal-03322447

Submitted on 19 Aug 2021

HAL is a multi-disciplinary open access
archive for the deposit and dissemination of sci-
entific research documents, whether they are pub-
lished or not. The documents may come from
teaching and research institutions in France or
abroad, or from public or private research centers.

L'archive ouverte pluridisciplinaire HAL, est
destinée au dépôt et à la diffusion de documents
scientifiques de niveau recherche, publiés ou non,
émanant des établissements d'enseignement et de
recherche français ou étrangers, des laboratoires
publics ou privés.

<figure><img src="image_1.png" /></figure>

Distributed under a Creative Commons Attribution 4.0 International License
Article

# HMP-Coffee: A Hierarchical Multicriteria Model to Estimate the Profitability for Small Coffee Farming in Colombia

Leidy Casilimas<fnref n="1" />*, David Camilo Corrales <fnref n="1" />,<fnref n="2" />✉, Mayra Solarte Montoya<fnref n="1" />, Eric Rahn <fnref n="3" />✉, Marie-Hélène Robin<fnref n="2" />, Jean-Noël Aubertot<fnref n="2" /> and Juan Carlos Corrales <fnref n="1" />

<figure><img src="image_2.png" /></figure>

check for
updates

**Citation:** Casilimas, L.; Corrales, D.C.; Solarte Montoya, M.; Rahn, E.; Robin, M.-H.; Aubertot, J.-N.; Corrales, J.C. HMP-Coffee: A Hierarchical Multicriteria Model to Estimate the Profitability for Small Coffee Farming in Colombia. *Appl. Sci.* **2021**, *11*, 6880. https://doi.org/10.3390/app11156880

Academic Editor:
Alessandra Durazzo

Received: 6 April 2021
Accepted: 29 April 2021
Published: 27 July 2021

**Publisher's Note:** MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations.

<figure><img src="image_3.png" /></figure>

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

**Abstract:** Existing models to estimate profitability in small-scale coffee production are based on limited information leading to precision problems in the estimations and, therefore, fail to represent the real economic return. This leads smallholders to make decisions based on inaccurate information with negative consequences on their financial status. This paper introduces a novel hierarchical approach called HMP-Coffee (Hierarchical Model Profitability Coffee) to estimate the profitability level in small-scale coffee productions, supporting smallholders, in decision-making, to improve their income and, consequently, their economic sustainability. HMP-Coffee considers a Contextual Knowledge Phase, based on expert knowledge, to create a conceptual model about the profitability in small-scale coffee productions and a Hierarchical-Multicriteria Phase responsible for translating such a conceptual model into an understandable hierarchical qualitative model able to estimate the level of profitability in small coffee productions precisely. HMP-Coffee was developed by considering the La Sultana farm's operation in Cauca, Colombia and evaluated with independent data from the Costa Rican Coffee Institute. In the evaluation results, HMP-Coffee achieved 81.72% accuracy, 81.33% precision, 92.30% recall, and 83.46% F-Score. From the results obtained, we conclude that HMP-Coffee is a reliable model to estimate the profitability of small-scale coffee production. Its reliability improves the decision-making for obtaining crops with better economic sustainability.

**Keywords:** hierarchical multicriteria model; profitability; coffee crop; small coffee productions; economic sustainability

## 1. Introduction

Coffee production is a crucial economic activity in many developing countries [1]. For instance, coffee is the most important export agricultural product for the Colombian economy (in 2019, Colombian coffee generated more than 2.7 billion USD in annual incomings) [2]. However, the majority of small-scale coffee farmers (i.e., farmers with less than 5 hectares cultivated) continue to have difficulties making a decent living due to low coffee prices, high production costs, and climate variability among other factors [3]. Therefore, estimation of coffee profitability is essential for sustainable farming systems and the wider coffee industry; around 90% of coffee is produced by small holders in some countries such as Costa Rica and Colombia [4]. Furthermore, estimating profitability continues to be a research challenge due to a lack of adequate tools adapted to specific characteristics of small-scale crop production in developing countries. Small-scale coffee farms in developing countries do not have information systems with accurate data on their agricultural micro-economic activities [5]; the information is usually only accessible through detailed

<footnote n="1">¹ Departamento de Telemática, Universidad del Cauca, Popayán 190002, Cauca, Colombia; davidcamilo.corralesmunoz@inrae.fr (D.C.C.); mayrasolarte@unicauca.edu.co (M.S.M.); jcorral@unicauca.edu.co (J.C.C.)</footnote>

<footnote n="2">² INRAE-INPT-ENSAT-EI-Purpan, University of Toulouse, UMR 1248 AGIR, F-31326 Castanet Tolosan, France; mh.robin@purpan.fr (M.-H.R.); jean-noel.aubertot@inrae.fr (J.-N.A.)</footnote>

<footnote n="3">³ Centro Internacional de Agricultura Tropical (CIAT), Cali 763537, Valle del Cauca, Colombia; e.rahn@cgiar.org</footnote>

<footnote>* Correspondence: lkcasilimas@unicauca.edu.co</footnote>
interviews providing recall data of recent activities and related costs and returns. Furthermore, the omission of relevant information in estimating profitability results in values far from reality [6,7]. The omitted information are related to production costs (e.g., family labor, transportation or maintenance, and administration expenses) [7] and the lack of accounting records (e.g., balance sheet management, ledgers) [8]. Making decisions based on incorrect profitability values negatively impacts the livelihoods of millions of farmers and thereby restricts poverty alleviation.

There are several hierarchical multicriteria approaches described in the literature that have characterized the profitability of diverse cropping systems. For instance, De Salvo et al. [9] and Hawes et al. [10] characterize the profitability of various cropping systems by establishing hierarchical structures and relationships between criteria. However, these approaches are conceptual solutions and do not offer an implementation for testing. Other studies have introduced hierarchical structures-based solutions to estimate how different climatic, soil, and crop variables impact the profitability in several crops, ranging from rice to flowers [11–13]. Nevertheless, these solutions omit economic data such as production costs, production volume, and the international market. Furthermore, these solutions are not adapted to the context of coffee production systems. Milne et al. [14] and Cardozo et al. [15] propose multicriteria hierarchical approaches for estimating the profitability of several crops by considering climatic variables and output. It is noticeable that the scarce adoption of modern information management tools in small-scale coffee farms located in developing countries is a severe barrier to adopting data-driven agricultural economic solutions [16].

This paper proposes a non-data-driven and interpretable approach, called HMP-Coffee, to precisely estimate the level of profitability in small-scale coffee productions in developing countries. Besides, to the best of our knowledge, HMP-Coffee is the first approach that considers the three coffee profitability factors (production cost, production volume, and international market) defined by the International Coffee Organization (ICO) [17,18]. To achieve the non-data-driven characteristic, HMP-Coffee considers a Contextual Knowledge Phase, based on expert knowledge, that allows creating a conceptual model about the profitability in small-scale coffee productions. To accomplish interpretability, HMP-Coffee includes a Hierarchical-Multicriteria Phase that translates the conceptual model into a hierarchical qualitative model. This model can estimate the level of profitability in small coffee productions. Model development is based on the experiences gained from a Colombian coffee farm, named "La Sultana," and evaluated using data from the Costa Rican Coffee Institute (ICAFE). The dataset used in the case study contains actual information about the cost of coffee production, different production volume levels (High, Average, and Low), and the international market, mainly price and exchange rate. HMP-Coffee achieved 81.72% accuracy, 81.33% precision, 92.30% recall, and 83.46% F-Score in the evaluation results. From the obtained results, we conclude that HMP-Coffee is a promising solution for precisely estimating the level of profitability in small coffee productions in developing countries and supporting correct decision-making.

The remainder of the paper is organized as follows. Section 2 introduces the background and related work. Section 3 presents material and methods; Section 4 describes ICAFE study case, discussion, and practicability. Finally, Section 5 outlines the conclusions and future work.

## 2. Background and Related Work

This section includes the following parts. Section 2.1 presents the Hierarchical Multi-criteria Model (HMM) definition, its components, and features. Section 2.2 presents the scientific literature related to HMM for estimating the profitability in several crops and the gaps found for its application in small coffee farming in developing countries.
## 2.1. *Hierarchical Multicriteria Model*

HMM is a decision analysis method that evaluates options determining “the most appropriate option.” An HMM can be represented as the decomposition of a decision problem into smaller and less complex sub-problems. It is composed of attributes and utility functions [19]. In HMM, the Attributes represent variables that take values from a corresponding qualitative scale (e.g., “Favorable and Unfavorable”). There are three types: basic attributes (i.e., external variables), aggregate attributes (i.e., internal variables), and objective attributes (i.e., variables of study or interest); they are organized hierarchically into a tree of attributes. The utility functions are the rules that allow aggregating attributes by combining basic ones using a bottom up approach. HMMs are highly interpretable models due to the use of linguistic rules understandable to non-specialists [20,21]. Rules are often derived from expert knowledge, useful in contexts with a high level of expert or practical experience [22].

## 2.2. *Hierarchical Multicriteria Approaches*

Several hierarchical multicriteria approaches have characterized diverse crops' prof-
itability. De Salvo et al. [9] introduced a conceptual hierarchical approach to improve
the wine industry by assessing the impact of criteria related to climate, vineyard features,
winegrowers' characteristics, and management practices in winegrowers' profitability in
Eastern Europe. Hawes et al. [10] proposed a hierarchical approach, based on the Decision
Tree technique, for estimating the agroecological crop's profitability by combining produc-
tion risk (e.g., weather and pest and diseases risk) and potential profitability (e.g., gross
margins and direct subsidies) criteria.

Rising et al. [11] presented a hierarchical approach, based on Bayesian Networks, for assessing the impact of climatic criteria, such as temperature seasonality, annual precipitation, precipitation seasonality, and irrigation fraction, in several crops' profitability potential, including barley, soybeans, wheat, cotton, corn, and rice. Shakoor et al. [12] proposed a numerical-based hierarchical approach, which uses criteria related to climate and yield variables for predicting which crops (i.e., aus rice, aman rice, boro rice, potato, jute, and wheat) achieve the maximum profit in some Bangladesh's regions. Haaster et al. [13] introduced a hierarchical approach based on the Decision Tree technique, climate conditions, and market activities for predicting the timely sale time of Netherlands' flower crops.

Milne et al. [14] presented a hierarchical approach based on Multiple Objective Optimization to simulate fertilizer management's effect on United Kingdom's crops profitability calculated as the difference between income from yield and the costs associated with fertilizer and its application in the cultivation itself; the authors tested their approach in 20 crops, including potatoes, beets, and onions. Cardozo et al. [15] proposed a hierarchical approach for performing a multivariable analysis of climate (e.g., rainfall and region) and yield criteria (e.g., tons of cane per hectare and total recoverable sugars) for determining profitability in Brazil's sugarcane productions. It is noticeable that the scarce adoption of modern information management tools in small-scale coffee farms located in developing countries is a severe barrier to adopting data-driven agricultural economic solutions [16].

# 3. Material and Methods

This section includes the following parts. Section 3.1 describes the study area and the stakeholders involved in the construction of HMP-Coffee. Section 3.2 develops the model construction methodology.

## 3.1. *Study Area and Stakeholders*

HMP-Coffee model is based on the operation of the coffee farm "La Sultana", be-
longing to the Universidad del Cauca. The farm is located in Timbío, Cauca, Colombia
(2°22'28.51" N, 76°43'31.89" W), at 1700 m.a.s.l. with a total area of 13.5 hectares of which
4.9 ha are produce coffee [23–25]. In 2006, La Sultana migrated towards a sustainable coffee
production crop through an ecological processing system and by-products management. Besides, the production, management, and transformation of coffee are developed under good practices to produce quality coffee under environmental, social, and economic sustainability [26]. *La Sultana* meets three essential characteristics addressed by the HMP-Coffee model: (i) small-scale coffee production, (ii) incorporation of good practices, mainly to improve the economic sustainability; (iii) located at a developing country (Colombia; see Figure 1).

<figure><img src="image_4.png" /><figcaption>**Figure 1.** La Sultana Colombian Coffee Farm location (2°22'28.51" N, 76°43'31.89" W). Left map depicts the Colombian Departments and the right map the location of Colombia in South America. Image source [proyectomapamundi].</figcaption></figure>

Several stakeholders played a key role to construct the HMP-Coffee model. They contributed, with their knowledge, to define the input, aggregate, and output attributes of the model and the corresponding qualitative values. The stakeholder's team comprises six people from the agribusiness area. The role of each stakeholder is detailed in Table 1.

<table><caption>**Table 1.** The stakeholder's team involved in the HMP-Coffee conception. Stakeholder Id: identifier of the expert. Area of expertise: Academic training of the members of the expert panel. Years' experience: Number of years of experience working on topics associated with coffee. Experience: Work areas, and Organization: Academic and business organizations to which they belong.</caption><thead><tr><td>Stakeholder Id</td><td>Area of Expertise</td><td>Years' Experience</td><td>Experience</td><td>Organization</td></tr></thead><tbody><tr><td>1</td><td>Agro-industrial Economic Problems</td><td>28</td><td>The agro-industrial transformation and the economy coffee activity.</td><td>Public university</td></tr><tr><td>2</td><td>Agribusiness</td><td>10</td><td>Strategies for the production and commercialization of organic coffee in developing countries</td><td>Experimental coffee farm</td></tr><tr><td>3</td><td>Agricultural management</td><td>20</td><td>Implementation of sustainability strategies on the experimental farm “La Sultana” and sustainable coffee certifications (e.g., Rainforest Alliance)</td><td>Experimental coffee farm</td></tr></tbody></table>
<table><caption>Table 1. *Cont.*</caption><thead><tr><td>Stakeholder Id</td><td>Area of Expertise</td><td>Years' Experience</td><td>Experience</td><td>Organization</td></tr></thead><tbody><tr><td>4</td><td>Agronomy, soil and water</td><td>30</td><td>Estimating technical and economic indicators on the benefit of coffee, characterization of integral and productive farms, and organic coffee production.</td><td>Public university</td></tr><tr><td>5</td><td>Agronomy engineering</td><td>15</td><td>Optimization of coffee transformation processes, the harvest, and the post-harvest of quality coffee.</td><td>Private coffee entity</td></tr><tr><td>6</td><td>Farm management</td><td>18</td><td>Practices for the management and administration of coffee crops in small coffee crops.</td><td>Coffee regulatory entity</td></tr></tbody></table>

## 3.2. HMP-Coffee Model

Next, we present the HMP-Coffee model, an approach useful to estimate the profitability level in small coffee productions. Our model includes two phases: (i) Contextual Knowledge Phase (CKP) to create a conceptual model about the profitability in small-scale coffee production; (ii) Hierarchical-Multicriteria Phase (HMP) to translate the conceptual model into an understandable and runnable hierarchical qualitative model able to estimate the level of profitability in small coffee productions [27]. HMP-Coffee involves the following stakeholders: the agricultural economics expert, the knowledge engineer, and the decision-maker farmer. The agricultural economics expert intervenes in the fine granularity, the definition of scales, weighs, and rules steps to structuring the conceptual model. The knowledge engineer executes the coarse granularity step and hierarchical multicriteria model implementation. Finally, the decision-maker (e.g., smallholder) sets up HMP-Coffee by providing the model input data (e.g., investment in fertilizers, time spent on crop care activities, and coffee production volume) and gets from it the estimation of level of profitability (i.e., Favorable, Average, Unfavorable). Based on this estimation, the smallholder could make decisions on the crop, changing the behavior of the input data for improving the coffee profitability level. The two phases are presented in Figure 2.

<figure><img src="image_5.png" /><figcaption>**Figure 2.** Conceptual process to build the HMP-Coffee model. Phase 1: Contextual knowledge; Phase 2: Hierarchical-Multicriteria.</figcaption></figure>
### 3.2.1. Contextual Knowledge Phase

Key aspects related to profitability in small-scale coffee crops are gathered from different knowledge sources (e.g., scientific papers, technical reports, and human beings). From those aspects, a conceptual hierarchical model is proposed. In order to build up the conceptual hierarchical model, we used a multi-level granularity analysis useful for knowledge discovery from a global to a specific perspective [28]. The multi-level granularity analysis involves two steps: the coarse granularity and the fine granularity.

In the **Coarse Granularity step**, we performed a brainstorming about concepts related to "profitability in small coffee productions." This step included three activities: *Literature review* to identify available documentation regarding profitability in small coffee production, *Textual analysis* to extract the frequency of different concepts from the documents, and *Iterative conceptualization* to identify the relevant concepts on the analyzed information [29].

Documentary selection: to cover the relevant aspects of the estimation of profitability in small coffee productions, three query strings were defined: "Small-scale Coffee Production" (SCP), "Economic Coffee Profitability" (ECP), and "Small-scale Coffee Profitability" (SCPR). Query strings were used as search keys on scientific databases (i.e., SCOPUS, Science Direct, and Google Scholar), and official pages concerning the coffee activity, such as ICO [17], Coffee Institute of Costa Rica (ICAFE) [30], and Caravela Coffee [31].

Figure 3 shows the retrieved documents (45) resulting from the documentary selection activity, including 19 technical reports, 19 scientific papers, and 7 grey literature documents. SCP focused on small coffee production documents, with 20 results: 8 technical reports, 10 scientific papers, and 2 grey literature documents. ECP focused on the documents related to economic profitability variables for coffee production, with 15 results: 7 technical reports, 5 scientific papers, and 3 grey literature documents. Finally, SCPR focused on documents related to profitability and small-scale coffee crops, with 10 results: 4 technical reports, 4 scientific papers, and 2 grey literature documents.

<figure><img src="image_6.png" /><figcaption>**Figure 3.** The x-axis represents the query strings: Small-scale Coffee Production (SCP), Economic Coffee Profitability (ECP), and Small-scale Coffee Profitability (SCPR). The y-axis represents the number of documents retrieved the colors blue, black, and green represent technical reports, scientific papers and grey literature. The documents retrieved are shown by the query strings, quantity, and type of document.</figcaption></figure>

*Textual analysis:* The "Frequency Words" statistical method is used for textual analysis activity [32]. The method identifies the frequency of concepts in written information [29]. Figure 4 describes the process performed in the textual analysis using the R-statistics tool version 1.2 [33]. Frequency Words technique involves the identification of the iterative
concepts about a group of documents (i.e., the 45 documents collected), the elimination of redundant words or "Stop Words" (e.g., articles, pronouns, and prepositions), and the selection of the more frequent concepts. As a result, the activity provides around 40 most frequent words in 45 analyzed documents.

<figure><img src="image_7.png" /><figcaption>**Figure 4.** The process of text analysis. 1. Flowchart on the left: shows the general process steps: "Remove stop words" and "Frequency Words" to identify a list of concepts by the query string. 2. Flowchart on the right: shows the result for the HMP-Coffee model.</figcaption></figure>

**Iterative conceptualization:** the most frequent concepts were mapped by query string in a Venn diagram as shown in Figure 5. Subsequently, the words located in the overlapping regions were selected (words in bold depicted in Figure 5). Accordingly, 24 words were identified during the brainstorming, including concepts such as **workforce** belonging to SCP and EPC query strings; **labor** belongs to EPC and SCPR query strings; **chemical** belongs to SCPR and SCP query string, and **harvest** belongs to the three query strings.

<figure><img src="image_8.png" /><figcaption>**Figure 5.** Venn diagram of the identified concepts. The colors blue, grey, and green represent the regions by query strings Small-scale Coffee Production (SCP), Economic Coffee Profitability (ECP), and Small-scale Coffee Profitability (SCPR) region 25 words. The 24 words located in the overlap regions are selected as HMP-Coffee brainstorming (words in bold).</figcaption></figure>

Furthermore, Table 2 presents the selected concepts. For each concept is defined: id, name, description, and frequency.
<table><caption>**Table 2.** HMP-Coffee concepts list. The id column contains an identifier by the concept. The concept column includes the 24 HMP-Coffee brainstorming terms, the description column includes the meaning of the concept in coffee production context and frequency column, the number of occurrences by the concept.</caption><thead><tr><th>Id</th><th>Concept</th><th>Description</th><th>Frequency</th></tr></thead><tbody><tr><td>t1</td><td>Fertilization time</td><td>Time spent in fertilizing the crop.</td><td>80</td></tr><tr><td>t2</td><td>Renovation time</td><td>Time invested in the renewal of the crop.</td><td>70</td></tr><tr><td>t3</td><td>Control time (Weed/Pest and diseases)</td><td>Time spent controlling weeds/pests and diseases in the crop.</td><td>34</td></tr><tr><td>t4</td><td>Workforce</td><td>Average cost of wage.</td><td>190</td></tr><tr><td>t5</td><td>Chemical fertilizers</td><td>Inputs for chemical fertilization.</td><td>220</td></tr><tr><td>t6</td><td>Organic fertilizers</td><td>Inputs for Organic fertilization.</td><td>153</td></tr><tr><td>t7</td><td>Weeds supplies</td><td>Inputs for chemical control by patches with the weed selector, control with machete or scythe.</td><td>40</td></tr><tr><td>t8</td><td>Renovation supplies</td><td>Inputs for renewal of the crop.</td><td>32</td></tr><tr><td>t9</td><td>Maintenance</td><td>Facilities maintenance expenses.</td><td>124</td></tr><tr><td>t10</td><td>Transportation</td><td>Transportation of supplies and coffee.</td><td>27</td></tr><tr><td>t11</td><td>Picking</td><td>Payment for coffee harvesting by kilograms, bushel, among other measures.</td><td>87</td></tr><tr><td>t12</td><td>Implements</td><td>Provision of coffee pickers (e.g., Basket, gloves, etc.)</td><td>13</td></tr><tr><td>t13</td><td>Benefit</td><td>Coffee benefit process.</td><td>34</td></tr><tr><td>t14</td><td>Threshing</td><td>Coffee Threshing process</td><td>18</td></tr><tr><td>t15</td><td>Exchange rate</td><td>The ratio of one currency (e.g., COP, CRC) to another (e.g., USD).</td><td>45</td></tr><tr><td>t16</td><td>NY stock</td><td>Coffee price in the New York stock.</td><td>16</td></tr><tr><td>t17</td><td>Volume</td><td>The volume of the harvest in @/ha.</td><td>72</td></tr><tr><td>t18</td><td>Time</td><td>The general term that refers to the investment of time in caring for the crop.</td><td>28</td></tr><tr><td>t19</td><td>Labor</td><td>All aspects related to the work of the crop, including the time labor, the price by wage, etc.</td><td>54</td></tr><tr><td>t20</td><td>Supply</td><td>All supplies used in crop care work.</td><td>99</td></tr><tr><td>t21</td><td>Management</td><td>Farm management costs, including payments for services, maintenance, among others.</td><td>42</td></tr><tr><td>t22</td><td>Harvest</td><td>All aspects related to harvest, including picking, provision of coffee pickers, among others.</td><td>90</td></tr><tr><td>t23</td><td>Crop care</td><td>All aspects related to crop care, including inputs, payment of wages, pests, and disease control, among others.</td><td>19</td></tr><tr><td>t24</td><td>Fertilization</td><td>Fertilization activity, including organic and chemical fertilization.</td><td>99</td></tr></tbody></table>

**In the fine granularity step**, we used the concepts obtained from brainstorming to create an HMP-Coffee conceptual hierarchical model following two activities: *Relationship Analysis* to identify relationships among concepts and *Model Structuration* to organize the information in a hierarchical structure.

**Relationship Analysis:** In order to define the levels of relationship and generality between the brainstorming concepts and profitability, we applied the Repertory Grid technique. This technique places a concepts group in the rows and columns, and uses experts' opinions to assign the score to the cell representing the relationship/generality [34]. For building up HMP-Coffee, we created two grids as follows:

The first grid determines the relationship between profitability (i.e., objective variable—ov) and each brainstorming concept. The grid's rows contain the 24 concepts, and the columns include three variables, namely Production Cost, Production Volume, and Market (renamed as "global variables—gv1, gv2, gv3"). We defined these global variables by adopting the formal definition of profitability, proposed by the ICO and the Colombian National Federation of Coffee Growers (FNC) [18,35], which calculates profitability as the difference between incomes (associated with Production Volume and Market) and the investment (associated with the Production Cost) [18]. Each cell of Grid 1 on Table 3 contains the expert panel's average score to the corresponding relationship. Each expert provided scores on a 1 to 4 scale, where (1) No direct relation, (2) Low relation, (3) Medium relation, and (4) High relation. In Grid 1, the green cells highlight the most
related global variable for each brainstorming concept (e.g., t1 has the highest relation to Production Cost).

<table><caption>**Table 3.** HMP-Coffee Summary Grid. Grid 1 analyzes the relationship Level: rows contain the HMP-Coffee brainstorming concepts and columns include the global concepts Production Cost, Market and Production volume. Grid 2 analyzes the generality Level: rows contain the HMP-Coffee brainstorming concepts and columns include generality levels: Very High Generality(vhg), High Generality(hg), Medium Generality (mg) and Specific(s). Cells represent the values assigned by experts to the relationships between columns and rows. Furthermore, the explainable name column contains new names by the 24 concepts.</caption><thead><tr><th rowspan="2">ID</th><th rowspan="2">Concept</th><th rowspan="2">Explainable Names</th><th colspan="3">Grid 1<br>Relationship Level</th><th colspan="4">Grid 2<br>Generality Level</th></tr><tr><th>gv1</th><th>gv2</th><th>gv3</th><th>vhg</th><th>hg</th><th>mg</th><th>s</th></tr></thead><tbody><tr><td>t1</td><td>Fertilization time</td><td>Time spent on fertilization</td><td>3.4</td><td>2.8</td><td>1.6</td><td>3.4</td><td>2.8</td><td>2.8</td><td>3.8</td></tr><tr><td>t2</td><td>Renovation time</td><td>Time spent on renovation</td><td>3.2</td><td>2.6</td><td>2</td><td>2.6</td><td>3.4</td><td>3.4</td><td>4</td></tr><tr><td>t3</td><td>Control time<br>(Weed/Pest and diseases)</td><td>Time spent on Weed/Pest and diseases control</td><td>3.2</td><td>2</td><td>2.4</td><td>2</td><td>2.6</td><td>2.6</td><td>4</td></tr><tr><td>t4</td><td>Workforce</td><td>Price of workforce</td><td>3.8</td><td>1.6</td><td>2</td><td>1.6</td><td>3</td><td>3.2</td><td>3.4</td></tr><tr><td>t5</td><td>Chemical fertilizers</td><td>Investment in chemical fertilizers</td><td>3.2</td><td>1.6</td><td>3</td><td>2</td><td>2.8</td><td>3</td><td>3.4</td></tr><tr><td>t6</td><td>Organic fertilizers</td><td>Investment in organic fertilizers</td><td>3.4</td><td>2</td><td>1.6</td><td>1.6</td><td>2.6</td><td>2.8</td><td>3.2</td></tr><tr><td>t7</td><td>Weeds supplies</td><td>Investment in weeds supplies</td><td>3.2</td><td>2.8</td><td>2</td><td>3.4</td><td>2</td><td>3.4</td><td>2.8</td></tr><tr><td>t8</td><td>Renovation supplies</td><td>Investment in renovation supplies</td><td>3.4</td><td>3.4</td><td>2</td><td>2.6</td><td>2.8</td><td>2.6</td><td>3.4</td></tr><tr><td>t9</td><td>Maintenance</td><td>Investment in Maintenance</td><td>3.2</td><td>2.6</td><td>2.8</td><td>2</td><td>3.4</td><td>3.6</td><td>3.8</td></tr><tr><td>t10</td><td>Transportation</td><td>Transportation expenses</td><td>3.8</td><td>2</td><td>3.4</td><td>1.6</td><td>2.6</td><td>2.8</td><td>3.2</td></tr><tr><td>t11</td><td>Picking</td><td>Payment for coffee harvesting</td><td>3.4</td><td>1.6</td><td>2.4</td><td>3</td><td>2</td><td>3.4</td><td>3</td></tr><tr><td>t12</td><td>Implements</td><td>Implements for coffee pickers</td><td>2.6</td><td>2</td><td>2</td><td>2</td><td>3.4</td><td>2.6</td><td>2.8</td></tr><tr><td>t13</td><td>Benefit</td><td>Investment in benefice coffee process</td><td>2.6</td><td>1.6</td><td>3</td><td>2</td><td>2.6</td><td>2</td><td>2.4</td></tr><tr><td>t14</td><td>Thresh</td><td>Investment in thresh coffee process</td><td>3</td><td>2.6</td><td>1.2</td><td>1.6</td><td>2</td><td>1.6</td><td>2.6</td></tr><tr><td>t15</td><td>Exchange rate</td><td>Variation in the USD dollar price</td><td>2</td><td>2.6</td><td>3.8</td><td>2</td><td>1.6</td><td>2</td><td>2.6</td></tr><tr><td>t16</td><td>NY stock exchange</td><td>The coffee price in the New York Stock Exchange</td><td>3</td><td>2.6</td><td>3.4</td><td>3.2</td><td>2.6</td><td>2</td><td>3.4</td></tr><tr><td>t17</td><td>Volume</td><td>Coffee production volume</td><td>1.6</td><td>4</td><td>2</td><td>2</td><td>1.6</td><td>2.6</td><td>2.8</td></tr><tr><td>t18</td><td>Time</td><td>Execution time in crop activities</td><td>1.6</td><td>2</td><td>1.6</td><td>1.6</td><td>2.6</td><td>3.4</td><td>2</td></tr><tr><td>t19</td><td>Labor</td><td>Labor of the crop</td><td>2</td><td>2</td><td>2</td><td>2</td><td>3.8</td><td>3</td><td>2.6</td></tr><tr><td>t20</td><td>Supply</td><td>Investment on supplies</td><td>2.8</td><td>1.6</td><td>1.6</td><td>3</td><td>3.4</td><td>2.8</td><td>2</td></tr><tr><td>t21</td><td>Management</td><td>Management expenses</td><td>3.4</td><td>2</td><td>2.6</td><td>3.4</td><td>2.8</td><td>3</td><td>2.6</td></tr><tr><td>t22</td><td>Harvest</td><td>Investment in harvest time</td><td>2.6</td><td>2.8</td><td>2.6</td><td>3.8</td><td>3.4</td><td>2.6</td><td>2</td></tr><tr><td>t23</td><td>Care</td><td>Investment in crop care activities</td><td>2</td><td>2.6</td><td>2</td><td>3.8</td><td>2.6</td><td>2</td><td>3.4</td></tr><tr><td>t24</td><td>Fertilization</td><td>Investment in fertilization activities</td><td>3</td><td>2.8</td><td>1.6</td><td>2.8</td><td>3</td><td>3.4</td><td>2</td></tr></tbody></table>

The second grid determines each brainstorming concept's generality level regarding profitability. The grid rows contain the 24 concepts from the brainstorming, and the columns include four generality levels, namely Very High Generality (vhg), High Generality (hg), Medium Generality (mg), and Specific (s). Each cell of Grid 2 on Table 3 contains the average score assigned by the expert's panel (Table 1) to the corresponding generality level. Each expert provided scores on a 1 to 4 scale, where (1) No direct relation, (2) Low relation, (3) Medium relation and (4) High relation. In Grid 2, the blue cells highlight the most weighted generality level for each brainstorm concept (e.g., t1 achieves the lowest generality—Level 6_Specific). Table 3 contains the results of Grid 1- Relationship Level and the Grid 2 Generality Level. Furthermore, to improve the understanding of the HMP-Coffee, we proposed explainable names by the 24 concepts. In this sense, we will use these new names to refer to each of the 24 concepts from this point to the end.

**Model Structure:** Once identified the relationship (green cells in Table 3) and generality (blue cells in Table 3), we structure the hierarchical model (see Figure 6).
<figure><img src="image_9.png" /><figcaption>**Figure 6.** HMP-Coffee conceptual model. Level 1 contains the output variable profitability (vo). Level 2 the global variable production cost (gv1), production volume (gv2) and market (gv3); level 3,4,5 contain 10 aggregate attributes: management expenses (t21), investment in harvest time (t22), investment in crop care activities (t23), labor of the crop (t19), investment on supplies (t20), execution time in crop activities (t18), investment in fertilization activities (24); level 6 includes 17 basic attributes: time spent on fertilization (t1), time spent on renovation (t2), time spent on weed/pest and diseases control (t3), price of the workforce (t4), investment in chemical fertilizers (t5), investment in organic fertilizers (t6), investment in weeds supplies(t7), investment in renovation supplies (t8), investment in maintenance (t9), transportation expenses (t10), payment for coffee harvesting(t11), implements for coffee pickers (12), investment in benefice coffee process (t13), investment in thresh coffee process (t14), variation in the USD price (t15) and New York stock coffee price (t16), and coffee production volume (t17).</figcaption></figure>

By levels (generality):

* Level 1 (Output variable) includes profitability (vo).

* Level 2 (Global variables) contains production cost (gv1), production volume (gv2), and market (gv3).

* Level 3 (Very High Generality) contains management expenses (t21), investment in harvest time (t22), and investment in crop care activities (t23)

* Level 4 (High Generality) contains labor of the crop (t19), and investment on supplies (t20).

* Level 5 (Medium Generality) contains execution time in crop activities (t18), investment in fertilization activities (24).

* Level 6 (Specific) contains time spent on fertilization (t1), time spent on renovation (t2), time spent on Weed/Pest and diseases control (t3), price of the workforce (t4),
investment in chemical fertilizers (t5), investment in organic fertilizers (t6), investment in weeds supplies(t7), investment in renovation supplies (t8), investment in maintenance (t9), transportation expenses (t10), payment for coffee harvesting(t11), implements for coffee pickers (12), investment in benefice coffee process (t13), investment in thresh coffee process (t14), variation in the USD price (t15) and the coffee price in the New York Stock Exchange (t16), and coffee production volume (t17).

By relationship:

* **Profitability** is related to production cost (gv1), production volume (gv2), and market (gv3).

* **Production Cost** has association with 20 concepts: time spent on fertilization (t1)/level 6, time spent on renovation (t2)/level 6, time spent on weed/pest and diseases control (t3)/level 6, price of workforce (t4)/level 6, investment in chemical fertilizers (t5)/level 6, investment in organic supplies (t6)/level 6, investment in weeding supplies(t7)/level 6, investment in renovation supplies (t8)/level 6, investment in maintenance (t9)/level 6, transportation expenses (t10)/level 6, payment for coffee harvesting(t11)/level 6, implements for coffee pickers (t12)/level 6, investment in postharvest processing (t13)/level 6, investment in thresh coffee process (t14)/level 6, execution time in crop activities (t18)/level 5, labor of the crop (t19)/level 4, investment on supplies (t20)/level 4, management expenses (t21)/level 3, investment in harvest time (t22)/level 3, investment in crop care activities (t23)/level 3, and investment in fertilization activities (t24)/level 5.

* **Production volume** has a relationship with the concept coffee production volume (t17)/level 6.

* **Market** has association with two concepts: variation in the USD price (t15)/level 6 and the coffee price in the New York Stock Exchange (t16)/level 6.

Figure 6 presents the hierarchical conceptual HMP-Coffee model obtained by the Contextual Knowledge Phase.

### 3.2.2. Hierarchical-Multicriteria Phase

To convert the conceptual model into a profitability estimation model, we used the qualitative multi-criteria decision analysis tool called DEX (Decision Expert) [36]. DEX breaks a complex decision problem into smaller, and less complicated, sub-problems and organizes them hierarchically into a Decision Tree. Consequently, DEX provides high interpretability to the model. The construction of the hierarchical multi-criteria phase based on DEX comprises the attributes, scales, weights definition, and rules generation [36].

**The scale definition** represents different impact levels for each basic attribute of the HMP-Coffee model. For scaling definition, we assigned ordinal values to each basic attribute of the model based on the experts' knowledge. The assignment of qualitative values reflects how much the attribute affects the level of profitability. For instance, "Investment in harvest time" is represented using three-scale values (**High**, **Average**, and **Low**) and "Profitability" (**Favorable**, **Average**, and **Unfavorable**). The red qualitative values have a negative connotation, and the green ones have a positive connotation on profitability. In this regard, an "Investment in harvest time" **High** contributes to **Unfavorable** profitability, and an "Investment in harvest time" **Low** contributes to **Favorable** profitability. It is important to note that the attribute scale values are independent of the local context. For instance, HMP-Coffee defines three-scale values for the "Transportation" basic attribute (**High**, **Average**, and **Low**) anywhere in the world. In contrast, the meaning of the scale values or ranges can be different between countries, and even regions, of the same country. For example, 10 dollars can be **High** for "Transportation," in Colombia while they can be **Average** in Brazil.

Table 4 presents the qualitative scales defined by the panel of experts to HPM-Coffee (grey cells) and the meaning by qualitative value (i.e., ranges) determined by a group of local coffee growers (white cells). In this case, the coffee growers work for the Cafiambiente Association. Particularly, for defining the levels of profitability (i.e., vo, variable objective),
the experts considered Pr, given by Equation (1) [37], and Maslow's hierarchy of needs [38]. They agreed to classify the profitability as follows. Unfavorable (Pr ≤ 1), smallholders cannot meet their physiological needs. Average (1 < Pr ≤ 1.4), the smallholder gets enough profit for meeting physiological needs. Favorable (Pr > 1.4), the small-coffee production generates incomes that allow meeting safety needs. The table columns contain the Id and the basic attribute names, the qualitative scale names (e.g., Low time, Average time and High time) and the unit of measure of the quantitative ranges (e.g., hours, Costa Rica Colon (CRC), USD, Bushel per Hectare (Bsh/ha)).

$$ Pr = \frac{Income}{Investment} = \frac{Income \ from \ coffee \ sales}{Production \ costs} \qquad (1) $$

<table><caption>**Table 4.** Scales definition for the set of HPM-Coffee basic attributes. Grey cells: qualitative scales defined by the panel of experts to HPM-Coffee. White cells: meaning by qualitative value (i.e., ranges) determined by a group of local coffee growers with the respective unit.</caption><thead><tr><th rowspan="2">Id</th><th rowspan="2">Basic Attributes</th><th colspan="3">Qualitative Scale</th><th rowspan="2">Unit</th></tr><tr><th>Low time</th><th>Average time</th><th>High time</th></tr></thead><tbody><tr><td>t1</td><td>Time spent on fertilization</td><td>&lt;98.7</td><td>98.7-99.25</td><td>99.25-99.8</td><td rowspan="3">Hours</td></tr><tr><td>t2</td><td>Time spent on renovation</td><td>&lt;6.8</td><td>6.8-8.6</td><td>8.6-10.4</td></tr><tr><td>t3</td><td>Time spent on weed/pest and diseases control</td><td>&lt;129.4</td><td>129.4-143.2</td><td>143.2-157</td></tr><tr><td></td><td></td><th>Cheap</th><th>Average</th><th>Expensive</th><td></td></tr><tr><td>t4</td><td>Price of workforce</td><td>680.24-895.93</td><td>895.93-1111.62</td><td>1111.62-1327.31</td><td>CRC</td></tr><tr><td></td><td></td><th>Low cost</th><th>Moderate cost</th><th>High cost</th><td></td></tr><tr><td>t5</td><td>Chemical fertilizers</td><td>4597.43-6500</td><td>6500-9500</td><td>8817.09-11630.21</td><td rowspan="4">CRC</td></tr><tr><td>t6</td><td>Organic fertilizers</td><td>1321.56-1793.25</td><td>1793.25-2736.63</td><td>2736.63-3308.32</td></tr><tr><td>t7</td><td>Weeds supplies</td><td>1089-1569.87</td><td>1569.87-2050.14</td><td>2050.14-2530.71</td></tr><tr><td>t8</td><td>Renovation supplies</td><td>377.917-844.197</td><td>844.197-1310.47</td><td>1310.47-1776.746</td></tr><tr><td></td><td></td><th>Low expenses</th><th>Moderate expenses</th><th>High expenses</th><td></td></tr><tr><td>t9</td><td>Maintenance</td><td>5060.26-6976.353</td><td>6976.353-8892.447</td><td>8892.447-10808.54</td><td rowspan="2">CRC</td></tr><tr><td>t10</td><td>Transportation expenses</td><td>459.916-1063.037</td><td>1063.037-2269.279</td><td>2269.279-2872.4</td></tr><tr><td></td><td></td><th>Cheap</th><th>Average</th><th>Expensive</th><td></td></tr><tr><td>t11</td><td>Payment for coffee harvesting</td><td>13609.39-16802.9</td><td>16802.9-19996.41</td><td>19996.41-23189.92</td><td>CRC</td></tr><tr><td></td><td></td><th>Low investment</th><th>Moderate investment</th><th>High investment</th><td></td></tr><tr><td>t12</td><td>Implements for coffee pickers</td><td>65.25-&lt;86</td><td>86-87</td><td>&gt;87-107.049</td><td rowspan="3">CRC</td></tr><tr><td>t13</td><td>Benefice coffee process</td><td>5512.327-6895.7711</td><td>6895.7711-8279.05</td><td>8279.05-9662.389</td></tr><tr><td>t14</td><td>Thresh coffee process</td><td>2000.828-2446.986</td><td>2446.986-2893.145</td><td>2893.145-3339.303</td></tr><tr><td></td><td></td><th>Favorable</th><th>Moderate</th><th>Unfavorable</th><td></td></tr><tr><td>t15</td><td>USD price</td><td>557.303-585.65</td><td>528.957-557.303</td><td>500.61-528.957</td><td rowspan="3">USD</td></tr><tr><td>t16</td><td>The coffee price in the New York Stock Exchange</td><td>183.07-255.16</td><td>147.025-183.07</td><td>110.98-147.025</td></tr><tr><td></td><td></td><th>High production</th><th>Average production</th><th>Low production</th></tr><tr><td>t17</td><td>Coffee production volume</td><td>&le;24.4</td><td>&gt;24.4-&lt;37.4</td><td>&ge;37.4</td><td>Bsh/ha</td></tr><tr><td></td><td></td><th>Favorable</th><th>Average</th><th>Unfavorable</th><td></td></tr><tr><td>vo</td><td>Level of profitability</td><td>&ge;1.4</td><td>1 &le; Pr &lt; 1.4</td><td>&le;1</td><td></td></tr></tbody></table>

**The weights definition** determines the attributes' relevance regarding profitability. The weights were defined based on real values obtained from the "La Sultana" farm, including cost of supplies, crop management activities, harvesting, administrative expenses, coffee processing, transformation process, and profit. It is noteworthy that "La Sultana"
encompasses the economic model of ten small coffee farms of the Cafiambiente Associa-
tion [39]. The association operates under the Principles and Criteria of the Standard for
Sustainable Agriculture RAS [40], promoting healthy practices to achieve sustainability in
small coffee crops.

In particular, we defined the weight for each basic and aggregate attribute (in total 23 attributes) by calculating the corresponding average relevance (i.e., a partial percentage) concerning total profitability (i.e., total percentage of 100%). For instance, in the period 2010–2019, the average investment in payment for coffee harvesting (i.e., basic attribute t11) was USD 4.250 per year. This value represented 99% of the total investment in the harvest (i.e., aggregate attribute t22) and 33% of the total production cost (i.e., a global variable gv1). The production cost impacted 60% of the total profitability (i.e., objective variable vo). Table 5 summarizes the weights for all basic and aggregate attributes. Note as the sum of the weights is 100% within each aggregate attribute. The sum of the aggregate attributes’ weights is 100% to obtain the objective variable.

<table><caption>**Table 5.** Weights defined for the set of HPM-Coffee attributes. The Attribute column contains the basic attributes, aggregate attributes, and output variable. The Weight column includes five weights levels for attributes of the HMP-coffee model.</caption><thead><tr><th rowspan="2">Attribute</th><th colspan="5">Weight-Based La Sultana Farm's Operation</th></tr><tr><th>Weight 1</th><th>Weight 2</th><th>Weight 3</th><th>Weight 4</th><th>Weight 5</th></tr></thead><tbody><tr><td>vo: Crop's final profitability level</td><td></td><td></td><td></td><td></td><td>=100%</td></tr><tr><td>gv1: Production Costs</td><td></td><td></td><td></td><td></td><td>40%</td></tr><tr><td>t19: Labor of the crop</td><td></td><td></td><td></td><td>42.60%</td><td></td></tr><tr><td>t23: Investment in crop care activities</td><td></td><td></td><td>56%</td><td></td><td></td></tr><tr><td>t18: Execution time in crop activities</td><td></td><td>70%</td><td></td><td></td><td></td></tr><tr><td>t1: Time spent on fertilization</td><td>25%</td><td></td><td></td><td></td><td></td></tr><tr><td>t2: Time spent on renovation</td><td>56%</td><td></td><td></td><td></td><td></td></tr><tr><td>t3: Time spent on weed/pest and diseases control</td><td>18%</td><td></td><td></td><td></td><td></td></tr><tr><td>t4: Price of workforce</td><td></td><td>30%</td><td></td><td></td><td></td></tr><tr><td>t20: Investment on Supplies</td><td></td><td></td><td>44%</td><td></td><td></td></tr><tr><td>t24: Investment in fertilization activities</td><td></td><td>79.83%</td><td></td><td></td><td></td></tr><tr><td>t5: Chemical fertilizers</td><td>21%</td><td></td><td></td><td></td><td></td></tr><tr><td>t6: Organic fertilizers</td><td>79%</td><td></td><td></td><td></td><td></td></tr><tr><td>t7: Weeds supplies</td><td></td><td>13%</td><td></td><td></td><td></td></tr><tr><td>t8: Renovation supplies</td><td></td><td>7.13%</td><td></td><td></td><td></td></tr><tr><td>t22: Management expenses</td><td></td><td></td><td></td><td>15.80%</td><td></td></tr><tr><td>t9: Maintenance</td><td></td><td></td><td>71%</td><td></td><td></td></tr><tr><td>t10: Transportation expenses</td><td></td><td></td><td>29%</td><td></td><td></td></tr><tr><td>t22: Investment in harvest time</td><td></td><td></td><td></td><td>32.84%</td><td></td></tr><tr><td>t11: Payment for coffee harvesting</td><td></td><td></td><td>99%</td><td></td><td></td></tr><tr><td>t12: Implements for coffee pickers</td><td></td><td></td><td>1%</td><td></td><td></td></tr><tr><td>t13: Benefice coffee process</td><td></td><td></td><td></td><td>5.03%</td><td></td></tr><tr><td>t14: Thresh coffee process</td><td></td><td></td><td></td><td>3.05%</td><td></td></tr><tr><td>gv2: Production Volume</td><td></td><td></td><td></td><td></td><td>40%</td></tr><tr><td>t17: Coffee volume production</td><td></td><td></td><td></td><td></td><td>20%</td></tr><tr><td>gv3: International Market</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>t15: USD price</td><td></td><td></td><td></td><td>50%</td><td></td></tr><tr><td>t16: The coffee price in the New York Stock Exchange</td><td></td><td></td><td></td><td>50%</td><td></td></tr></tbody></table>

In the rule's generation step, we used the concepts of utility functions and weights supplied by DEXI [19]. The utility functions *f* define decision-making rules by combining scale values of basic attributes X₁, X₂, ..., Xₙ to obtain the qualitative value of the aggregate attributes (See Equation (2)). The weights w₁, w₂, ..., wₙ (i.e., from the weight definition step allow defining the value of the utility functions *f* by setting the corresponding attribute's contribution to the final result *f* (See Equation (3)).

$$f: X_1 = \text{value}_1 \text{ and } X_2 = \text{value}_2 \text{ and } \dots \text{ and } X_n = \text{Value}_n \text{ then } Y = \text{Value}_n \quad (2)$$
$$f(X_1, X_2, \dots, X_n) = (w_1X_1) \text{ and } (w_2X_2) \text{ and } (w_nX_n) \quad (3)$$

DEXI represents utility functions in an attribute table where each row indicates a function f for one combination of the scale values of basic attributes [36]. In the generation of rules for the HMP-Coffee model, we obtained 10 attribute tables and 93 IF-THEN rules. As an example, for the “labor of the crop” rule, the basic attribute X1 = “Execution time in crop activities” must be filled in the corresponding attribute table as **High**, **Average**, or **Low** and X2 = “Price of workforce” as **Expensive**, **Average**, or **Cheap**. In turn, the aggregate attribute Y = “labor of the crop” must be recorded as **High**, **Normal**, or **Low**. Once the decision-maker fills up all attributes, the model can estimate the level of profitability. All tables developed for HMP-Coffee are in Supplementary Materials available our GitHub repository [41].

## 4. Analysis and Results

This section includes the following parts. Sections 4.1 and 4.2 present the ICAFE study of HMP-Coffee, including results, analysis, and final remarks. Section 4.3 illustrates the practicability of our approach.

### 4.1. The ICAFE Study Case

The present section reports the results of the HMP-Coffee model for profitability variable (classes: **Favorable**, **Average**, and **Unfavorable**). We evaluated the HMP-Coffee model through a dataset provided by ICAFE [30]. We used the ICAFE dataset since according to ICO, the coffee economic structure is similar in Costa Rica and Colombia. For instance, in 2017, the coffee production cost in Costa Rica was 1956.36 [USD/ha], while in Colombia, 1874.85 [USD/ha]. Besides, in Costa Rica and Colombia, around 90% of coffee activity corresponds to smallholders [42]. The dataset comprises 405 instances with 17 attributes (15 concerning production cost, one related to the international market, and another to the production volume). ICAFE dataset is available at the GitHub repository [43].

We evaluated the performance of the HMP-Coffee model regarding the metrics associated with the confusion matrix. The corresponding results are shown in Table 6. The key diagonal (i.e., green cells) shows the correctly classified cases, whereas the other cells indicate the number of misclassifications. Class 1 has 362 instances: 31 were misclassified as Class 2 and 331 were correctly classified. Class 2 has 27 classified successfully without any misclassification. Class 3 has 15 samples: 2 cases were misclassified as class 2 and 13 were correctly classified. Overall, the HMP-Coffee model achieved an accuracy equal to 81.72%.

<table><caption>**Table 6.** Confusion matrix for the HMP-Coffee model. The Predicted columns correspond to the estimated profitability (Favorable, Average, and Unfavorable). Real rows columns correspond to the profitability of the ICAFE test dataset (Favorable, Average, and Unfavorable).</caption><thead><tr><th>Real</th><th>Predicted</th><th>Class 1: Favorable</th><th>Class 2: Average</th><th>Class 3: Unfavorable</th></tr></thead><tbody><tr><td>Class 1: Favorable</td><td>331</td><td>31</td><td>0</td></tr><tr><td>Class 2: Average</td><td>0</td><td>27</td><td>0</td></tr><tr><td>Class 3: Unfavorable</td><td>0</td><td>2</td><td>13</td></tr></tbody></table>

Overall accuracy is often insufficient evidence to determine the robustness of an estimation model such as HMP-Coffee [44]. Therefore, we considered three additional metrics: Precision, Recall, and F1-score [45]. These metrics were computed using the multi-class confusion matrix from true positives (TP), false positives (FP), false negatives (FN), and true negatives (TN) rates; where TP, FP, FN, and TN vary by class. For instance, for the **Average** class, TP corresponds to the profitability classified as **Average** by the HMP-Coffee model and the ICAFE dataset. FP corresponds to the profitability identified by the HMP-Coffee model as **Average**, but in the ICAFE dataset is **Favorable** or **Unfavorable**. TN corresponds to profitability not classified as **Average** by the HMP-Coffee model. However,
they are **Average** in the ICAFE dataset. FN corresponds to the profitability not classified as Average by the HMP-Coffee, but in the ICAFE dataset is **Average**. For each class, we computed Precision, Recall, and F1-score individually.

Table 7 presents the Precision, Recall, and F1-score achieved by the HMP-Coffee model for the **Favorable**, **Average**, and **Unfavorable** classes. HMP-Coffee classified with higher precision the **Favorable** and **Unfavorable** (0.99 and 0.98, respectively) classes than the **Average** class (0.450). HMP-Coffee classifies better extreme qualitative scales than the intermediate ones. In particular, HMP-Coffee suffers from FP when identifying the **Average** class. The detected FP problem occurs due to the use of scales in HMP-Coffee. For example, when the input values of "Price of workforce" are 10 and 19.9 dollars on a scale where **Cheap** ranges between 0–9.9 dollars, **Average** between 10–19.9 dollars, and **Expensive** higher than 20 dollars, they are classified as **Average**; however, its closeness to the limit has a clear implication in the model’s precision. In summary, using scales allows HMP-Coffee to provide an easy-to-interpret and straightforward profitability model. However, they negatively impact its precision, opening the need to divide the scales class for a more nuanced identification by using, for instance, Fuzzy Logic.

<table><caption>**Table 7.** Results of statistical criteria (precision, recall, F1-score) to evaluate the HMP-Coffee proposed to estimate three profitability levels/classes: Favorable, Average and Low. The Overall contains the average by statistical criteria.</caption><thead><tr><th>Class</th><th>1: Favorable</th><th>2: Average</th><th>3: Unfavorable</th><th>Overall</th></tr></thead><tbody><tr><th>Precision</th><td>0.990</td><td>0.460</td><td>0.990</td><td>0.813</td></tr><tr><th>Recall</th><td>0.914</td><td>0.989</td><td>0.866</td><td>0.923</td></tr><tr><th>F1-score</th><td>0.955</td><td>0.621</td><td>0.928</td><td>0.834</td></tr></tbody></table>

HMP-Coffee achieved high recall for **Favorable** (0.914), **Average** (0.989), and **Unfavorable** (0.866). These results reveal HMP-Coffee does not have problems related to FN. As expected, HMP-Coffee achieved a high F1-score for the **Favorable** and **Unfavorable** classes (0.955 and 0.928, respectively); it scores shows the balance between the Precision and Recall metrics. Furthermore, HMP-Coffee obtained an intermediate F1-score for the **Average** class due to the Precision in identifying the **Average** class is low (i.e., when the model predicts profitability as **Average**, but it is **Favorable** or **Unfavorable**).

## 4.2. Discussion

From the ICAFE case study, HMP-Coffee estimated that, between 2006 and 2019, 89.21%, 7.3%, and 3.5% of small-coffee productions in Costa Rica obtained **Favorable**, **Average**, and **Unfavorable** levels of profitability, respectively. This estimation matches with the information provided by the ICO that, according to the report of Profitability of coffee production in Latin American countries in 2019 [46]. It is noticeable that Costa Rica promotes economically sustainable coffee production by supporting producers, in reducing costs and increasing yields, to guarantee their level of competitiveness, particularly in low carbon markets.

Overall, HMP-Coffee can estimate the profitability level of small coffee productions with a precision of about 82%. It is noteworthy that, unlike the related work (Section 2.2), our approach offers the following characteristics jointly: it is non-data driven, easy to interpret, and considers the three coffee’s profitability factors. As opposed to HMP-Coffee, Milne et al. [14] estimated the profitability with a data-driven approach; such an approach is hard to adopt in developing countries where there is low adoption of modern information management tools in small coffee farms [16]. Unlike Rising et al. [11] and Haaster et al. [13], that estimate profitability based on climatic variables in diverse types of crops, HMP-Coffee performs estimations considering the particularities of coffee crop profit defined by ICO. Shakoor et al. [12] implemented the artificial intelligence approaches applying the K-Nearest Neighbors algorithms for six crops Aus rice, Aman rice, Boro rice, Potato, Jute, and wheat; however, the output models are black box. In contrast, HMP-Coffee
maintains its hierarchical nature to ensure interpretability. The interpretability is pivotal to support decision-making in developing countries, where around 70% farmers have a low educational level [47].

As we conceived HMP-Coffee with the classical set theory [48], where there are no intermediate situations (an element belongs or does not belong to a set), its main shortcoming is to handle values close to levels' limits. Indeed, Zhang et al. [49] state that the overall precision in set, theory-based models, such as HMP-Coffee, can be affected when there are many border values. According to Olivier et al. [50], techniques such as Fuzzy theory that can operate with intermediate values are proper to overcome this shortcoming, seeking to achieve a more flexible and precise model.

### 4.3. Practicability

Figure 7 depicts how the decision-maker can use the model, the model response, and its use for supporting decision making in 6 steps:

1. The smallholder sets up HMP-Coffee with the basic attributes.

2. The smallholder executes HMP-Coffee to estimate the level of profitability of his/her small coffee production.

3. The hierarchical multicriteria model responds with the estimation of profitability level "Favorable," "Average," and "Unfavorable". The model shows the qualitative effect (represented by colors) of each attribute on the profitability level. The red color means a negative impact, the black one a neutral impact, and the green one a positive impact.

4. The decision-maker visualizes the level of profitability of the crop.

5. If the decision-maker agrees with the profitability level, it means that the crop's current management is suitable. On the contrary, the smallholder could analyze the variables with a negative impact on the profitability level (i.e., the red color); apply one or more actions to improve the final result.

<figure><img src="image_10.png" /><figcaption>Figure 7. HMP-Coffee practical operation.</figcaption></figure>
For instance, a smallholder decides to make a high Investment in chemical fertilization. The farmer goes to the model and enters the general information of the crop (step 1). For this particular case: Investment in chemical fertilizer (t5) is “Expensive”, Time spent on fertilization (t1) is “High time”, and the Coffee production volume (t17) is expected to be “High production”. The model uses this information to execute its hierarchical multi-criteria feature (step 2). It responds with an “Average” level of profitability (step 3). The smallholder visualizes the estimation and the effect by attribute represented using colors (step 4). The smallholder notes that, in addition to (t5), (t1), and (t17), if the price of the workforce (t4) is “Expensive”, the investment in crop care activities (t23) increases. This situation produces a profitability level “Average” (step 5). On the contrary, for the same investment in chemical fertilization, when the price of the workforce is “Cheap”, it balances the investment in crop care activities (t23), producing a level of profitability “Favorable” (step 5). Based on this analysis, if the smallholder wants to make a high investment in chemical fertilization and maintain a “Favorable” profitability level, it should reduce labor costs, postponing some crop activities as the renewal, among other options.

**5. Conclusions and Future Work**

This paper introduced an approach called HMP-Coffee, formed by a conceptual model, its implementation, and corresponding evaluation. It is noteworthy that HMP-Coffee is the first conceptual hierarchical model that relates cost, production volume, and international market to estimate the profitability in small-scale coffee productions. The model is conceived based on expert knowledge for overcoming the lack of economic data about small coffee crops in developing countries. The implementation is also newfangled because its qualitative hierarchical nature is well suited to obtain interpretable models. The interpretability characteristic is pivotal to support decision-making in developing countries, where almost 70% of farmers have a low educational level.

In the evaluation, the HMP-Coffee model achieved significant results on widely accepted performance metrics, including Accuracy, Precision, Recall, and F1-score. The performance shows HMP-Coffee as a reliable model for making financial decisions on small coffee crops to improve their economic sustainability. Its proper use and adaptation to the local context will allow smallholders to make better decisions, and consequently, improve production income, particularly in developing countries, where 600 thousand families depend on the coffee activity. Summarizing, the proposed model offers a trade-off between the need for improved financial decision making, and the constraints faced by small farmers for detailed record keeping of financial variables related to profitability.

HPM-Coffee is a hierarchical multicriteria model developed based on classical set theory [48]. Thus, an element belongs or does not belong to a set, but there are no intermediate situations guaranteeing that HPM-Coffee is a simple and easy-to-interpret model; however, it can lead to errors. There is a high possibility of error for input values close to the categories' limits, affecting the model's general precision. Incorporating more flexible approaches (e.g., Fuzzy theory) would allow considering intermediate situations, thus achieving a more flexible and precise model. Furthermore, as future work, HPM-Coffee could be extended to real farmer users for assessing their ability to estimate the Profitability level in a real context. It will allow easy understanding by the final user.

**Supplementary Materials:** The following are available online at https://www.mdpi.com/article/10.3390/app11156880/s1. HMP-Coffee.

**Author Contributions:** Conceptualization, L.C.; Data curation, L.C.; Formal analysis, L.C., D.C.C., M.S.M. and J.C.C.; Investigation, L.C.; Methodology, L.C., D.C.C., M.S.M. and J.C.C.; Supervision, D.C.C. and J.C.C.; Validation, L.C. and M.S.M.; Visualization, L.C.; Writing—original draft, L.C.; Writing—review & editing, D.C.C., E.R., M.-H.R. and J.-N.A. All authors have read and agreed to the published version of the manuscript.

**Funding:** The research of Ph.D. David Camilo Corrales was funding by the Universidad del Cauca. The research of the Eng. Leidy Casilimas was funding by the project "Estimación de la rentabilidad
en la producción de café sostenible a través de un modelo cualitativo jerárquico" of the Ministry of Information Technologies and Communications—Colombia, Convocatoria 823 Formación de capital humano de alto nivel para las regiones-Cauca.

**Institutional Review Board Statement:** Not applicable.

**Informed Consent Statement:** Informed consent was obtained from all subjects involved in the study.

**Acknowledgments:** The authors thank the Ministry of Science, Technology and Innovation (MINTIC)—Colombia under project "Estimación de la rentabilidad en la producción de café sostenible a través de un modelo cualitativo jerárquico" Convocatoria 823-Formación de capital humano de alto nivel para las regiones-Cauca, Universidad del Cauca, especially the Telematics Engineering Research Group (GIT) and Research Group for Rural Development (TULL), the Cafiambiente Association, The International Center of Tropical Agriculture (CIAT), the expert panel and La Sultana's farm.

**Conflicts of Interest:** The authors declare no conflict of interest.

## References

1. Daviron, B.; Ponte, S. *The Coffee Paradox: Global Markets, Commodity Trade and the Elusive Promise of Development*; Zed Books: Fort Collins, CO, USA, 2005; ISBN 978-1-84277-457-1. Available online: http://www.informationweek.com/news/201202317 (accessed on 2 April 2020).

2. OEC—The Observatory of Economic Complexity. Available online: https://oec.world/ (accessed on 30 December 2020).

3. Berdegué, J.A.; Fuentealba, R. *The State of Smallholders in Agriculture in Latin America*; Oxford University Press: Oxford, UK; ISBN 978-0-19-176824-8.

4. Velez-Vallejo, R. *Rentabilidad, Legitimidad y Resiliencia*; Federacion Nacional de Cafeteros: Bogotá, Colombia, 2018; pp. 10–11. Available online: http://www.informationweek.com/news/201202317 (accessed on 2 April 2020).

5. Poole, N. *Smallholder Agriculture and Market Participation: Lessons from Africa, the Caribbean and the Pacific*; FAO: Rome, Italy, 2017; ISBN 978-92-5-109939-1.

6. Giovannucci, D.; Koekoek, F.J. *The State of Sustainable Coffee: A Study of Twelve Major Markets*; Social Science Research Network: Rochester, NY, USA, 2007.

7. Kilian, B.; Jones, C.; Pratt, L.; Villalobos, A. Is Sustainable Agriculture a Viable Strategy to Improve Farm Income in Central America? A Case Study on Coffee. *J. Bus. Res.* **2006**, *59*, 322–330. [CrossRef]

8. Dixon, J.; Gibbon, D.P.; Gulliver, A.; Hall, M. *Farming Systems and Poverty: Improving Farmers' Livelihoods in a Changing World*; FAO: Rome, Italy; World Bank: Washington, DC, USA, 2001; ISBN 978-92-5-104627-2.

9. De Salvo, M.; Begalli, D.; Capitello, R.; Agnoli, L.; Tabouratzi, E. Determinants of Winegrowers' Profitability: Evidence from an Eastern Europe Wine Region. *EuroMed J. Bus.* **2017**, *12*, 300–315. [CrossRef]

10. Hawes, C.; Young, M.W.; Banks, G.; Begg, G.S.; Christie, A.; Iannetta, P.P.M.; Karley, A.J.; Squire, G.R. Whole-Systems Analysis of Environmental and Economic Sustainability in Arable Cropping Systems: A Case Study. *Agronomy* **2019**, *9*, 438. [CrossRef]

11. Rising, J.; Devineni, N. Crop Switching Reduces Agricultural Losses from Climate Change in the United States by Half. *Nat. Commun.* **2020**, *11*. [CrossRef]

12. Shakoor, M.T.; Rahman, K.; Rayta, S.N.; Chakrabarty, A. Agricultural Production Output Prediction Using Supervised Machine Learning Techniques. In Proceedings of the 2017 1st International Conference on Next Generation Computing Applications (NextComp), Mauritius, 19–21 July 2017; pp. 182–187.

13. Haaster, F.; Kleynhans, T. Decision Tree Modelling to Support Investment Decisions on Flower Production for the Northern Hemisphere. *Agrekon* **2002**, *41*, 75–96. [CrossRef]

14. Milne, A.E.; Coleman, K.; Todman, L.C.; Whitmore, A.P. Model-Based Optimisation of Agricultural Profitability and Nutrient Management: A Practical Approach for Dealing with Issues of Scale. *Environ. Monit. Assess.* **2020**, *192*, 730. [CrossRef]

15. Cardozo, N.P.; De Oliveira Bordonal, R.; Panosso, A.R.; Crusiol, C.A.C. A Multivariate Approach to Determine the Economic Profitability of Sugarcane Production under Diverse Climatic Conditions in Brazil. *Sugar Tech* **2020**, *22*, 954–966. [CrossRef]

16. Stratigea, A. ICTs for Rural Development: Potential Applications and Barriers Involved. *Netcom Réseaux Commun. Territ.* **2011**, *179–204*. [CrossRef]

17. International Coffee Organization. Available online: http://www.ico.org/ (accessed on 17 February 2021).

18. Eje Económico FNC. Available online: https://federaciondecafeteros.org/wp/sostenibilidad/eje-economico/ (accessed on 16 December 2020).

19. Bohanec, M. DEXi: A Program for Multi-Attribute Decision Making. Available online: http://kt.ijs.si/MarkoBohanec/dexi.html (accessed on 3 December 2020).

20. Bockstaller, C.; Beauchet, S.; Manneville, V.; Amiaud, B.; Botreau, R. A Tool to Design Fuzzy Decision Trees for Sustainability Assessment. *Environ. Model. Softw.* **2017**, *97*, 130–144. [CrossRef]

21. Andriantiatsaholiniaina, L.; Kouikoglou, V.; Phillis, Y. Evaluating Strategies for Sustainable Development: Fuzzy Logic Reasoning and Sensitivity Analysis. *Ecol. Econ.* **2004**, *48*, 149–172. [CrossRef]
22. Wielinga, B.J.; Bredeweg, B. Knowledge and Expertise in Expert Systems. In *Human-Computer Interaction*; van der Veer, G.C., Mulder, G., Eds.; Springer: Berlin/Heidelberg, Germany, 1988; pp. 290–297.

23. Morales-Velasco, S.; Vivas-Quila, N.J.; Gomez-Medina, V. Variable Biophysics of Twelve Systems Agrosilvopastoriles in the Plateau of Popayán—Cauca. *Biotecnol. Sect. Agropecu. Agroind.* **2015**, *13*, 11–21. [CrossRef]

24. Muñoz, C.J.M.; Muñoz, P.J.A.; Montes, R.C. Evaluation of Organic Manures in Lettuce and Cabbage Plants at Popayán, Cauca. *Biotecnol. Sect. Agropecu. Agroind.* **2015**, *13*, 73–82.

25. Campo-Martínez, A.D.P.; Acosta-Sanchez, R.L.; Morales-Velasco, S.; Prado, F.A. Evaluation of Microorganisms of Mountain (Mm) in the Production of Chard on the Plateau of Popayán. *Biotecnol. Sect. Agropecu. Agroind.* **2014**, *12*, 79–87.

26. Ordonez, A. La Sultana Farm. Available online: https://faca.unicauca.edu.co/cienciasagrarias/infraestructura (accessed on 3 December 2020).

27. Adeli, H. *Expert Systems in Construction and Structural Engineering*; CRC Press: Boca Raton, FL, USA, 2003; ISBN 978-0-203-40110-1.

28. Qi, J.; Wei, L.; Wan, Q. Multi-Level Granularity in Formal Concept Analysis. *Granul. Comput.* **2019**, *4*, 351–362. [CrossRef]

29. Ahonen-Myka, H. Discovery of Frequent Word Sequences in Text. *Comput. Vis.* **2002**, *2447*. [CrossRef]

30. ICAFE Costo de la Actividad Cafetalera. Available online: http://www.icafe.cr/sector-cafetalero/informacion-de-mercado/costo-de-la-actividad-cafetalera/ (accessed on 15 December 2020).

31. Caravela Coffee. Available online: https://caravela.coffee/ (accessed on 17 February 2021).

32. Guo, L.; Shi, F.; Tu, J. Textual Analysis and Machine Learning: Crack Unstructured Data in Finance and Accounting. *J. Financ. Data Sci.* **2016**, *2*, 153–170. [CrossRef]

33. Grömping, U. Using R and RStudio for Data Management, Statistical Analysis and Graphics (2nd Edition). *J. Stat. Softw.* **2015**, *68*. [CrossRef]

34. Shadbolt, N.; Smart, P.R. Knowledge Elicitation: Methods, Tools and Techniques. In *Evaluation of Human Work*; Wilson, J.R., Sharples, S., Eds.; CRC Press: Boca Raton, FL, USA, 2015; pp. 163–200. ISBN 978-0-415-26757-1.

35. Gonzalez-Perez, M.; Gutierrez-Viana, S. Cooperation in Coffee Markets: The Case of Vietnam and Colombia. *J. Agribus. Dev. Emerg. Econ.* **2012**, *2*, 57–73. [CrossRef]

36. Bohanec, M.; Žnidaršič, M.; Rajkovic, V.; Bratko, I.; Zupan, B. DEX Methodology: Three Decades of Qualitative Multi-Attribute Modeling. *Informatica* **2013**, *37*, 49–54.

37. O'Donnell, C.J. Measuring and Decomposing Agricultural Productivity and Profitability Change. *Aust. J. Agric. Resour. Econ.* **2010**, *54*, 527–560. [CrossRef]

38. Drakopoulos, S.A.; Grimani, K. Maslow's Needs Hierarchy and the Effect of Income on Happiness Levels. Available online: https://mpra.ub.uni-muenchen.de/50987/ (accessed on 27 April 2021).

39. Asociacion Cafiambiente del Cauca. Available online: http://colombiapymes.com/ficha/asociacion-cafiambiente-cauca-208962 (accessed on 17 February 2021).

40. Pinto, L.F.G.; Gardner, T.; McDermott, C.L.; Ayub, K.O.L. Group Certification Supports an Increase in the Diversity of Sustainable Agriculture Network–Rainforest Alliance Certified Coffee Producers in Brazil. *Ecol. Econ.* **2014**, *107*, 59–64. [CrossRef]

41. Casilimas, L.; Corrales, D.C. Table Rules of HMP-Coffee Using Dexi. Available online: https://github.com/Leidy9428/HMP-Coffee/tree/main/Supplementary%20data (accessed on 15 March 2021).

42. Berdegué, J.; Fuentealba, R. Latin America: The State of Smallholders in Agriculture. In Proceedings of the IFAD Conference on New Directions for Smallholder Agriculture, Rome, Italy, 24–25 January 2011. [CrossRef]

43. Casilimas, L.; Corrales, D.C. Profitability in Small Coffee Crops. Available online: https://github.com/Leidy9428/HMP-Coffee/tree/main/ICAFE%20dataset%20test (accessed on 15 March 2021).

44. Ali, M.; Son, D.-H.; Kang, S.-H.; Nam, S.-R. An Accurate CT Saturation Classification Using a Deep Learning Approach Based on Unsupervised Feature Extraction and Supervised Fine-Tuning Strategy. *Energies* **2017**, *10*, 1830. [CrossRef]

45. Goutte, C.; Gaussier, E. A Probabilistic Interpretation of Precision, Recall and F-Score, with Implication for Evaluation. In *Advances in Information Retrieval*; Losada, D.E., Fernández-Luna, J.M., Eds.; Springer: Berlin/Heidelberg, Germany, 2005; pp. 345–359.

46. International Coffee Council. *Profitability of Coffee Farming in Selected Latin American Countries*; International Coffee Council: Nairobi, Kenya, 2019; p. 19.

47. De Janvry, A.; Sadoulet, E. World Poverty and the Role of Agricultural Technology: Direct and Indirect Effects. *J. Dev. Stud.* **2002**, *38*, 1–26. [CrossRef]

48. Džamonja, M. Set Theory and Its Place in the Foundations of Mathematics: A New Look at an Old Question. *J. Indian Counc. Philos. Res.* **2017**, *34*, 415–424. [CrossRef]

49. Zhang, Q.; Xie, Q.; Wang, G. A Survey on Rough Set Theory and Its Applications. *CAAI Trans. Intell. Technol.* **2016**, *1*, 323–333. [CrossRef]

50. Heubo-Kwegna, O. Fuzzy Logic versus Classical Logic: An Example in Multiplicative Ideal Theory. *Adv. Fuzzy Syst.* **2016**, *2016*. [CrossRef]