{"id":3415,"date":"2023-08-31T10:59:21","date_gmt":"2023-08-31T10:59:21","guid":{"rendered":"https:\/\/neuraldesigner.com\/blog\/raisin-classification\/"},"modified":"2025-09-09T17:38:51","modified_gmt":"2025-09-09T15:38:51","slug":"raisin-classification","status":"publish","type":"blog","link":"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/","title":{"rendered":"Classify raisins using machine learning"},"content":{"rendered":"<p>This study aims to classify different raisins using machine learning.<\/p>\n<p>Several traditional methods exist for assessing and determining the raisin type, but they can be time-consuming and tedious.<\/p>\n<p>To solve this problem, we can use machine learning to classify the different types of raisins and thus facilitate the treatment of the raisins.<\/p>\n<section>\n<h3>Contents<\/h3>\n<ol>\n<li><a href=\"#ApplicationType\">Application type<\/a>.<\/li>\n<li><a href=\"#DataSet\">Data set<\/a>.<\/li>\n<li><a href=\"#NeuralNetwork\">Neural network<\/a>.<\/li>\n<li><a href=\"#TrainingStrategy\">Training strategy<\/a>.<\/li>\n<li><a href=\"#ModelSelection\">Model selection<\/a>.<\/li>\n<li><a href=\"#TestingAnalysis\">Testing analysis<\/a>.<\/li>\n<li><a href=\"#ModelDeployment\">Model deployment<\/a>.<\/li>\n<\/ol>\n<p>This example is solved with <a href=\"https:\/\/www.neuraldesigner.com\/\">Neural Designer<\/a>. To follow it step by step, you can use the <a href=\"https:\/\/www.neuraldesigner.com\/free-trial\">free trial<\/a>.<\/p>\n<\/section>\n<section id=\"ApplicationType\">\n<h2>1. Application type<\/h2>\n<p>We will predict between two types of raisins, so the variable to be predicted is binary (Kecimen or Besni). Therefore, this is a <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/neural-networks-applications#Classification\">classification<\/a> project.<\/p>\n<p>The goal is to model the type of raisin based on its features for subsequent use.<\/p>\n<\/section>\n<section id=\"DataSet\">\n<h2>2. Data set<\/h2>\n<p>The first step is to prepare the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set\">data set<\/a>, which is the source of information for the problem. We need to configure three things here:<\/p>\n<ul>\n<li>Data source.<\/li>\n<li>Variables.<\/li>\n<li>Instances.<\/li>\n<\/ul>\n<h3>Data source<\/h3>\n<p>The data file <a href=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/10\/Raisin_Dataset.csv\">raisin_dataset.csv<\/a> contains the data for this example. 900 raisins were used, including 450 from both varieties and seven features were extracted. Here, the number of variables (columns) is 8, and the number of instances (rows) is 900.<\/p>\n<h3>Variables<\/h3>\n<p>The features or <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set#Variables\">variables<\/a> are the following:<\/p>\n<ul>\n<li><b>Area<\/b>: Gives the number of pixels within the boundaries of the raisin.<\/li>\n<li><b>Perimeter<\/b>: It measures the environment by calculating the distance between the boundaries of the raisin and the pixels around it.<\/li>\n<li><b>MajorAxisLenght<\/b>: Specifies the length of the major axis, denoting the longest line drawable on the raisin.<\/li>\n<li><b>MinorAxisLenght<\/b>: Indicates the length of the small axis, representing the shortest line drawable on the raisin.<\/li>\n<li><b>Eccentricity<\/b>: It measures the ellipse&#8217;s eccentricity, which has the same moments as raisins.<\/li>\n<li><b>ConvexArea<\/b>: Gives the number of pixels of the smallest convex shell of the region formed by the raisin.<\/li>\n<li><b>Extent<\/b>: It gives the ratio of the region the raisin forms to the total pixels in the bounding box.<\/li>\n<li><b>Class<\/b>: Kecimen and Besni raisin.<\/li>\n<\/ul>\n<p>All variables in the study are inputs, except &#8216;Class&#8217;, the output we want to extract for this machine learning study. Note that &#8216;Class&#8217; is binary and only takes Kecimen and Besni&#8217;s values.<\/p>\n<h3>Instances<\/h3>\n<p>The <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set#Instances\">instances<\/a> are divided into training, selection, and testing subsets. They account for 540 (60%), 180 (20%), and 180 (20%) of the original instances, respectively, distributed randomly across the dataset.<\/p>\n<p>We can perform a few related analytics once the data set has been set. First, we check the provided information and ensure that the data is of good quality.<\/p>\n<h3>Variables distributions<\/h3>\n<p>The data <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set#Distributions\">distributions<\/a> tell us the percentages of Kecimen and Besni raisins.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.neuraldesigner.com\/images\/raisin_class_pie_chart.webp\" \/><\/p>\n<p>This data set has the same number of samples of both categories (Kecimen and Besni).<\/p>\n<h3 style=\"font-family: Outfit, sans-serif; color: #242424;\">Inputs-targets correlations<\/h3>\n<p><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\">The\u00a0<a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/data-set#InputsTargetsCorrelations\" target=\"_blank\" rel=\"noopener\">input-target correlations<\/a> might indicate to us which factors are more influential.<\/span><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.neuraldesigner.com\/images\/raisin_class_pearon_correlations_chart.webp\" \/><\/p>\n<p>From the above chart, we can see that all the features have a significant influence except the &#8216;Extent&#8217;, compared to the others.<\/p>\n<\/section>\n<section id=\"NeuralNetwork\">\n<h2>3. Neural network<\/h2>\n<p>The second step is to choose a <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/neural-network\">neural network<\/a> to represent the classification function. Classification problems it consist of:<\/p>\n<ul>\n<li>A <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/neural-network#ScalingLayer\">scaling layer<\/a>.<\/li>\n<li>A <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/neural-network#PerceptronLayers\">perceptron layer<\/a>.<\/li>\n<li>A <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/neural-network#ProbabilisticLayer\">probabilistic layer<\/a>.<\/li>\n<\/ul>\n<p>The <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/neural-network#ScalingLayer\">scaling layer<\/a> contains the statistics on the input calculated from the data file and the method for scaling the input variables. Here, the\u00a0<a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/neural-network#MinimumMaximumScalingMethod\" target=\"_blank\" rel=\"noopener\">minimum and maximum scaling method<\/a> is set, but the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/neural-network#MinimumMaximumScalingMethod\" target=\"_blank\" rel=\"noopener\">mean and standard deviation scaling method<\/a> produces similar results.<\/p>\n<p>We set one perceptron layer, with 3 neurons as a first guess, having the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/neural-network#HyperbolicTangentActivationFunction\">hyperbolic tangent (tanh) as the activation function<\/a>.<\/p>\n<p>The following figure is a diagram of the neural network used in this example.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.neuraldesigner.com\/images\/raisin_network_architecture.webp\" \/><\/p>\n<p>The yellow circles represent scaling neurons, the blue circles perceptron neurons, and the red circles probabilistic neurons. The number of inputs is 7, and the number of outputs is 1.<\/p>\n<\/section>\n<section id=\"TrainingStrategy\">\n<h2>4. Training strategy<\/h2>\n<p>The <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy\">training strategy<\/a> is applied to the neural network to obtain the best possible performance. It comprises two components:<\/p>\n<ul>\n<li>A loss index.<\/li>\n<li>An optimization algorithm.<\/li>\n<\/ul>\n<p>The selected <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#LossIndex\">loss index<\/a> is the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#NormalizedSquaredError\">normalized squared error (NSE)<\/a> with <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#L2Regularization\">L2 regularization<\/a>. In situations with balanced targets, like in this case, the normalized squared error provides valuable assistance.<\/p>\n<p>The <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#ErrorTerm\">error term<\/a> fits the neural network to the training instances of the data set. The <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#RegularizationTerm\">regularization term<\/a> makes the model more stable and improves generalization, so our model will be more predictive.<\/p>\n<p>The selected <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#OptimizationAlgorithm\">optimization algorithm<\/a> that minimizes the loss index is the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/training-strategy#QuasiNewtonMethod\">quasi-Newton method<\/a>.<\/p>\n<p>The following chart shows how the training (blue) and selection (orange) errors decrease with the training epochs.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.neuraldesigner.com\/images\/raisin_Quasi-Newton_method_errors_history.webp\" \/><\/p>\n<p>The final training and selection errors are <b>training error = 0.353 NSE<\/b> (blue) and <b>selection error = 0.419 NSE<\/b> (orange). The following section will improve the generalization performance by reducing the selection error.<\/p>\n<\/section>\n<section id=\"ModelSelection\">\n<h2>5. Model selection<\/h2>\n<p>The objective of <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/model-selection\">model selection<\/a> is to find the network architecture with the best generalization properties. We want to improve the final selection error obtained before (0.419 NSE).<\/p>\n<p>The best selection error is achieved using a model whose complexity is the most appropriate to produce a better data fit. <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/model-selection#OrderSelection\">Order selection<\/a> algorithms are responsible for finding the optimal number of perceptron neurons in the neural networks.<\/p>\n<p>The following chart shows the error history for different numbers of perceptron neurons. We conclude that for two neurons, the selection error is the minimum.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.neuraldesigner.com\/images\/raisin_selection_errors_plot (2).webp\" \/><\/p>\n<p>The chart shows that the optimal number of neurons is 2, with <b>selection error = 0.398 NSE<\/b>.<\/p>\n<p>The following figure shows the final network architecture for this application.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.neuraldesigner.com\/images\/raisin_new_network_architecture.webp\" \/><\/p>\n<\/section>\n<section id=\"TestingAnalysis\">\n<h2>6. Testing analysis<\/h2>\n<p>The next step is to perform an exhaustive <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/testing-analysis\">testing analysis<\/a> to validate the neural network&#8217;s predictive capabilities. The testing compares the values provided by this technique to the observed values.<\/p>\n<p>A good measure of the precision of a binary classification model is the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/testing-analysis#RocCurve\">ROC curve<\/a>. Furthermore, the ROC curve analysis returns the optimal value for the decision threshold = 0.63.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/www.neuraldesigner.com\/images\/raisin_ROC_chart.webp\" \/><\/p>\n<p>We are interested in the area under the curve (AUC). A perfect classifier would have an AUC=1, and a random one would have an AUC=0.5.<\/p>\n<p>Our model has an <b>AUC\u00a0<\/b><span style=\"box-sizing: border-box; margin: 0px; padding: 0px;\">of<strong>\u00a00.942<\/strong>, which is a good indicator of our model&#8217;s performance<\/span>.<\/p>\n<p>We can also look at the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/testing-analysis#ConfusionMatrix\">confusion matrix<\/a>.\u00a0Next, we show the elements of this matrix for a <b style=\"color: var( --e-global-color-text ); font-family: var( --e-global-typography-text-font-family ), Sans-serif;\">decision threshold = 0.63<\/b>.<\/p>\n<table>\n<tbody>\n<tr>\n<th><\/th>\n<th>Predicted positive<\/th>\n<th>Predicted negative<\/th>\n<\/tr>\n<tr>\n<th>Real positive<\/th>\n<td style=\"text-align: right;\">87 (48.3%)<\/td>\n<td style=\"text-align: right;\">4 (2.2%)<\/td>\n<\/tr>\n<tr>\n<th>Real negative<\/th>\n<td style=\"text-align: right;\">14 (7.8%)<\/td>\n<td style=\"text-align: right;\">75 (41.7%)<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>From the above confusion matrix, we can calculate the following <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/testing-analysis#BinaryClassificationTests\">binary classification tests<\/a>:<\/p>\n<ul>\n<li><b>Classification accuracy: 90%<\/b> (ratio of correctly classified samples).<\/li>\n<li><b>Error rate: 10%<\/b> (ratio of misclassified samples).<\/li>\n<li><b>Sensitivity: 95.6%<\/b> (percentage of actual positives classified as positive).<\/li>\n<li><b>Specificity: 84.26%<\/b> (percentage of actual negatives classified as negative).<\/li>\n<\/ul>\n<\/section>\n<section>\n<h3 id=\"ModelDeployment\">7. Model deployment<\/h3>\n<p>Once we have tested the raisin model classification, we can use it to evaluate the probability selection:<\/p>\n<p>For instance, consider a raisin with the following features:<\/p>\n<ul>\n<li>Area: 80804.1<\/li>\n<li>MajorAxisLenght: 410.93<\/li>\n<li>MinorAxisLenght: 224.488<\/li>\n<li>Eccentricity: 86186.1<\/li>\n<li>ConvexArea: 86186.1<\/li>\n<li>Extent: 0.599<\/li>\n<li>Perimeter: 1005.91<\/li>\n<li>Class(1=Kecimen): 0.915<\/li>\n<\/ul>\n<p>The probability of Kecimen for this raisin is: 91.5%.<\/p>\n<p><!--\n\nFinally, the file bank_churn.py contains the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/model-deployment#MathematicalExpression\">mathematical expression<\/a> of the neural network in the Python programming language.\nThis file can be embedded in the bank's CRM to facilitate the work of the Retention Department.\n\n--><\/p>\n<p>We can export the <a href=\"https:\/\/www.neuraldesigner.com\/learning\/tutorials\/model-deployment#MathematicalExpression\">mathematical expression<\/a> of the neural network to any raisin factory to facilitate the work of classification.<br \/>\nThis expression is listed below.<\/p>\n<pre>scaled_Area = (Area-87804.10156)\/38980.39844;\r\nscaled_MajorAxisLength = (MajorAxisLength-430.9299927)\/115.9710007;\r\nscaled_MinorAxisLength = (MinorAxisLength-254.4880066)\/49.96110153;\r\nscaled_Eccentricity = (Eccentricity-0.7815420032)\/0.09026820213;\r\nscaled_ConvexArea = (ConvexArea-91186.10156)\/40746.60156;\r\nscaled_Extent = (Extent-0.6995080113)\/0.05343849957;\r\nscaled_Perimeter = (Perimeter-1165.910034)\/273.6119995;\r\nperceptron_layer_1_output_0 = tanh( 0.625073 + (scaled_Area*0.47795) + (scaled_MajorAxisLength*0.54666) + (scaled_MinorAxisLength*0.222985) + (scaled_Eccentricity*0.277638) + (scaled_ConvexArea*0.506997) + (scaled_Extent*0.77402) + (scaled_Perimeter*1.16189) );\r\nperceptron_layer_1_output_1 = tanh( 0.661286 + (scaled_Area*0.00797501) + (scaled_MajorAxisLength*-0.703279) + (scaled_MinorAxisLength*-0.0445966) + (scaled_Eccentricity*0.069447) + (scaled_ConvexArea*-0.392766) + (scaled_Extent*-0.24135) + (scaled_Perimeter*-1.36504) );\r\nperceptron_layer_1_output_2 = tanh( -0.0796286 + (scaled_Area*1.34031) + (scaled_MajorAxisLength*0.191064) + (scaled_MinorAxisLength*0.612609) + (scaled_Eccentricity*0.207755) + (scaled_ConvexArea*-0.557862) + (scaled_Extent*-0.0264986) + (scaled_Perimeter*-2.60166) );\r\nprobabilistic_layer_combinations_0 = -0.90159 +0.58348*perceptron_layer_1_output_0 +1.53865*perceptron_layer_1_output_1 +3.4659*perceptron_layer_1_output_2 \r\nClass = 1.0\/(1.0 + exp(-probabilistic_layer_combinations_0) );\t\r\n<\/pre>\n<p>In conclusion, we have to build a predictive model to determine the kind of raisin.<\/p>\n<\/section>\n<section>\n<h2>References<\/h2>\n<ul>\n<li><a href=\"https:\/\/archive.ics.uci.edu\/ml\/datasets\/Raisin+Dataset\">Raisin Dataset<\/a><\/li>\n<\/ul>\n<\/section>\n<section>\n<h2>Related posts<\/h2>\n<\/section>\n","protected":false},"author":24,"featured_media":1632,"template":"","categories":[],"tags":[49],"class_list":["post-3415","blog","type-blog","status-publish","has-post-thumbnail","hentry","tag-food"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v26.4 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Classify raisins using machine learning<\/title>\n<meta name=\"description\" content=\"Build a machine learning model to classify raisins between two types based on the features of the raisins for subsequent use.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Classify raisins using machine learning\" \/>\n<meta property=\"og:description\" content=\"Build a machine learning model to classify raisins between two types based on the features of the raisins for subsequent use.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/\" \/>\n<meta property=\"og:site_name\" content=\"Neural Designer\" \/>\n<meta property=\"article:modified_time\" content=\"2025-09-09T15:38:51+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/raisin-title.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"627\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:site\" content=\"@NeuralDesigner\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"7 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/\",\"url\":\"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/\",\"name\":\"Classify raisins using machine learning\",\"isPartOf\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/raisin-title.jpg\",\"datePublished\":\"2023-08-31T10:59:21+00:00\",\"dateModified\":\"2025-09-09T15:38:51+00:00\",\"description\":\"Build a machine learning model to classify raisins between two types based on the features of the raisins for subsequent use.\",\"breadcrumb\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/#primaryimage\",\"url\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/raisin-title.jpg\",\"contentUrl\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/raisin-title.jpg\",\"width\":1200,\"height\":627},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.neuraldesigner.com\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Blog\",\"item\":\"https:\/\/www.neuraldesigner.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Classify raisins using machine learning\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.neuraldesigner.com\/#website\",\"url\":\"https:\/\/www.neuraldesigner.com\/\",\"name\":\"Neural Designer\",\"description\":\"Explanable AI Platform\",\"publisher\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.neuraldesigner.com\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.neuraldesigner.com\/#organization\",\"name\":\"Neural Designer\",\"url\":\"https:\/\/www.neuraldesigner.com\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.neuraldesigner.com\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/05\/logo-neural-1.png\",\"contentUrl\":\"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/05\/logo-neural-1.png\",\"width\":1024,\"height\":223,\"caption\":\"Neural Designer\"},\"image\":{\"@id\":\"https:\/\/www.neuraldesigner.com\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/x.com\/NeuralDesigner\",\"https:\/\/es.linkedin.com\/showcase\/neuraldesigner\/\"]}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Classify raisins using machine learning","description":"Build a machine learning model to classify raisins between two types based on the features of the raisins for subsequent use.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/","og_locale":"en_US","og_type":"article","og_title":"Classify raisins using machine learning","og_description":"Build a machine learning model to classify raisins between two types based on the features of the raisins for subsequent use.","og_url":"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/","og_site_name":"Neural Designer","article_modified_time":"2025-09-09T15:38:51+00:00","og_image":[{"width":1200,"height":627,"url":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/raisin-title.jpg","type":"image\/jpeg"}],"twitter_card":"summary_large_image","twitter_site":"@NeuralDesigner","twitter_misc":{"Est. reading time":"7 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/","url":"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/","name":"Classify raisins using machine learning","isPartOf":{"@id":"https:\/\/www.neuraldesigner.com\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/#primaryimage"},"image":{"@id":"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/#primaryimage"},"thumbnailUrl":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/raisin-title.jpg","datePublished":"2023-08-31T10:59:21+00:00","dateModified":"2025-09-09T15:38:51+00:00","description":"Build a machine learning model to classify raisins between two types based on the features of the raisins for subsequent use.","breadcrumb":{"@id":"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/#primaryimage","url":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/raisin-title.jpg","contentUrl":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/06\/raisin-title.jpg","width":1200,"height":627},{"@type":"BreadcrumbList","@id":"https:\/\/www.neuraldesigner.com\/blog\/raisin-classification\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.neuraldesigner.com\/"},{"@type":"ListItem","position":2,"name":"Blog","item":"https:\/\/www.neuraldesigner.com\/blog\/"},{"@type":"ListItem","position":3,"name":"Classify raisins using machine learning"}]},{"@type":"WebSite","@id":"https:\/\/www.neuraldesigner.com\/#website","url":"https:\/\/www.neuraldesigner.com\/","name":"Neural Designer","description":"Explanable AI Platform","publisher":{"@id":"https:\/\/www.neuraldesigner.com\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.neuraldesigner.com\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.neuraldesigner.com\/#organization","name":"Neural Designer","url":"https:\/\/www.neuraldesigner.com\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.neuraldesigner.com\/#\/schema\/logo\/image\/","url":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/05\/logo-neural-1.png","contentUrl":"https:\/\/www.neuraldesigner.com\/wp-content\/uploads\/2023\/05\/logo-neural-1.png","width":1024,"height":223,"caption":"Neural Designer"},"image":{"@id":"https:\/\/www.neuraldesigner.com\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/x.com\/NeuralDesigner","https:\/\/es.linkedin.com\/showcase\/neuraldesigner\/"]}]}},"_links":{"self":[{"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/blog\/3415","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/blog"}],"about":[{"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/types\/blog"}],"author":[{"embeddable":true,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/users\/24"}],"version-history":[{"count":0,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/blog\/3415\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/media\/1632"}],"wp:attachment":[{"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/media?parent=3415"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/categories?post=3415"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.neuraldesigner.com\/api\/wp\/v2\/tags?post=3415"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}