IoT Based Detection of Molded Bread and Expiry Prediction using Machine Learning Techniques

Expiration of a bread is a very popular issue in food logistics. Due to various conditions fungal bread can cause food poisoning for consumers. As a result, nausea, diarrhea and different medical issues appear in people. For this purpose, an intelligent system required for the detection of present condition of bread is required which will help the stores and consumers. In this study, we have developed a prototype made up of Arduino Nano as a microcontroller, MQ series sensors for CO and CO2 detection in shopper bags of bread in order to collect data. This data is further processed in different machine learning algorithms for the detection of current condition of bread in these stores. The data collected from these sensors was imbalanced. Data collected from sensors is then balanced by using SMOTE and TOMEC Links (data balancing techniques). Furthermore, data preprocessing and feature engineering has been applied on IoT Based dataset to improve its efficiency. We have applied linear learning models for the prediction of current condition of bread. Within linear models, Gaussian Naïve Bayes has scored highest accuracy of 81.54%.


Introduction
All of the methods utilised in this thesis, including those for detecting yeast and automating the detection system, are outlined here.In addition, the research objective and methodology are laid out in this paper.This section concludes with an explanation of a thesis' structure.There are countless physical, electrical, and electromagnetic devices all around us, all of which are used to address thousands of difficulties that arise on a daily basis.In today's commercial, medical, health, financial, education, household, and industry eras, the Internet plays a critical function.The Internet of Things is a remarkable invention since it combines both applications and the Internet (IOT).Director of MIT's Auto-ID-Centre, Kevin Ashton coined the term "IOT" back in 1999 [1].User convenience is the primary goal of the Internet of Things (IoT).With the Internet of Things (IOT), the world is becoming smarter and more interconnected [2], [3].Wherever it's utilized, from emergency clinics to grocery stores to security regions to banks to workplaces and labs, the food area to instructive organizations and even homes, it makes the world a more brilliant and more savvy place.Bakery items are the primary focus of IOT in restaurants and bakeries [4], [5].The most pressing issue is whether or not the bread being used is safe for consumption and whether or not it has expired.Carbohydrate-dense foods such as bread are popular among the general populace.Wheat bread is one of many new breads being produced to pique consumer interest [6].Quality wheat bread must be produced by breadmakers who are popular with the general population.Sales will rise dramatically if the bread's quality is significantly improved.These baked goods may be contaminated with fungus, which can harm human health.Fungus may be invisible, but IOT can help if we can detect gases emitted from bread, such as carbon dioxide and methane.Gas sensors, such as MQ135 and MQ7, are used in this study to keep tabs on the quality of bread and determine if it has gone bad.Bread is a carb thick food that is every now and again ate by individuals from the general population [7], [8].A number of breads have been developed to pique the interest of consumers, with wheat bread being one among them.Wheat bread of high quality must be created by makers that are well-liked by the general public.A major increase in the overall quality of the bread will have a big effect on sales.Fungi feed on the organic matter that they are growing on, such as bread, in order to survive.The fungus's method of reproduction is shown by the colonies of spores that you see on bread [9], [10].Molds such as Aspergillus and Penicillium, as well as Mucor and Rhizopus, can be discovered growing on bread products.An infected spore must first identify bread and then implant its "hyphae" into the bread's surface in order to survive in a dark, chilly environment with insufficient air circulation.Microbial mycelium, also known as a mould colony, is formed as a result of the fast spread of mould spores in the environment.It is vital to standardise, rationalise, and link the organoleptic assessment approach in order to ensure its effectiveness.Food industry and other agricultural product organoleptic tests are widely used to determine the quality of the products under consideration [11], [12].Food poisoning symptoms such as diarrhoea, nausea, and vomiting can occur as a result of consumers' ignorance of the presence of these fungal illnesses on breads in bakeries and retail establishments.More than 200 people became ill after eating bread contaminated with the fungus Mucor circinelloides, which caused symptoms such as nausea, vomiting, and diarrhoea [13], [14].Fungus is not only detrimental to human health, but it also poses a significant threat to the management of the food supply chain.A fungal infestation can have an impact on both the quality and the quantity of food produced.Consumers discard infected fungal grains because they are unappealing to them since they are infected.Fungus is responsible for between 5 and 10% of all food losses each year, depending on the region [15], [16].As fungus on bread can be damaging to human health in addition to causing food loss, a method that can determine whether bread is safe to eat was required to determine whether bread is safe to consume.This research assisted in determining the amount of various gases present in bread and, on the basis of those quantities, determining whether the bread was expired or not [17], [18].Organoleptic tests are those that are carried out by humans using menas of ogran as a test subject.For example, evaluating the bread by smelling it, touching it, and tasting it are all acceptable methods of testing.It is a routine test that can be dangerous to the individual who is being tested.A smart system that can detect and forecast the condition of the bread is required in order to avoid this type of situation in the future.

