Introduction

Almond (Amygdalus communis L.), with a great significance in human nutrition since old times, belongs to Amygdalus sub-genus of Prunus genus Rosaceae family. Almond botanically has a drupe structure, but it is assessed as a nut fruit by the experts since mesocarp dries out and gets a skinny form in ripening period (Soylu 2003). It has about 40 species (Kester and Gradziel 1996) and Prunus amygdalus Batsch. (synonym. Prunus dulcis Miller) is the most common commercial species that is quite valuable with fruits processed into various products.

Beside the U.S.A. which is the world’s largest almond producer, the major producers are Greece, Iran, Italy, Morocco, Portugal, Spain, Pakistan, Syria, Philistine and Turkey (Aktas et al. 2007). Almond has a natural widespread over mountainous sections of Central Asia (Rugini and Monastra 2003) and naturally grows in almost every region of our country with different ecologies. Turkey, with its annual production about 75 thousand tons (FAO 2012), is the ninth major producer (Aktas et al. 2007) and has about 4% share in world almond production of 2 million tons (FAO 2012). Sufficient emphasis has recently been placed on modern almond culture in Turkey.

Hulling, wetting the kernels, shell cracking, drying and peeling are some of the most important processing steps after almond harvesting. The mechanical and physical properties of the product are exceedingly influence these processing methods (Mahmoodi-Eshkaftaki et al. 2013). The mechanical properties of almond are necessary for design of an almond cracker, peeler machines and almond shaker (Mahmood et al. 2008).

In recent years, the neural techniques brought up as a new tool for solving complex problems. Artificial neural networks (ANNs) are one of many computing models used in the sphere of artificial intelligence (Šťastný et al. 2011). ANNs which have the parallel processing capability provide a method to characterize synthetic neurons to solve complex problems (Ayoubi et al. 2011). By the data they gathered in the training phase, ANNs can comply with the new situations in problems such as mapping, modelling, association types (Mancuso et al. 1999), Knowledge-management (Svoboda 2007) and classification (Konečný et al. 2010).

In agriculture, many studies have been conducted with the artificial neural networks (ANNs) (Bala et al. 2005; Diamantopoulou 2005; Movagharnejad and Nikzad 2007; Khalifa et al. 2011; Khalesi et al. 2012; Karimi et al. 2012; Dousti et al. 2013; Goyal 2013; Reshadsedghi and Mahmoudi 2013; Reshadsedghi et al. 2014). However, ANFIS structure hasn’t been used for predicting physical properties of agricultural products in the scientific literature. The aim of this research is to predict the arithmetic mean diameter, geometric mean diameter, sphericity, surface area, volume, projected area, shape index and aspect ratio of the almond nut by ANFIS.

Materials and Methods

‘Ferragnes’, ’Lauranne’, ’Glorieta’ and ’Marta’ varieties of almond nut were used all the measurement in this study. The almond nuts were obtained from the 2015 growing season at the Pistachio Research Institute in the Gaziantep province of Turkey. The nuts were cleaned by in an air from the unwanted describe foreign materials and broken nuts. 100 nut samples were randomly selected from each variety and their three main dimensions were studied. Measurements of these dimensions, length (L, mm), width (W, mm) and thickness (T, mm), were carried out with a digital caliper of precision 0.01 mm. The equations used for calculation of the physical properties are given in Table 1.

Table 1 Equations used to calculate the physical properties of almond nuts

Adaptive Neuro Fuzyy Inference System (ANFIS)

ANFIS integrates neural network with Fuzzy Interface System (FIS). The method of a FIS composes of 3 elements: a rule base, a database and a reasoning mechanism. A schematic representation of an ANFIS is represented in Fig. 1 (Bachir and Zoubir 2012). It is used two inputs as y 1 and y 2 and one output as v to explain the fuzzy inference system. If the rule base contains two fuzzy if-then rules such as:

$$\boldsymbol{Rule}1\colon Ify_{1}is\theta _{1}andy_{2}is\beta _{1}thenv_{1}=a_{1}y_{1}+b_{1}y_{2}+s_{1}$$
(1)
$$\boldsymbol{Rule}2\colon Ify_{1}is\theta _{2}andy_{2}is\beta _{2}thenv_{2}=a_{2}y_{1}+b_{2}y_{2}+s_{2}$$
(2)

where θ i and βi are fuzzy membership sets, b i is the number of membership equations, s i is the design parameter that is defined during the train process. The ANFIS consist of six layers:

