{"id":27711,"date":"2020-01-14T00:00:00","date_gmt":"2020-01-13T23:00:00","guid":{"rendered":"https:\/\/blexin.com\/feature-crossing-per-migliorare-il-nostro-modello-ml\/"},"modified":"2021-05-20T18:44:14","modified_gmt":"2021-05-20T16:44:14","slug":"feature-crossing-to-improve-our-ml-model","status":"publish","type":"post","link":"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/","title":{"rendered":"Feature crossing to improve our ML model"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"608\" data-attachment-id=\"27673\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image00-14-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image00-14.png?fit=1024%2C608&amp;ssl=1\" data-orig-size=\"1024,608\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image00-14\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image00-14.png?fit=1024%2C608&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image00-14.png?resize=1024%2C608&#038;ssl=1\" alt=\"\" class=\"wp-image-27673\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image00-14.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image00-14-980x582.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image00-14-480x285.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">We continue our journey in the Machine Learning world we started with previous articles. We started with a dataset related to soccer matches of the Serie A. Still, we don\u2019t know if these data allow us to create a predictive model or not, unlike those standard ones for ML courses.&nbsp;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the&nbsp;<a href=\"https:\/\/www.blexin.com\/en-US\/Article\/Blog\/Is-Machine-Learning-a-programmable-washing-machine-55\" target=\"_blank\" rel=\"noreferrer noopener\">first article<\/a>, we used the cloud portal Azure Machine Learning to explore data, trying to optimize available&nbsp;<strong>features<\/strong>, thanks to some classical techniques.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In the&nbsp;<a href=\"https:\/\/www.blexin.com\/en-US\/Article\/Blog\/How-to-create-a-model-for-Machine-Learning-with-MLNET-65\" target=\"_blank\" rel=\"noreferrer noopener\">second article<\/a>, we created a console application in Visual Studio, which generated a model based on available data, thanks to the ML.Net library. What can we expect from this model? Which would be the prediction precision that player&nbsp;<strong>X<\/strong>&nbsp;will play&nbsp;<strong>n<\/strong>&nbsp;minutes or score&nbsp;<strong>n<\/strong>&nbsp;goals or collect n yellow cards?<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The typical mistake, made while measuring the precision of a prediction, is to use the starting dataset (we can call it<strong><em>&nbsp;training<\/em><\/strong>&nbsp;dataset). The model will be obviously accurate in predicting data used to build it, but it will have low accuracy when evaluating new data.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Model performances should be evaluated based on a sample of data not used to build it. We need to keep some data out of the training dataset and, starting from them, test their accuracy. This data subset is called&nbsp;<strong><em>validation data<\/em><\/strong>.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"733\" height=\"576\" data-attachment-id=\"27675\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image01-10-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image01-10.png?fit=733%2C576&amp;ssl=1\" data-orig-size=\"733,576\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image01-10\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image01-10.png?fit=733%2C576&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image01-10.png?resize=733%2C576&#038;ssl=1\" alt=\"\" class=\"wp-image-27675\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image01-10.png 733w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image01-10-480x377.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 733px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">(source&nbsp;<a href=\"https:\/\/cdn-media-1.freecodecamp.org\/images\/augTyKVuV5uvIJKNnqUf3oR1K5n7E8DaqirO\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/cdn-media-1.freecodecamp.org\/images\/augTyKVuV5uvIJKNnqUf3oR1K5n7E8DaqirO<\/a>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">How can we create validation data? The answer to this simple question would need a dedicated article in which to describe all available techniques, their validity, and feasibility. The only chance we have, as&nbsp;<strong><em>absolute beginners<\/em><\/strong>, is relying on existing tools.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We remain in the Microsoft world (similar tools also exist for Amazon and Google clouds) with the ML.NET library, we discovered in the previous article. This time we won\u2019t work in a console application on Visual Studio, but we install the ML.NET CLI (Command User Interface)&nbsp; globally. The only requisite is to install the .NET Core SDK on your machine.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>dotnet tool install -g mlnet<\/code><\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"286\" data-attachment-id=\"27678\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image02-9-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image02-9.png?fit=1171%2C327&amp;ssl=1\" data-orig-size=\"1171,327\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image02-9\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image02-9.png?fit=1024%2C286&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image02-9.png?resize=1024%2C286&#038;ssl=1\" alt=\"\" class=\"wp-image-27678\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image02-9-1024x286.png 1024w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image02-9-980x274.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image02-9-480x134.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The documentation suggests us to create a console application in an empty folder<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"998\" height=\"142\" data-attachment-id=\"27680\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image03-8-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image03-8.png?fit=998%2C142&amp;ssl=1\" data-orig-size=\"998,142\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image03-8\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image03-8.png?fit=998%2C142&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image03-8.png?resize=998%2C142&#038;ssl=1\" alt=\"\" class=\"wp-image-27680\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image03-8.png 998w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image03-8-980x139.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image03-8-480x68.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 998px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">and to launch inside it the command&nbsp;<strong><em>mlnet autotrain<\/em><\/strong>&nbsp;on our dataset (which we copied in the same folder). The complete command is:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>mlnet auto-train --task regression --dataset \"data.csv\" --label-column-name \"Minutes\" --max-exploration-time 500<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We must choose the parameter &#8212;<strong>task<\/strong>&nbsp;among Binary Classification, Multiclass Classification e Regression. Since we need to predict a numerical value (for example Minutes or Goals), we choose Regression;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong><em>&#8211;dataset<\/em><\/strong>&nbsp;indicates the file containing our data sample,&nbsp;<strong>&#8211;label-column<\/strong>&nbsp;indicates the file column we want to predict;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>&#8211;max-exploration-time<\/strong>&nbsp;indicates the time (in seconds) we want to give to ML.NET to explore different models. This parameter (also said training time) must be proportionate to the dataset size.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">During this time interval, the CLI indicates how much time lacks, the precision of the best model (<strong><em>Best Accuracy<\/em><\/strong>), the algorithm used to reach it (<strong><em>Best Algorithm<\/em><\/strong>), and the last analyzed algorithm (<strong><em>Last Algorithm<\/em><\/strong>);<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"979\" height=\"110\" data-attachment-id=\"27683\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image04-9-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image04-9.png?fit=979%2C110&amp;ssl=1\" data-orig-size=\"979,110\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image04-9\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image04-9.png?fit=979%2C110&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image04-9.png?resize=979%2C110&#038;ssl=1\" alt=\"\" class=\"wp-image-27683\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image04-9.png 979w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image04-9-480x54.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 979px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">As we explored 106 models, the final result is:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"313\" data-attachment-id=\"27685\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image05-10-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image05-10.png?fit=1387%2C424&amp;ssl=1\" data-orig-size=\"1387,424\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image05-10\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image05-10.png?fit=1024%2C313&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image05-10.png?resize=1024%2C313&#038;ssl=1\" alt=\"\" class=\"wp-image-27685\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image05-10-980x300.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image05-10-480x147.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">A 45% Best quality is not an extraordinary result, but not even bad if we consider we started from ground zero.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We note that the CLI has also created a C# code template, that uses the generated model (<strong><em>MLModel.zip<\/em><\/strong>).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"543\" height=\"300\" data-attachment-id=\"27687\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image06-9-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image06-9.png?fit=543%2C300&amp;ssl=1\" data-orig-size=\"543,300\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image06-9\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image06-9.png?fit=543%2C300&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image06-9.png?resize=543%2C300&#038;ssl=1\" alt=\"\" class=\"wp-image-27687\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image06-9.png 543w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image06-9-480x265.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 543px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The code of the console application (<strong><em>SampleRegression.ConsoleApp<\/em><\/strong>) is very simple: as we upload the model, a prediction engine is generated starting from it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>MLContext mlContext = new MLContext();<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>var mlModel = mlContext.Model.Load(GetAbsolutePath(MODEL_FILEPATH), out DataViewSchema inputSchema);<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>var predEngine = mlContext.Model.CreatePredictionEngine&lt;ModelInput, ModelOutput&gt;(mlModel);<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The prediction engine offers a method called&nbsp;<em>Predict<\/em>, which takes in input a line of new features. The model returns the prediction on the label searched by the model (Minutes in our case)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><code>ModelOutput predictionResult = predEngine.Predict(newData);<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For demonstration purposes, the generated template takes as input a line from the starting file (data.csv), showing the generated output and comparing it with the real value.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"507\" height=\"76\" data-attachment-id=\"27690\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image07-9-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image07-9.png?fit=507%2C76&amp;ssl=1\" data-orig-size=\"507,76\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image07-9\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image07-9.png?fit=507%2C76&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image07-9.png?resize=507%2C76&#038;ssl=1\" alt=\"\" class=\"wp-image-27690\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image07-9.png 507w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image07-9-480x72.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) 507px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The ML-NET CLI is then a tool simple but powerful while automates a series of recurring and complex operations. Its employment allows us to move the attention to the real problem: the validity of our dataset and its prediction capability. For example, we can quickly test what happens if we change the Label (Goals instead of Minutes). The best quality decreases to 31%. Another test is to reduce the number of features in the dataset (if you remove, for example, names of teams involved and the identity of the player).<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"353\" data-attachment-id=\"27692\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image08-7-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image08-7.png?fit=1406%2C484&amp;ssl=1\" data-orig-size=\"1406,484\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image08-7\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image08-7.png?fit=1024%2C353&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image08-7.png?resize=1024%2C353&#038;ssl=1\" alt=\"\" class=\"wp-image-27692\" srcset=\"https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image08-7-980x337.png 980w, https:\/\/blexin.com\/wp-content\/uploads\/2020\/12\/image08-7-480x165.png 480w\" sizes=\"auto, (min-width: 0px) and (max-width: 480px) 480px, (min-width: 481px) and (max-width: 980px) 980px, (min-width: 981px) 1024px, 100vw\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">The best quality on prediction of Minutes decreases even more: from 45% to 27%.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The&nbsp;<strong><em>brute-force<\/em><\/strong>&nbsp;approach that is blindly relying on a software seems cannot bring us to a satisfactory result. Why? The answer is again in the construction and selection of features.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We start from a consideration apparently independent from the machine learning context: we are so good in solving linear problems.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"301\" height=\"297\" data-attachment-id=\"27694\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image09-6-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image09-6.png?fit=301%2C297&amp;ssl=1\" data-orig-size=\"301,297\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image09-6\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image09-6.png?fit=301%2C297&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image09-6.png?resize=301%2C297&#038;ssl=1\" alt=\"\" class=\"wp-image-27694\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">(source:&nbsp;<a href=\"https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity<\/a>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For example: are we able to find a line that separates blue dots from orange ones? Well, sure we are! We can\u2019t have a perfect separation, but most of the blue dots will surely be on the right side of the separation line.<br>What can we say about the following image instead?<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"322\" height=\"316\" data-attachment-id=\"27697\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image10-4-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image10-4.png?fit=322%2C316&amp;ssl=1\" data-orig-size=\"322,316\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image10-4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image10-4.png?fit=322%2C316&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image10-4.png?resize=322%2C316&#038;ssl=1\" alt=\"\" class=\"wp-image-27697\" srcset=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image10-4.png?w=322&amp;ssl=1 322w, https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image10-4.png?resize=300%2C294&amp;ssl=1 300w\" sizes=\"auto, (max-width: 322px) 100vw, 322px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">(source:&nbsp;<a href=\"https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity&nbsp;<\/a>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This time we can\u2019t find a unique separation line:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"329\" height=\"318\" data-attachment-id=\"27699\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image11-4-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image11-4.png?fit=329%2C318&amp;ssl=1\" data-orig-size=\"329,318\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image11-4\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image11-4.png?fit=329%2C318&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image11-4.png?resize=329%2C318&#038;ssl=1\" alt=\"\" class=\"wp-image-27699\" srcset=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image11-4.png?w=329&amp;ssl=1 329w, https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image11-4.png?resize=300%2C290&amp;ssl=1 300w\" sizes=\"auto, (max-width: 329px) 100vw, 329px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">(source:&nbsp;<a href=\"https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity&nbsp;<\/a>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This is a nonlinear problem that can be solved by introducing what is called&nbsp;<strong>feature cross<\/strong>, which is a new artificial feature created from those already existing. Let\u2019s come back to the last image and suppose we want to move the reference system as follows:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"214\" height=\"207\" data-attachment-id=\"27701\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image12-3-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image12-3.png?fit=214%2C207&amp;ssl=1\" data-orig-size=\"214,207\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image12-3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image12-3.png?fit=214%2C207&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image12-3.png?resize=214%2C207&#038;ssl=1\" alt=\"\" class=\"wp-image-27701\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">(source:&nbsp;<a href=\"https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity&nbsp;<\/a>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If x1 and x2 are both positive or both negative in relation to this new reference system, we have a blue dot. On the contrary, we have an orange dot.<br>We can introduce then a feature cross, x3, obtained multiplying x1 and x2.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>x3 = x1 * x2<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">x3 can linearize our problem because its sign is able to separate blue from orange dots!<br>If I write the most general linear relation in terms of x1, x2, x3:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>y = w1 * x1 + w2 * x2 + w3 * x3 + b<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Supposing w1 and w2 are identical to 0 and w3=1, I find a separation line, even if the problem is not linear.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We can create a feature cross in many ways: multiplying five features or a feature for itself.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The introduction of a new reference system has been decisive in our example. It has been a trick, or it has a more hidden meaning? What we have done is to discretize the space of our dots and divide them into quarters, any of which has one-color inhabitants.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Incidentally, the number of inhabitants in each sector was very high. For each quadrant, we have a very high probability that a point is one of two colors.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">So, if I have a new dot and I find that it is in the first quadrant&nbsp;(x1 and x2 &gt; 0), I have a very high probability that the dot is blue.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Let\u2019s take a more complex example:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"262\" height=\"238\" data-attachment-id=\"27704\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image13-2-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image13-2.png?fit=262%2C238&amp;ssl=1\" data-orig-size=\"262,238\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image13-2\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image13-2.png?fit=262%2C238&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image13-2.png?resize=262%2C238&#038;ssl=1\" alt=\"\" class=\"wp-image-27704\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">(source:&nbsp;<a href=\"https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity<\/a>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">This time four sectors are not enough to discretize our space. But we can imagine a grid of this type:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"215\" height=\"207\" data-attachment-id=\"27706\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image14-3-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image14-3.png?fit=215%2C207&amp;ssl=1\" data-orig-size=\"215,207\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image14-3\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image14-3.png?fit=215%2C207&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image14-3.png?resize=215%2C207&#038;ssl=1\" alt=\"\" class=\"wp-image-27706\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">(source:&nbsp;<a href=\"https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity&nbsp;<\/a>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">and for each square I will have a high percentage of dots belonging to a single category.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img data-recalc-dims=\"1\" loading=\"lazy\" decoding=\"async\" width=\"229\" height=\"203\" data-attachment-id=\"27708\" data-permalink=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/attachment\/image15-1-2\/\" data-orig-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image15-1.png?fit=229%2C203&amp;ssl=1\" data-orig-size=\"229,203\" data-comments-opened=\"0\" data-image-meta=\"{&quot;aperture&quot;:&quot;0&quot;,&quot;credit&quot;:&quot;&quot;,&quot;camera&quot;:&quot;&quot;,&quot;caption&quot;:&quot;&quot;,&quot;created_timestamp&quot;:&quot;0&quot;,&quot;copyright&quot;:&quot;&quot;,&quot;focal_length&quot;:&quot;0&quot;,&quot;iso&quot;:&quot;0&quot;,&quot;shutter_speed&quot;:&quot;0&quot;,&quot;title&quot;:&quot;&quot;,&quot;orientation&quot;:&quot;0&quot;}\" data-image-title=\"image15-1\" data-image-description=\"\" data-image-caption=\"\" data-large-file=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image15-1.png?fit=229%2C203&amp;ssl=1\" src=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image15-1.png?resize=229%2C203&#038;ssl=1\" alt=\"\" class=\"wp-image-27708\"\/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">(source:&nbsp;<a href=\"https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/developers.google.com\/machine-learning\/crash-course\/feature-crosses\/encoding-nonlinearity<\/a>)<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The technique of feature crossing requires the memorization of how we discretize our space of dots. Besides, for each cell, we must have a enough dots to make its percentage of the population statistically significant. For this reason, it is a technique that only in the last years of the ML\u2019s life has taken hold: we need so much data to make it effective.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Are you confused? Here\u2019s one last example that I hope will clarify your ideas.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Suppose you have a picture of a car taken in a city. From the picture, you can only see the detail of the car\u2019s color. We wonder if it is a taxi or not. The dataset that we will use to build a predictive model will be<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Color: Red, City: Napoli. Taxi? No<br>Color: White, City: Napoli. Taxi? Yes<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2026\u2026\u2026\u2026\u2026.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Color: Yellow, City: New York. Taxi? Yes<br>Color: White, City: New York. Taxi? No<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The linear model that uses color and city and calculates its weights has a problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Suppose we have a new photo in which we see a yellow car.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In most cities of the world, the color of taxis is yellow: so, we will have a very high weight for this color, and we will assign the label as Taxi even if the photo was taken in Naples.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The feature cross created by the Color and City combination, instead, linearizes the problem.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">x3 = (Red and Napoli) Taxi? No<br>x3 = (White and Napoli) Taxi? Yes<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u2026\u2026\u2026\u2026\u2026.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">x3 = (Yellow and New York) Taxi? Yes<br>x3 = (White and New York) Taxi? No<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">We discretized our space, and every single combination of color and city (what we called square before) has a very high (or very low) probability of the Taxi label. The new picture showing a white car in New York will have a high percentage that it is a taxi. Because in our starting dataset, we had, for example, 1000 photos of white cars taken in New York, and 80% of them were a taxi.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Our football dataset is reasonably large to be able to apply the feature crossing technique in such a way as to linearize our space and make more efficient the model generated by ML.NET. In the next article, we\u2019ll see how.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">See you soon!<\/p>\n\n\n\n\n","protected":false},"excerpt":{"rendered":"<p>Let\u2019s see how evaluating the ML models efficiency and trying to improve it with feature crossing technique<\/p>\n","protected":false},"author":196716245,"featured_media":27673,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_et_pb_use_builder":"off","_et_pb_old_content":"","_et_gb_content_width":"","_coblocks_attr":"","_coblocks_dimensions":"","_coblocks_responsive_height":"","_coblocks_accordion_ie_support":"","_crdt_document":"","inline_featured_image":false,"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"_wpas_customize_per_network":false},"categories":[688637524],"tags":[688637452],"class_list":["post-27711","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog-en","tag-machinelearning-en"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.3 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Feature crossing to improve our ML model - Blexin<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Feature crossing to improve our ML model - Blexin\" \/>\n<meta property=\"og:description\" content=\"Let\u2019s see how evaluating the ML models efficiency and trying to improve it with feature crossing technique\" \/>\n<meta property=\"og:url\" content=\"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/\" \/>\n<meta property=\"og:site_name\" content=\"Blexin\" \/>\n<meta property=\"article:published_time\" content=\"2020-01-13T23:00:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2021-05-20T16:44:14+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image00-14.png?fit=1024%2C608&ssl=1\" \/>\n\t<meta property=\"og:image:width\" content=\"1024\" \/>\n\t<meta property=\"og:image:height\" content=\"608\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Salvatore Sorrentino\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Salvatore Sorrentino\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"8 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/feature-crossing-to-improve-our-ml-model\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/feature-crossing-to-improve-our-ml-model\\\/\"},\"author\":{\"name\":\"Salvatore Sorrentino\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/354db2bc97cac71c2ceeca21a92d5bed\"},\"headline\":\"Feature crossing to improve our ML model\",\"datePublished\":\"2020-01-13T23:00:00+00:00\",\"dateModified\":\"2021-05-20T16:44:14+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/feature-crossing-to-improve-our-ml-model\\\/\"},\"wordCount\":1630,\"image\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/feature-crossing-to-improve-our-ml-model\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/image00-14.png?fit=1024%2C608&ssl=1\",\"keywords\":[\"Machinelearning\"],\"articleSection\":[\"Blog\"],\"inLanguage\":\"en-US\"},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/feature-crossing-to-improve-our-ml-model\\\/\",\"url\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/feature-crossing-to-improve-our-ml-model\\\/\",\"name\":\"Feature crossing to improve our ML model - Blexin\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/feature-crossing-to-improve-our-ml-model\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/feature-crossing-to-improve-our-ml-model\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/image00-14.png?fit=1024%2C608&ssl=1\",\"datePublished\":\"2020-01-13T23:00:00+00:00\",\"dateModified\":\"2021-05-20T16:44:14+00:00\",\"author\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/354db2bc97cac71c2ceeca21a92d5bed\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/feature-crossing-to-improve-our-ml-model\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/feature-crossing-to-improve-our-ml-model\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/feature-crossing-to-improve-our-ml-model\\\/#primaryimage\",\"url\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/image00-14.png?fit=1024%2C608&ssl=1\",\"contentUrl\":\"https:\\\/\\\/i0.wp.com\\\/blexin.com\\\/wp-content\\\/uploads\\\/2020\\\/12\\\/image00-14.png?fit=1024%2C608&ssl=1\",\"width\":1024,\"height\":608},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/blog-en\\\/feature-crossing-to-improve-our-ml-model\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/blexin.com\\\/en\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Feature crossing to improve our ML model\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#website\",\"url\":\"https:\\\/\\\/blexin.com\\\/en\\\/\",\"name\":\"Blexin\",\"description\":\"Con noi \u00e8 semplice\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/blexin.com\\\/en\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/blexin.com\\\/en\\\/#\\\/schema\\\/person\\\/354db2bc97cac71c2ceeca21a92d5bed\",\"name\":\"Salvatore Sorrentino\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a6ec0dc827d2acaa55df9dbf1007e23f6fcb8c9436df52ab48274bb2221085bf?s=96&d=identicon&r=g\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a6ec0dc827d2acaa55df9dbf1007e23f6fcb8c9436df52ab48274bb2221085bf?s=96&d=identicon&r=g\",\"contentUrl\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/a6ec0dc827d2acaa55df9dbf1007e23f6fcb8c9436df52ab48274bb2221085bf?s=96&d=identicon&r=g\",\"caption\":\"Salvatore Sorrentino\"},\"url\":\"https:\\\/\\\/blexin.com\\\/en\\\/author\\\/salvatore-sorrentinoblexin-com\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Feature crossing to improve our ML model - Blexin","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:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/","og_locale":"en_US","og_type":"article","og_title":"Feature crossing to improve our ML model - Blexin","og_description":"Let\u2019s see how evaluating the ML models efficiency and trying to improve it with feature crossing technique","og_url":"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/","og_site_name":"Blexin","article_published_time":"2020-01-13T23:00:00+00:00","article_modified_time":"2021-05-20T16:44:14+00:00","og_image":[{"width":1024,"height":608,"url":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image00-14.png?fit=1024%2C608&ssl=1","type":"image\/png"}],"author":"Salvatore Sorrentino","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Salvatore Sorrentino","Est. reading time":"8 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/#article","isPartOf":{"@id":"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/"},"author":{"name":"Salvatore Sorrentino","@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/354db2bc97cac71c2ceeca21a92d5bed"},"headline":"Feature crossing to improve our ML model","datePublished":"2020-01-13T23:00:00+00:00","dateModified":"2021-05-20T16:44:14+00:00","mainEntityOfPage":{"@id":"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/"},"wordCount":1630,"image":{"@id":"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image00-14.png?fit=1024%2C608&ssl=1","keywords":["Machinelearning"],"articleSection":["Blog"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/","url":"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/","name":"Feature crossing to improve our ML model - Blexin","isPartOf":{"@id":"https:\/\/blexin.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/#primaryimage"},"image":{"@id":"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/#primaryimage"},"thumbnailUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image00-14.png?fit=1024%2C608&ssl=1","datePublished":"2020-01-13T23:00:00+00:00","dateModified":"2021-05-20T16:44:14+00:00","author":{"@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/354db2bc97cac71c2ceeca21a92d5bed"},"breadcrumb":{"@id":"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/#primaryimage","url":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image00-14.png?fit=1024%2C608&ssl=1","contentUrl":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image00-14.png?fit=1024%2C608&ssl=1","width":1024,"height":608},{"@type":"BreadcrumbList","@id":"https:\/\/blexin.com\/en\/blog-en\/feature-crossing-to-improve-our-ml-model\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/blexin.com\/en\/"},{"@type":"ListItem","position":2,"name":"Feature crossing to improve our ML model"}]},{"@type":"WebSite","@id":"https:\/\/blexin.com\/en\/#website","url":"https:\/\/blexin.com\/en\/","name":"Blexin","description":"Con noi \u00e8 semplice","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/blexin.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/blexin.com\/en\/#\/schema\/person\/354db2bc97cac71c2ceeca21a92d5bed","name":"Salvatore Sorrentino","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/a6ec0dc827d2acaa55df9dbf1007e23f6fcb8c9436df52ab48274bb2221085bf?s=96&d=identicon&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/a6ec0dc827d2acaa55df9dbf1007e23f6fcb8c9436df52ab48274bb2221085bf?s=96&d=identicon&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/a6ec0dc827d2acaa55df9dbf1007e23f6fcb8c9436df52ab48274bb2221085bf?s=96&d=identicon&r=g","caption":"Salvatore Sorrentino"},"url":"https:\/\/blexin.com\/en\/author\/salvatore-sorrentinoblexin-com\/"}]}},"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/i0.wp.com\/blexin.com\/wp-content\/uploads\/2020\/12\/image00-14.png?fit=1024%2C608&ssl=1","jetpack_shortlink":"https:\/\/wp.me\/pcyUBx-7cX","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/27711","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/users\/196716245"}],"replies":[{"embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/comments?post=27711"}],"version-history":[{"count":5,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/27711\/revisions"}],"predecessor-version":[{"id":31168,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/posts\/27711\/revisions\/31168"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/media\/27673"}],"wp:attachment":[{"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/media?parent=27711"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/categories?post=27711"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/blexin.com\/en\/wp-json\/wp\/v2\/tags?post=27711"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}