Aspergillus,
Candida, Aspergillus, Histoplasmosis, Coccidiodomycosis, and Cryptococcus's are all examples of pathogenic fungus that can cause significant diseases in humans.Aspergillus Niger, Histoplasma, and Cryptococcus, Athlete's foot, ringworm, and other fungal infections can be caused by dermophytic fungi.There are several fungi that might produce life-threatening allergic reactions if consumed in large enough quantities [19], [20].Mycotoxins, which are harmful substances released by mold and mushrooms, are responsible for a slew of ailments.Immunecompromised people are more susceptible to the effects of these pollutant.Ergotism is caused by consumption of ergot alkaloids, which are found in mushrooms such as Amenita, which create fatal amatoxins.One of the most dangerous metabolites produced by Aspergillus is aflatoxins.Toxins enter the bloodstream, hinder protein synthesis, and weaken the body's defenses.Smut disease in maize is caused by a fungus called Ustilago maydis, which is a pathogen.Respiratory allergies and asthma are linked to the prevalence of fungi in the air, according to several research.Another set of disorders that can result from exposure to fungal spores include toxic pneumonitis and hypersensitivity pneumonitis, tremors, chronic exhaustion, kidney failure, and cancer.Bread molds are a group of molds that grow on bread.When mold spores reach the bread's surface, they begin to grow.Organic molecules found in bread and other meals are eaten by mold, a fungus.Three frequent bread molds are Penicillium, Cladosporium, and black bread mold [21].For testing, a widespread belief is that bread can be tasted, smelled, and touched.It's a standard test that can be detrimental to the individual taking it.An intelligent system is required to identify and anticipate the status of bread in order to avoid such things.In order to develop an IoT based system that can sense the environmental variables, a huge amount of data is required.Imbalancing in a sensed data is common problem.Fungus detection systems that can be controlled remotely are designed to protect the customers using bakery products (Xu et al.,, 2019;Zhang et al.,, 2018).When exposed to fungus for an extended period of time, people can suffer from major health issues.This framework is just as valuable as anyone else's.Developing an IoTbased fungal detection system is also aimed at making it portable.When deployed in an affected area and connected to the internet, the prototype of a fungus detection system may be used to monitor fungus concentrations in real time.Following are the objectives of this study: a) To create a dataset of real-time carbon dioxide values from a box containing fresh bread.b) To create a hardware based IoT prototype containing CO2 sensor and Arduino microcon-troller in order to gather dataset of bread in real-time c) To apply machine learning algorithms in order to classify the healthy condition on the basis of supervised labelling on dataset.d) To evaluate machine learning models on the basis of Accuracy, Precision, Recall and F1 Score.Previously no other study has been done on time series forecasting about healthy con-dition of bread based on fungal infections.It will help local general stores, bakeries in logistics and customers.