Fig. 1
figure 1

ANFIS structure

Layer 1: This is the input layer that determines actual data and desired data.

Layer 2: Each nodal in this layer is an adaptive nodal with a fuzzy membership equation. For two inputs, the nodal outputs are:

$$\begin{array}{cc} L_{i}^{1}=\alpha \theta _{i}(y) & i=1,2 \end{array}$$
(3)
$$\begin{array}{cc} L_{i}^{1}=\alpha \beta _{i}(y) & i=1,2 \end{array}$$
(4)

where αθ i and αβ i are membership functions.

$$\alpha \theta _{i}(y)=\frac{1}{1+\left [\left (\frac{y-p}{r_{i}}\right )^{2}\right ]t_{i}}$$
(5)

where {p i , r i ,t i } is the coefficient group.

Layer 3: Each nodal in the third layer is a circle nodal called “Ƞ”, that multiples the all signals and send the product out.

$$\begin{array}{cc} w_{i}=\alpha \theta _{i}(y)\cdot \alpha \beta _{i}(y) & (i=1,2..) \end{array}$$
(6)

Layer 4: Each nodal in the fourth layer is a circle nodal called “Ɲ”.

$$\begin{array}{cc} \bar{w}_{i}=\frac{w_{i}}{w_{1+}w_{2}} & (i=1,2..) \end{array}$$
(7)

Layer 5: In this layer, each nodal i has the following function:

$$L_{i}^{5}=\bar{w}_{i}f_{i}=\bar{w}_{i}(a_{i}y_{1}+b_{i}y_{2}+s_{i})$$
(8)

Layer 6: The single nodal in the sixth layer is a circle nodal called “\(\sum\)”.

$$L_{i}^{6}=\sum \bar{w_{i}}f_{i}=\frac{\sum w_{i}f_{i}}{\sum w_{i}}$$
(9)

Result and Discussion

Measurements of the dimensions, length, width and thickness for almond types namely ’Ferragnes’, ’Lauranne’, ’Glorieta’ and ’Marta’ have been carried out in laboratory conditions. These measurements were then used to obtain some physical parameters such as projected area, arithmetic mean diameter, geometric mean diameter, sphericity, surface area, volume, shape index and aspect ratio. Afterwards the data gathered has been used in the training of ANFIS structure. Figs. 2 and 3 depicts the prediction results of the projected area for four almond types using the ANFIS approach. As seen in the figures the prediction results of the projected area parameter are quite good. Prediction results of arithmetic and geometric mean diameter is given in Figs. 4 and 5. The results for these parameters are satisfactory as well. Fig. 6 shows the prediction results of sphericity and Fig. 7 shows the prediction results of aspect ratio, respectively. Simulation results showed that the root mean-squared error (RMSE) for any prediction was found to be 0.0001 which is quite low. Finally, the final parameters predicted for almond types are surface area, shape index and volume. Examining Figs. 89 and 10 together, it is obvious that the ANFIS structure is a suitable tool in prediction of the related physical parameters.

Fig. 2
figure 2

Prediction results of the projected area (Ap1) for almonds types using the ANFIS approach

Fig. 3
figure 3

Prediction results of the projected area (Ap2) for almonds types using the ANFIS approach

Fig. 4
figure 4

Prediction results of the arithmetic mean diameter for almonds types using the ANFIS approach

Fig. 5
figure 5

Prediction results of the geometric mean diameter for almonds types using the ANFIS approach

Fig. 6
figure 6

Prediction results of the sphericity for almonds types using the ANFIS approach

Fig. 7
figure 7

Prediction results of the aspect ratio for almonds types using the ANFIS approach

Fig. 8
figure 8

Prediction results of the surface area for almonds types using the ANFIS approach

Fig. 9
figure 9

Prediction results of the shape index for almonds types using the ANFIS approach

Fig. 10
figure 10

Prediction results of the volume for almonds types using the ANFIS approach

Conclusions

In this study, physical parameters of four almond types were calculated by means of the given equations. As an alternative method to this calculation technique, ANFIS approach has been used. According to the experimental and simulation results, the proposed ANFIS predictor had a superior performance in prediction of some physical parameter such as projected area, arithmetic and geometric mean diameter, sphericity, surface area, volume, shape index and aspect ratio. Therefore, it is obvious that ANFIS predictor can be used as an effective alternative method.