Materials and Methods
This section details the research process utilized to complete this project.Model creation (using machine learning algorithms) begins with pre-processing raw data (adjusting the dataset and handling outliers).The Internet of Things is all about making life easier for people (IoT).Smarter and more networked, the Internet of Things (IOT) is changing the world.A superior and shrewder world is made conceivable by its far-reaching use in pretty much every area of society, from emergency clinics to grocery stores, to security regions to banks and working environments, to instructive organizations and, surprisingly, our own homes.In restaurants and bakeries, IOT is most commonly used to track and monitor baked goods.The most important question is whether or not the bread is safe to eat and whether or not it has expired.Bread and other carbohydrateheavy foods are popular with the general population.The production of wheat bread is just one of several new breads being made in an effort to attract more customers.Wheat bread of the highest quality can only be made by wellknown bakers.If the quality of the bread is greatly enhanced, sales will soar.There is a possibility that the fungus in these baked items is harmful to one's health.If we can detect gases emitted from bread, such as carbon dioxide and methane, IOT can assist in the detection of fungus.Monitoring the quality of bread and determining if it has gone bad is done by using gas sensors, such as MQ135 and M7.Carbohydrate-dense foods such as bread are popular among the general populace.Wheat bread is one of a number of breads that have been produced to capture the curiosity of consumers.Quality wheat bread must be produced by breadmakers who are popular with the general population.Sales will rise dramatically if the bread's quality is significantly improved.In order to exist, fungi must eat the organic materials they are growing on, such as bread.The colonies of spores you see on bread illustrate the fungus' reproductive mechanism.Bread goods can be found with moulds including Aspergillus, Penicillium, and Mucor and Rhizopus.In order to survive in a dark, chilly, and poorly ventilated environment, an infected spore must first locate bread and then insert its "hyphae" into the bread's surface.Mould colonies, also known as microbial mycelium, arise when mould spores travel quickly via the air.For the organoleptic assessment approach to be effective, it must be standardised, rationalised, and linked together.Organoleptic tests are commonly used in the food business and other agricultural industries to determine the quality of the items being considered.Consumers' ignorance of the existence of these fungal infections on breads in bakeries and retail places can cause food poisoning symptoms such as diarrhea, nausea, and vomiting.Food poisoning was reported in more than 200 people after eating bread tainted with the fungus Mucor circinelloides.As well as harming human health, fungi represent a serious hazard to the food supply chain itself.When it comes to food production, both the quality and the quantity might be affected by a fungus infestation.Infected fungal grains are unappetizing to consumers because they are infected.Annual food losses due to fungus range anywhere from 5 to 10 percent, depending on the region in question.Because fungus on bread can harm human health as well as cause food loss, a method for determining whether or not bread is safe to ingest was necessary.There are many gases that can be measured to determine whether a loaf of bread has gone bad or not.The results of this study helped in this regard.

Methodology
The proposed system is composed of three layers: (i) Sensors (ii) Detection Unit (iii) Machine Learning

Figure 3. Proposed Framework
There has been no single research that has brought to the low-cost detection of rotten breads.Amounts of Carbon Dioxide in the air where bread is present have been measured using sensors MQ 7 and passed to an Arduino board for analysis.The important information from sensor data is extracted using a variety of classification methods for the goal of detecting threats.Classifier algorithms such as KNN and Logistic Regression are among the most useful and successful in the field.Prior to the classification method, the classifier may employ a feature selection and outlier's detection strategy in order to obtain a more accurate answer from the dataset.The type of classifier to be used is determined by the data and the desired outcomes to be achieved.An outline of the proposed work is depicted in Figure 1 as a block diagram, which represents the summary of ideas.

Figure 4. Proposed Flow Work
An IoT-based dataset has been used to generate the CSV input file.This data has been cleaned, balanced, and handled for outliers using data preprocessing techniques.The results have been validated using cross-validation.Machine learning models have been tested and deployed extensively.The most accurate classification models have been introduced.

Implementation of Hardware
Vacuum-packed breads are studied in this research utilizing our electronic technology, which is explained herein.A minimal expense and low-power utilization arrangement has been proposed by us.As an initial step, the primary module incorporates a model for information gathering, which is trailed by a subsequent that handles the UI and information capacity and handling.The data gathered tells us about the bread's current state, amongst other details. Figure depicts the two modules of our system's block diagram.

IoT Based Prototype
IoT Device has been presented in this study containing Arduino UNO, CO2 Sensor, CO Sensor, Humidity and Precipitation sensor in order to check the air quality under plastic bags.Indoor and outside air hold back somewhere in the range of 400ppm and 2,000ppm CO2 by volume, contingent upon the season.For applications going from assessing indoor air quality to estimating air CO2, a 0-1 percent (0-10,000ppm) CO2 sensor is the most savvy and solid choice.A 5 percent CO2 sensor is utilised in applications such as CO2 alarms in restaurants, breweries, and areas around stored CO2 tanks, among other things.Alarms must be present at 1.5 percent and 3 percent CO2, according to OSHA regulations.Other applications, such as changed atmosphere packaging, bioreactors, cryogenics, and SCUBA, necessitate the use of sensors that range from 5 to 100 percent CO2.In general, you should first determine the greatest level of CO2 that you need to measure, and then select the sensor that can measure that level accurately.

Carbon Monoxide Sensor with its specification
Gas concentrations can be sensed with a simple voltage divider network.The Gas sensor is powered by 5V DC and consumes 800mW of power.As a result, it is able to measure concentrations ranging from 200 to 10000ppm for a wide range of substances.

Figure 7. Gas Sensor for CO
This is a Carbon Monoxide Sensor made using an Arduino.Carbon Monoxide (CO) concentrations can be measured from 20 to 2000ppm using the MQ7 probe.The potentiometer can be used to modify the sensitivity.As the gas density increases, so does the generator's output.Using the potentiometer, you may change the sensitivity.As the density of the gas increases, the output increases as well; CO is measured in parts per million (ppm).As a comparison, the natural atmosphere has a concentration of 0.1 ppm.In most houses, the level is between 0.5 and 5 ppm.5-15 ppm is a good starting point.As little as 667ppm can produce up to 50% of the effects.Four wires are required to connect the sensor.Power is a factor in two of them.The sensor's +5V terminal is connected to the Arduino board's 5V port.The sensor's GND terminal is connected to the GND terminal of the Arduino.This provides the sensor with power.The sensor's analogue and digital outputs are connected to the remaining two ports.Connecting the Arduino to a computer via USB, the Arduino environment may be accessed (IDE).After writing the code in the IDE, the user uploads it to the microcontroller, which runs the code and interacts with inputs and outputs such as sensors, motors, and lights.(11).Assume it is the brain of the board.Depending on the board, the Arduino's primary IC (integrated circuit) may be slightly different.The ATMEL microcontrollers are commonly used.Before uploading a new programme from the Arduino IDE, you must know what IC your board is equipped with.The IC has this information printed on the top of it.There are six analogue input pins on the Arduino UNO board, from A0 to A5.Using these pins, the microprocessor can read the analogue signal from a humidity or precipitation sensor and convert it to a digital value.

Humidity Sensor with its specifications
In a surface-mountable LCC packaging, the SHT11 is a standard version of the relative humidity and temperature sensor IC.This sensor has a small footprint, yet it has all of the necessary sensor components and signal processing to produce a digital output that is perfectly calibrated.

Figure 10. Sensor SHT 11x Series for Humidity
It is a digital-output, relative humidity, and temperature sensor known as the DHT-22 (also known as AM2302).Data is sent on the data pin by the capacitive humidity sensor and a thermistor that measure the temperature of the surrounding air.Pins details are as under: 3-5V Maximum current is 2.5mA.With a two-to five-percent degree of precision, humidity ranges from 0% to 100% Temperatures between 40 and 80°C, with a 0.5°C precision.There are four pins on the DHT22 sensor board (VCC, DATA, NC, and GND) that are used to interface with the sensor.Vcc and GND are both connected to the Arduino board's GND and DATA pins, respectively.Between the Vcc and the DATA pins, we require a 10k ohm resistor (pull-up resistor).

Dataset
This information has been assembled from the IoT Device.There are different (autonomous) factors and one (subordinate) variable of the dataset (Outcome).Figure above shows the complete count for each objective (0 or 1).The 0 implies that the bread is usable, and 1 method bread is terminated.

Data Pre-processing
Data Pre-processing is a significant stage in the information mining process since it can connect with the changing or dropping of information before it is utilized.Planning (cleaning and organizing) crude information with the goal that it could be utilized for making and preparing AI models is known as information pre-handling in AI.Pre-handling is fundamental to guaranteeing top notch information.Four periods of information pre-handling are utilized to make the interaction simpler: information purging, information coordination, and information decrease.Our model's capacity to learn relies upon the quality and usable data that can be extricated from our information; in this way, prehandling our information prior to taking care of it into a machine it is basic to learn model.

Features Engineering
Machine learning and statistical modelling both use include designing to pick and control pertinent attributes from crude information prior to being taken care of into an expectation model.There can never be an excess of accentuation on highlight designing with regards to ML and information science overall.

Figure 14. Correlation Matrices IoT based dataset
The fundamental goal of feature engineering is to improve algorithm performance.Feature engineering in machine learning is more than just picking and modifying features.
The impact of demographic characteristics on stroke is depicted in the diagram below: Furthermore, feature engineering improves machine learning model performance by ensuring that the dataset is compatible with the algorithm.Figure below shows the features correlation matrix.

Feature Scaling
Using a technique called as feature scaling, features can be normalized (Normalization).In data processing, data normalisation is also known as data preparation and is usually done during this step.For machine learning purposes, all features must be scaled so that no feature is abnormally large (centring) and all features are the same size (scaling).Because they use distances or similarities (e.g. in the form of scalar product) between data samples, K-NN and SVM are sensitive to feature modifications.It's particularly helpful while addressing a mind boggling set of conditions, like least squares, while adjusting blunders could have a critical impact.It's as yet really smart to rescale/normalize your information assuming you're utilizing Fisher LDA or Naive Bayes, as well as Decision trees and Tree-based troupe techniques (RF, XGB) that are invariant to include scaling.However, XGBoost also has a second strategy based on linear boosting.In that instance, expanding the operation's size will be advantageous.

Support Vector Machine (SVM)
Support vector machines (SVMs), a collection of supervised learning algorithms, can be used to discover and classify outliers.There are various advantages of utilizing support vector machines.Valuable in high-layered conditions However, it can in any case be utilized in circumstances where there are a greater number of aspects than tests.

Logistic Regression
The most appropriate regression strategy to use when the dependent variable is dichotomous (binary) is logistic regression.Measurements and numerical displaying are utilized to portray information and to make sense of the connection between a solitary ward parallel variable and at least one autonomous factors that are either ostensible, ordinal, stretch, or proportion level.

K-Nearest Neighbors
The k-nearest neighbours (KNN) algorithm is a simple and quick to develop supervised machine learning algorithm.It can be used to solve classification and regression problems, and it can be used to solve both types of problems.

Naïve Bayes
Naive Bayes classifiers are those that are based on Bayes' Theorem.It's actually a family of algorithms that all follow the same basic principle: each pair of features to be categorised is independent of the others.To get started, let's look at a dataset.Naive Bayes, a probabilistic method, is a common classification algorithm.Despite its simplicity and intuitiveness, Naive Bayes performs amazingly effectively.Spam filters in the Email app, for example, use Naive Bayes.

Performance Parameters
Accuracy, Precision, Recall, and F1 Score are some of the criteria that have been used to evaluate techniques.The classified and misclassified clauses have been presented in the confusion matrix.The metrics used in this study are listed in the table below:

Results
This section demonstrates the outcomes of executing the machine learning models on the dataset after proposing the technique to forecast the bread condition.In an IoT-based dataset, Gaussian Naive Bayes is found to be a better classifier for prediction.Our findings are shown below, along with a side-by-by-side comparison of those of the default dataset and the balanced dataset.

Machine Learning Models
IoT data gathering is converted to CSV files for ML purposes.If the bread is fine, it hasn't gone bad yet.It is divided into two categories.The hotness content of carbon dioxide is increased by a steady, the carbon coefficient, isolated by the oxidized portion, and afterward duplicated by the atomic weight proportion of carbon dioxide to carbon to show up at the discharges.Sensors and organoleptic tests are used to determine the main CO2 concentration.The primary purpose of the machine learning model was to verify the accuracy of organoleptic tests based on sensor data.In datasets, the following observations were found:

Conclusions
Consumers have expressed an interest in a range of breads, with wheat bread being one of the more popular options available.Quality wheat bread must be made by bakers who are well-liked by the general public in order to be considered a success.Sales will increase significantly if there is a major improvement in the overall quality of the bread.Fungi must feed on the organic matter that they are growing on in order to survive, such as bread or other grains of wheat, in order to survive.Due to the way mushrooms reproduce, they form colonies of spores, which are visible on bread as a result of their reproductive mechanism.Molds such as Aspergillus and Penicillium, as well as Mucor and Rhizopus, can be seen growing on bread and other baked items, and they include a variety of species.To make due in a dim, crisp climate with little air dissemination, a contaminated spore should initially distinguish bread and afterward embed its "hyphae" into the bread's surface, a cycle known as hyphal development.In the environment, a mold colony, also known as microbial mycelium, forms as a result of spores from mold rapidly spreading across the environment.First and foremost, in order for organoleptic evaluation to be recognized as a legitimate scientific profession, it is necessary to standardize, rationalize, and link the approach to objective assessment to the method to objective assessment.Organoleptic tests are frequently used in the food industry and other agricultural products to determine the quality of the products being evaluated.With this method of evaluating information, it is feasible to obtain results that are unusually accurate in their accuracy.In some cases, assessment outperforms even the most sensitive of instruments in terms of specific performance.In the food logistics sector, the expiration of a loaf of bread is a very common challenge to deal with.Consumers may become unwell as a result of consuming fungus bread for a variety of reasons, including the following: Patients may have nausea, diarrhoea, and a range of other medical problems as a result of this condition.Consequently, an intelligent method for determining the current condition of bread is necessary, which will benefit both retailers and consumers.
A prototype consisting of an Arduino Nano microcontroller, MQ series sensors for carbon monoxide and carbon dioxide detection, and shopper bags of bread to collect data has been developed as a consequence of this research.In order to determine the current status of the bread in these companies, a number of machine learning algorithms are used to analyze the information collected.One-sided information was acquired by these sensors, resulting in distorted results.The information gathered from sensors is then balanced with the assistance of SMOTE and TOMEC Links, respectively (data balancing techniques).To improve the efficiency of IoT-based datasets, data preparation and feature engineering have been used to them as well.Linear models have been employed to forecast the current condition of the loaf of bread, respectively.Results show that among linear models, the Gaussian Nave Bayes has the highest accuracy with 81.54 percent accuracy, which is the highest accuracy among linear models.When a dataset is imbalanced, predictive models struggle.Therefore, data balancing techniques (Tomek and SMOTE) have been used to verify that all data points in the dataset are equal in size and weight.Outliers have been removed from the data so that it can be used and interpreted in a more flexible manner.This study also revealed the comparison of several machine learning algorithm-based categorization models to forecast the bread condition at the earliest possible stage.Findings that aren't included here: Classifiers can now be compared in terms of accuracy following the data balancing process.This approach, along with Logistic Regression and Support Vector Machine, as well as Knearest neighbors, was shown to be 81.54%accurate after a series of comparisons.Bread is a high-carbohydrate food that is widely consumed by members of the general population.To establish the quality of the products being tested, organoleptic tests were often employed in the food sector and other agricultural products.It is possible to acquire exceptionally accurate results by employing this approach of evaluating information.Occasionally, assessment outperforms even the most sensitive of tools in certain respects.Furthermore, this work can be expanded to determine how likely people are to develop diseases associated with fungal infections on food products in the next few years based on factors such as their lifestyle and level of physical activity.

Figure 2 .
Figure 2. Fungus on Breads.For testing, a widespread belief is that bread can be tasted, smelled, and touched.It's a standard test that can be detrimental to the individual taking it.An intelligent system is required to identify and anticipate the status of bread in order to avoid such things.In order to develop an IoT based system that can sense the environmental variables, a huge amount of data is required.Imbalancing in a sensed data is common problem.Fungus detection systems that can be controlled remotely are designed to protect the customers using bakery products(Xu et al.,, 2019;Zhang et al.,, 2018).When exposed to fungus for an extended period of time, people can suffer from major health issues.This framework is just as valuable as anyone else's.Developing an IoTbased fungal detection system is also aimed at making it portable.When deployed in an affected area and connected to the internet, the prototype of a fungus detection system may be used to monitor fungus concentrations in real time.Following are the objectives of this study: a)To create a dataset of real-time carbon dioxide values from a box containing fresh bread.b)To create a hardware based IoT prototype containing CO2 sensor and Arduino microcon-troller in order to gather dataset of bread in real-time c)To apply machine learning algorithms in order to classify the healthy condition on the basis of supervised labelling on dataset.d)To evaluate machine learning models on the basis of Accuracy, Precision, Recall and F1 Score.Previously no other study has been done on time series forecasting about healthy con-dition of bread based on fungal infections.It will help local general stores, bakeries in logistics and customers.
Figure below shows the 3D Model of IoT Based Fungal Detection Prototype:

Figure
Figure shows the histogram of each quality given in the dataset.It exhibits insights of dataset characteristics like CO2, CO, Outcomes and Humidity.

Figure 12 .
Figure 12.Histogram of each attribute

Figure 13 .
Figure 13.Relation between count and outcomes.
KNN Algorithm tested on bread dataset to check the outcome.It has obtained 69.23% accuracy to confidently predict the outcome of bread.

Figure 26 .
Figure 26.Performance of Logistic Regression 4.1.3Naïve Bayes Naive Bayes tested on bread dataset to check the outcome.It has obtained 81.54% accuracy to confidently predict the outcome of bread.

Figure 17 .
Figure 17.Performance of Naïve Bayes 4.1.4Support Vector Machine SVM tested on bread dataset to check the outcome.It has obtained 76.92% accuracy to confidently predict the outcome of bread.

Figure 18 .
Figure 18.Performance of SVM Figure below shows the comparative analysis of linear machine learning models.In which Gaussian Naïve Bayes has shown the highest accuracy of 81.54%.

Table 2 .
Description of Metrics

Table 3 .
Normal and Abnormal Ranges as detected from sensors and organoleptic

.
Comparative analysis of different linear machine learning models4.2.Comparative AnalysisDue to changes in data, the accuracy of each classifier fluctuates while using balancing techniques on a dataset.The outcomes and comparisons of all approaches utilised in this study are shown in the table below.