<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by John R. Ballesteros on Medium]]></title>
        <description><![CDATA[Stories by John R. Ballesteros on Medium]]></description>
        <link>https://medium.com/@jrballesteros?source=rss-f0d63b49f84------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*hLYVBDPT7T_4BzOT-To6TA.jpeg</url>
            <title>Stories by John R. Ballesteros on Medium</title>
            <link>https://medium.com/@jrballesteros?source=rss-f0d63b49f84------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 18:36:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@jrballesteros/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[A Step-by-Step Guide to Create a QGIS PlugIn Using Python]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@jrballesteros/a-step-by-step-guide-to-create-a-qgis-plugin-using-python-d8520ce22cbd?source=rss-f0d63b49f84------2"><img src="https://cdn-images-1.medium.com/max/642/1*f2RyTG8YOMeHAnI91nr_hw.png" width="642"></a></p><p class="medium-feed-snippet">QGIS is perhaps the most used free and open source GIS software in the planet.</p><p class="medium-feed-link"><a href="https://medium.com/@jrballesteros/a-step-by-step-guide-to-create-a-qgis-plugin-using-python-d8520ce22cbd?source=rss-f0d63b49f84------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@jrballesteros/a-step-by-step-guide-to-create-a-qgis-plugin-using-python-d8520ce22cbd?source=rss-f0d63b49f84------2</link>
            <guid isPermaLink="false">https://medium.com/p/d8520ce22cbd</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[gis]]></category>
            <category><![CDATA[qgis-plugins]]></category>
            <category><![CDATA[qgis]]></category>
            <dc:creator><![CDATA[John R. Ballesteros]]></dc:creator>
            <pubDate>Fri, 23 May 2025 00:11:49 GMT</pubDate>
            <atom:updated>2025-05-23T00:19:44.779Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Cómo Hablarle a ChatGPT para Que Haga Exactamente Lo Que Queremos]]></title>
            <link>https://medium.com/@jrballesteros/c%C3%B3mo-hablarle-a-chatgpt-para-que-haga-exactamente-lo-que-queremos-ee1b2c336042?source=rss-f0d63b49f84------2</link>
            <guid isPermaLink="false">https://medium.com/p/ee1b2c336042</guid>
            <category><![CDATA[negocios]]></category>
            <category><![CDATA[inteligencia-artifical]]></category>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[chatgpt]]></category>
            <dc:creator><![CDATA[John R. Ballesteros]]></dc:creator>
            <pubDate>Tue, 25 Feb 2025 02:24:28 GMT</pubDate>
            <atom:updated>2025-02-25T11:39:41.614Z</atom:updated>
            <content:encoded><![CDATA[<h4><strong>Dominando la Ingenieria de Prompts</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YfMKdFUxn-JCxJBxMZs49g.png" /><figcaption>Imagen generada con midjourney</figcaption></figure><p>Dominar la Ingeniería de Prompts, que no es más que cómo escribir instrucciones claras y efectivas para la IA, es un tema clave cuando se hace uso de las nuevas herramientas asociadas a la Inteligencia Artificial. Cada vez que utilizas un prompt bien elaborado, no solo mejoras la respuesta para tu tarea actual, sino que también aprendes principios que puedes aplicar a futuras interacciones con la IA. He probado los siguientes métodos para que ChatGPT me ayude con la escritura de textos, el análisis de datos y aún en otras áreas con excelentes resultados.</p><h3>Los Prompts Vagamente Definidos</h3><p>Uno de los errores más grandes es escribir instrucciones ambiguas que dejan demasiado a la interpretación. Imagina entrar a un restaurante y simplemente decir: “Quiero comida”. Es posible que recibas algo comestible, pero probablemente no será exactamente lo que anhelabas. Para obtener un buen prompt se sugiere usar los siguientes pasos:</p><h3>1. Especifica Claramente el Rol</h3><p>Comienza tu prompt con un rol específico, por ejemplo: “Actúa como un ingeniero o como un agente en compras”, es crucial. Esto le indica a la IA que adopte una perspectiva particular, lo que suele generar respuestas más estructuradas y de nivel experto. Veamos un ejemplo de un prompt que incluye un rol:</p><ul><li><strong>Antes (sin rol):</strong> “¿Cómo debo preguntarte sobre la redacción de entradas de blog?”</li><li><strong>Después (incluyendo el rol):</strong> “Actúa como un ingeniero experto en prompts con experiencia específica en creación de contenidos y blogs”</li></ul><p>La diferencia es significativa: el segundo prompt generalmente produce consejos detallados y metódicos en lugar de sugerencias generales.</p><h3>2. Define Tu Tarea</h3><p>La descripción de tu tarea debe ser absolutamente clara:</p><ul><li><strong>Resultado Exacto:</strong> ¿Qué necesitas exactamente? (por ejemplo: una guía paso a paso, un resumen, un ejemplo de…)</li><li><strong>Restricciones y Parámetros:</strong> ¿Existen requisitos específicos (tono, extensión, estructura)?</li><li><strong>Características Clave:</strong> ¿Cómo debe lucir el resultado final?</li><li><strong>Criterios de Éxito:</strong> ¿Cómo sabrás si el resultado es bueno?</li></ul><p>Por ejemplo, al solicitar prompts de marketing, especifica claramente si solo necesitas ayuda para crear líneas de asunto para emails, en lugar de recibir consejos para redes sociales, email y publicidad en general.</p><h3>3. Define el Formato de Salida</h3><p>Este es el elemento que muchos pasan por alto, pero es fundamental. Indica a la IA exactamente cómo deseas que se estructure la información:</p><ul><li>Explica tu razonamiento.</li><li>Proporciona un desglose paso a paso.</li><li>Ofrece ejemplos de lo que consideras una buena y una mala versión.</li><li>Separa claramente la explicación del prompt final.</li></ul><h3>4. Enriquece el Contexto</h3><p>El contexto es muy importante. Proporciona detalles de fondo, tales como:</p><ul><li>Tu nivel de experiencia con la IA.</li><li>El caso de uso previsto.</li><li>Intentos previos que no funcionaron.</li><li>Desafíos específicos que estás tratando de superar.</li></ul><h3>5. Da Explicaciones</h3><p>Esgrime las razones detrás de cada elemento para que ChatGPT entienda por qué es importante cada uno de ellos.</p><p>A continuación hagamos un ejemplo.</p><p><em>Prompt inicial:</em><br>“¿Cómo debo redactar una entrada de blog?”</p><p><em>Prompt mejorado:</em><br>“Actúa como un experto en creación de contenidos y blogs. Ayúdame a crear una entrada de blog atractiva. Mi blog es sobre Inteligencia Artificial, utiliza un lenguaje para directores empresariales no expertos en IA, el blog debe contener una pagina escrita en un lenguaje claro y profesional”</p><p><em>El resultado:</em></p><p><strong>Título: Inteligencia Artificial: Potenciando el Futuro Empresarial</strong></p><p>La Inteligencia Artificial (IA) está transformando la manera en que operan las empresas en todo el mundo. Aunque el término pueda sonar técnico, su impacto en la estrategia y en la eficiencia empresarial es cada vez más evidente y accesible. En esta entrada, exploraremos cómo la IA puede impulsar la innovación y mejorar la toma de decisiones en su organización, sin necesidad de ser un experto en tecnología.</p><p>¿Qué es la Inteligencia Artificial y por qué importa para los negocios?</p><p>La IA se refiere a la capacidad de las máquinas para imitar funciones cognitivas humanas, como el aprendizaje y la resolución de problemas. Para los directores empresariales, esto significa que herramientas basadas en IA pueden analizar grandes volúmenes de datos, detectar patrones y generar insights estratégicos que ayudan a optimizar procesos y anticipar tendencias del mercado.</p><p>Aplicaciones prácticas de la IA en el mundo empresarial</p><ul><li><strong>Optimización Operativa:</strong><br>La IA puede automatizar tareas rutinarias y mejorar la eficiencia de procesos logísticos y administrativos. Por ejemplo, algoritmos de análisis predictivo ayudan a optimizar la cadena de suministro, reduciendo costos y tiempos de entrega.</li><li><strong>Mejora en la Toma de Decisiones:</strong><br>Las soluciones basadas en IA pueden procesar datos en tiempo real para ofrecer recomendaciones precisas. Esto permite a los líderes empresariales tomar decisiones informadas y proactivas, basadas en datos concretos y análisis profundos.</li><li><strong>Atención al Cliente y Personalización:</strong><br>Chatbots y sistemas de recomendación impulsados por IA están transformando la experiencia del cliente. Estas herramientas permiten ofrecer servicios personalizados y resolver consultas de forma rápida, mejorando la satisfacción y fidelización.</li></ul><p>Cómo empezar: Estrategias para integrar la IA en su empresa</p><ol><li><strong>Identificar Oportunidades:</strong><br>Evalúe cuáles procesos de su empresa podrían beneficiarse de la automatización o el análisis avanzado de datos. La clave está en empezar con áreas de alto impacto, como la logística, la atención al cliente o la gestión financiera.</li><li><strong>Colaborar con Expertos:</strong><br>La implementación de soluciones de IA no requiere que usted sea un experto en tecnología. Lo ideal es colaborar con consultores o proveedores que puedan adaptar la tecnología a sus necesidades específicas.</li><li><strong>Invertir en Capacitación:</strong><br>Aunque no se espere que todos sean especialistas en IA, es fundamental que el equipo directivo comprenda los conceptos básicos y las oportunidades que ofrece. La formación y la actualización continua son inversiones estratégicas.</li></ol><p>Conclusión</p><p>La Inteligencia Artificial ya no es exclusiva de las grandes corporaciones tecnológicas; hoy, cualquier empresa puede aprovechar sus beneficios para impulsar el crecimiento y la innovación. Adoptar esta tecnología de manera estratégica le permitirá no solo optimizar sus operaciones, sino también anticiparse a las tendencias del mercado y mantenerse competitivo en un entorno en constante cambio.</p><p>Si bien la terminología y la tecnología pueden parecer complejas al principio, la clave está en enfocarse en las aplicaciones prácticas y los beneficios concretos que la IA puede ofrecer a su negocio. ¡El futuro empresarial ya está aquí, y la IA es su aliada para transformar desafíos en oportunidades!</p><p><strong>Prompt para generar la imagen de arriba</strong></p><p>“Crea una imagen futurista y minimalista que represente el ‘prompt engineering’. En la composición, incluye una computadora de alta tecnología con una pantalla que muestre líneas de código y fragmentos de texto simulando un prompt. Incorpora elementos visuales relacionados con la inteligencia artificial, como íconos y siluetas de circuitos, junto con nubes de diálogo o burbujas de texto que sugieran una comunicación fluida entre el humano y la máquina. Utiliza una paleta de colores fríos — predominantemente azules y grises — con acentos en colores brillantes que resalten la innovación. La imagen debe transmitir la idea de precisión, creatividad y colaboración entre la inteligencia humana y artificial en el proceso de creación de prompts efectivos.”</p><p>Déjame saber sí te gustó esta guía, si tienes comentarios y si usas maneras alternativas de escribir los Prompts, conectemos en LinkedIn <a href="http://www.linkedin.com/in/johnrballesteros">www.linkedin.com/in/johnrballesteros</a></p><p><em>Te gustó esta historia? No te pierdas más tips, ideas, e inspiración para ayudarte a ser más productivo. Sígueme en este blog y suscríbete para recibir actualizaciones de mis últimos posts directamente en tú inbox. Vamos a crear algo increíble juntos!</em></p><h3>Support me</h3><p>Enjoying my work? Show your support with <a href="https://www.buymeacoffee.com/jrballesteros">Buy me a coffee</a>, a simple way for you to encourage me and others to write. If you feel like it, just click the link and I will enjoy a <a href="https://www.buymeacoffee.com/jrballesteros">cup of coffee!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/0*QDfXQffPy_-modL7.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ee1b2c336042" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The 360 Camera Business Nobody’s Talking About (Yet)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@jrballesteros/how-to-make-money-with-your-360-camera-a-startup-guide-83d30df3c0ea?source=rss-f0d63b49f84------2"><img src="https://cdn-images-1.medium.com/max/1599/1*IGd2qA1CJh83nrTehVqQDQ.png" width="1599"></a></p><p class="medium-feed-snippet">Have you ever thought about turning your creativity and a 360 camera into a profitable business? With the rise of virtual experiences&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@jrballesteros/how-to-make-money-with-your-360-camera-a-startup-guide-83d30df3c0ea?source=rss-f0d63b49f84------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@jrballesteros/how-to-make-money-with-your-360-camera-a-startup-guide-83d30df3c0ea?source=rss-f0d63b49f84------2</link>
            <guid isPermaLink="false">https://medium.com/p/83d30df3c0ea</guid>
            <category><![CDATA[business]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[360-cameras]]></category>
            <category><![CDATA[money]]></category>
            <category><![CDATA[city-guide]]></category>
            <dc:creator><![CDATA[John R. Ballesteros]]></dc:creator>
            <pubDate>Wed, 08 Jan 2025 11:50:00 GMT</pubDate>
            <atom:updated>2025-08-31T18:17:11.215Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Make USD 300.000/year with Little Knowledge in GeoInformation]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@jrballesteros/how-to-make-usd-300-000-year-with-little-knowledge-in-geoinformation-dc0adbcb74bf?source=rss-f0d63b49f84------2"><img src="https://cdn-images-1.medium.com/max/1958/1*8iRpDh0I2WW1cteagQK4Bw.png" width="1958"></a></p><p class="medium-feed-snippet">Salaries in IT have sky rocketed in the past years, it is normal to talk about 100.000 usd/year or more in this field. However, having a&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@jrballesteros/how-to-make-usd-300-000-year-with-little-knowledge-in-geoinformation-dc0adbcb74bf?source=rss-f0d63b49f84------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@jrballesteros/how-to-make-usd-300-000-year-with-little-knowledge-in-geoinformation-dc0adbcb74bf?source=rss-f0d63b49f84------2</link>
            <guid isPermaLink="false">https://medium.com/p/dc0adbcb74bf</guid>
            <category><![CDATA[gis]]></category>
            <category><![CDATA[bussiness]]></category>
            <category><![CDATA[money-making-ideas]]></category>
            <category><![CDATA[startup-lessons]]></category>
            <category><![CDATA[drones]]></category>
            <dc:creator><![CDATA[John R. Ballesteros]]></dc:creator>
            <pubDate>Tue, 07 Jan 2025 15:04:22 GMT</pubDate>
            <atom:updated>2025-01-07T15:49:36.557Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The Brilliant Minds Behind Every AI Tool We Use Daily]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@jrballesteros/pioneers-of-artificial-intelligence-and-their-main-contributions-73a0306cb008?source=rss-f0d63b49f84------2"><img src="https://cdn-images-1.medium.com/max/1024/1*kW2Zd_eGP8lbUAi8TWH4rw.jpeg" width="1024"></a></p><p class="medium-feed-snippet">Want to have a general overview of who are the principal figures of the Ai arena and their main achievements? stay tuned and read the&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@jrballesteros/pioneers-of-artificial-intelligence-and-their-main-contributions-73a0306cb008?source=rss-f0d63b49f84------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@jrballesteros/pioneers-of-artificial-intelligence-and-their-main-contributions-73a0306cb008?source=rss-f0d63b49f84------2</link>
            <guid isPermaLink="false">https://medium.com/p/73a0306cb008</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[generative-ai-market]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[history-of-technology]]></category>
            <dc:creator><![CDATA[John R. Ballesteros]]></dc:creator>
            <pubDate>Sat, 02 Nov 2024 00:10:31 GMT</pubDate>
            <atom:updated>2025-08-31T18:11:32.947Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The Secret to Making Computers See Like Humans, No PhD Required]]></title>
            <link>https://medium.com/@jrballesteros/introduction-class-to-image-classification-using-deep-learning-72d60b2d8863?source=rss-f0d63b49f84------2</link>
            <guid isPermaLink="false">https://medium.com/p/72d60b2d8863</guid>
            <dc:creator><![CDATA[John R. Ballesteros]]></dc:creator>
            <pubDate>Fri, 27 Sep 2024 02:08:18 GMT</pubDate>
            <atom:updated>2025-08-31T18:04:05.496Z</atom:updated>
            <content:encoded><![CDATA[<p>Image classification using Deep Learning is a branch of computer vision that deals with <strong>categorizing images</strong> using a set of predetermined tags on which a Neural Network has been trained. There are different types of image classification, such as:</p><p><strong>Binary classification:</strong> It takes an either-or logic to label images, and classifies unknown data points into two categories. When the task is to categorize benign or malignant tumors, analyze product quality to find out whether it has defects or not, and many other problems that require yes/no answers are solved with binary classification. In summary, it is used to distinguish between two classes of objects.</p><p><strong>Multiclass:</strong> As the name suggests, it categorizes items into three or more classes. For example, classifying diseases, products, defects and so on into different categories. It’s also useful in other domains like Natural Language Processing (NLP), for instance in <a href="https://www.superannotate.com/blog/sentiment-analysis-explained">sentiment analysis</a>, where more than two emotions are present in a text.</p><p><strong>Multilabel:</strong> Unlike multiclass classification, where each image is assigned to exactly one object class, multilabel classification allows the object to be assigned to multiple labels. For example, a road can be paved, and unpaved, main, highway, etc. The same can happen with rivers, in a more daily example, a picture of a fruit salad will have red, orange, yellow, purple, and other colors depending on your creativity with fruit salads. As a result, one image will have multiple colors as labels.</p><p>Do not confuse image classification with other related tasks like image localization, image detection, image recognition, semantic segmentation or even image generation. Explanations for those other terms are the subject of future stories. Figure 1 shows an illustration of the output of those different terms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gFS65qxuy0_yKQH6w7Hzxw.png" /><figcaption>Figure 1. Different techniques applied over an image using Neural Networks.</figcaption></figure><h4>Neural Networks for Image Classification</h4><p>Since the same type of objects in an image can exhibit different sizes, colors, textures, angles and other characteristics, the use of a Fully Connected Network (FCN), Deep Neural Network (NN) or Multi Level Perceptron (MLP), all these terms refered to the same concept, is not enough to obtain good results when classifying images. Figure 2 shows this problem.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Kj-8ELK3ti8pVihiaPuo-w.png" /><figcaption>Figure 2. The effect of position in image classification using a NN.</figcaption></figure><p>So, scientist came with the idea of introducing into the Neural Networks a mathematical operator that is agnostic to scale, rotations, position, and other characteristics of objects within an image, and this is the Convolution. From there, the coined term of Convolutional Neural Networks. Figure 3 illustrates the Convolution operator.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eEWhZCZ6Aw00LC_Q31Ub5A.png" /><figcaption>Figure 3. The Convolution Operator</figcaption></figure><p>So what is exactly a convolution and how it works over an image?. It is a multiplication and then a sum of the values of pixels of the image by a kernel (filter). Figure 4 shows the convolution over an image with different kernel sizes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/904/1*oTYyRzQV4DGdQs1UQ3NWgQ.gif" /><figcaption>Figure 4. Convolutions</figcaption></figure><p>This operation extracts the characteristics of all the pixels in what is called a “feature map”. The interesting part is that little intervention is required to the specification of the size and number of kernels. Figure 5 illustrates a feature map.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/472/1*ED4bJ7oSTo6p92BEhP844A.png" /><figcaption>Figure 5. Feature Map</figcaption></figure><h4>Architecture of Convolutional Neural Networks for Image Classification</h4><p>The structure, shape, number of layers and operators employed in a Convolutional Neural Network (CNN) is called the architecture of the neural network. In general a Convolutional Neural Network to perform image classification has two parts, the first part is tipically the feature learning performed by convolutional layers, and the second and last part is the classification done by a set of fully connected layers. Figure 6 shows this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9GNX_N3zH1hXJNYRHHh7Ww.png" /><figcaption>Figure 6. The two parts of a Convolutional Neural Network for Image Classification.</figcaption></figure><p>The performance of the CNN depends on the specific architecture, so there are plenty of examples and variations to that to come up with good results. Two good seminal approaches are the following.</p><p><strong>VGG16 (19): </strong>It consists of 16 layers (13 convolutional layers + 3 fully connected layers) for the 16 version. In total it uses 138 million parameters. It suffers from the <strong>vanishing gradient problem. </strong>Which means that the values to feed weights values do not reach to the first layers and then the network does not converge. It scores 74.3% accuracy on the ImageNet dataset. This network was introduced in this paper: <a href="https://arxiv.org/abs/1409.1556">https://arxiv.org/abs/1409.1556</a></p><p>To avoid the mentioned problem, another approach was developed later in the same year by other authors.</p><p><strong>ResNet50 (100, 1000)</strong>: It consists of 50 layers (48 convolutional layers + 1 max pooling + 1 fully connected layer). It introduces <strong>skip </strong>or <strong>residual connections</strong>, which allows the gradient to flow more easily during backpropagation, helping the network train deeper without the vanishing gradient problem. It uses in total 25.6 million parameters which makes this network smaller and more consistent to train, makes a faster convergence, and needs a lower memory requirements. It scores 76.1% accuracy on the ImageNet dataset. There are other flavors of ResNet depending on the number of layers, for instance ResNet34. The paper that introduced this network is this: https://arxiv.org/abs/1512.03385</p><p>Figure 7 shows both architectures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8J9YdG8hDX-ThUjtGPNY0g.png" /><figcaption>Figure 7. VGG16 and ResNet50 architectures.</figcaption></figure><p>As mentioned previously ResNet50 has better results than VGG16, to illustrate this, Figure 8 compares the prediction when applying both networks on the same image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/831/1*Di3pB_705E5lOitCdUzU4A.png" /><figcaption>Figure 8. Results of VGG16 and ResNet50 on the same image.</figcaption></figure><h4>Benchmark Datasets for Image Classification</h4><p>With the time certain datasets became the base to train and compare the results obtained by different architectures and also to released pre-trained networks for image classification, which are the set of trained weights obtained in the feature learning part described above. Examples of the main datasets for Image Classifications are:</p><ul><li><strong><em>ImageNet: </em></strong>It is composed of 1.3 million images of various sizes around 500 pixels across, in 1,000 categories, it was created by the Laboratory of Computer Vision of Standford University.</li><li><strong><em>Cifar10: </em></strong>It consists of 60,000 images with a size of 32×32-pixels color images in 10 classes.</li><li><strong><em>Mnist: </em></strong>It is composed by 60,000 images of hand-written digits from 0 to 9, they are 28×28-pixel grayscale images. (<a href="http://yann.lecun.com/exdb/mnist/">http://yann.lecun.com/exdb/mnist/</a>) <a href="http://yann.lecun.com/">Yann LeCun</a>, et all.</li><li><strong><em>Planet: </em></strong>A multi-class satellite dataset of the Amazon Rainforest, it is available at: (https://www.kaggle.com/nikitarom/planets-dataset).</li></ul><h4>New Approaches</h4><p>The most recent is the one known as the <strong><em>Zero-Shot image classification, </em></strong>which consists of using a a pre-trained model to create a custom classifier without any training required, allowing to classify images of classes that were not explicitly seen during the training of the original model.</p><p>One way to do that is to train a model with images from the Internet and the text description for the images respectively, optimizing the relation between descriptions and images, in this way when a user specifies a promt, this is a description of an image, the model finds the image with the highest likelyhood to fit the description. The following paper explains the afore mentioned approach <a href="https://arxiv.org/pdf/2103.00020">https://arxiv.org/pdf/2103.00020</a>.</p><h4>Applications of Image Classification</h4><p>Some applications of Image Classiffication are simple yet poweful, for instance, these are examples:</p><ul><li>Is there a person in the image? for avoding to violate privacy.</li><li>People wearing mask or not.</li><li>People with glasses or not.</li></ul><h3>Support me</h3><p>Enjoying my work? Show your support with <a href="https://www.buymeacoffee.com/jrballesteros">Buy me a coffee</a>, a simple way for you to encourage me and others to write. If you feel like it, just click the link and I will enjoy a <a href="https://www.buymeacoffee.com/jrballesteros">cup of coffee!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/424/1*eAETqAzhI3IKHoqDUDibfw.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=72d60b2d8863" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[False Color Composite in Drone Imagery using GIS]]></title>
            <link>https://medium.com/@jrballesteros/false-color-composite-in-drone-imagery-using-a-gis-e20492f729fe?source=rss-f0d63b49f84------2</link>
            <guid isPermaLink="false">https://medium.com/p/e20492f729fe</guid>
            <category><![CDATA[cartography]]></category>
            <category><![CDATA[gis]]></category>
            <category><![CDATA[drone-imagery-services]]></category>
            <category><![CDATA[photogrammetry]]></category>
            <category><![CDATA[false-color-composites]]></category>
            <dc:creator><![CDATA[John R. Ballesteros]]></dc:creator>
            <pubDate>Tue, 27 Feb 2024 01:41:49 GMT</pubDate>
            <atom:updated>2024-04-12T01:16:06.298Z</atom:updated>
            <content:encoded><![CDATA[<p>The human eye has a limited capacity to perceive the full range of the electromagnetic spectrum, instead it only sees within a short interval called the visible spectrum. However, scientists have found a way to combine groups of wavelengths, or bands, in which certain objects are high-lighted on the Earth’s surface. The combination of bands is named as Color Composite Images. This story deep dives when the bands are combined not in the right order, or when other information, like objects’ height is used, creating in this way, a <strong><em>False Color Composite Image</em></strong>.</p><h3>Bands in Raster Information</h3><p>Some rasters have a single band, or layer (a measure of a single characteristic), of data, while others have multiple bands.</p><h4>Single Band Raster</h4><p>Basically, a band is represented by a single matrix of cell values, and a raster with multiple bands contains multiple spatially coincident matrices of cell values representing the same spatial area. A single-band orthophoto is sometimes called a panchromatic or grayscale image. Another example of a single-band raster dataset is a digital elevation model (DEM). Each cell in a DEM contains only one value representing surface elevation. A special case of a DEM is the Digital Terrain Model (DTM), that represents the height of the naked terrain, whereas the Digital Surface Model (DSM) represents the objects’ height when considering anthropic and not antropic objects, like cars and trees respectively. Most drone and satellite imagery have multiple bands, typically containing values within the range of the electromagnetic spectrum.</p><p>There are three main ways to display (render) single-band raster datasets:</p><ul><li>Using two colors — In a binary image, each cell has a value of 0 or 1 and is often displayed using black and white. This type of display is often used for displaying scanned maps with simple line work, such as parcel maps.</li><li>Grayscale — In a grayscale image, each cell has a value from 0 to another number, such as 255 for the case of 8 bit unsigned image (2e8), or 65535 (2e16) for a 16 bit unsigned image. These are often used for black-and-white aerial photographs.</li><li>Color map — One way to represent colors on an image in one band is with a color map. A set of values is coded to match a defined set of red, green, and blue (RGB) values.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*u_PcNgUU0YE0BVqYUba1vg.png" /><figcaption>Figure 1. The three main ways to display a single-band raster.</figcaption></figure><h4>Multi Band Raster</h4><p>When there are multiple bands, every cell location has more than one value associated with it. With multiple bands, each band usually represents a segment of the electromagnetic spectrum collected by a sensor. Bands can represent any portion of the electromagnetic spectrum, including ranges not visible to the eye, such as the infrared or ultraviolet sections. The term band originated from the reference to the color band on the electromagnetic spectrum. A combination of any three of the available bands in a multiband raster can be used to create RGB composites. By displaying bands together as RGB composites, often more information is gleaned than when working with just one band.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/363/1*Pj9HBKTO0vQLD6OuUSzyiQ.png" /><figcaption>Figure 2. An RGB or Color Composite Image.</figcaption></figure><p>A satellite or drone image, for example, commonly has multiple bands representing different wavelengths from the ultraviolet through the visible and infrared portions of the electromagnetic spectrum. Landsat imagery, for instance, is data collected from seven different bands of the electromagnetic spectrum. Bands 1–7, including 6, represent data from the visible, near infrared, and midinfrared regions. Band 6 collects data from the thermal infrared region. Another example of a multiband image is a true color orthophoto in which there are three bands, each representing either red, green, or blue light, this type of image is called Color Composite Image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*EcPmhn1t_NfYxO7J_xSCNg.png" /><figcaption>Figure 3. Panchromatic to RGB or Color Composite Image.</figcaption></figure><h3>False Color Composite Imagery in a GIS</h3><p>Two examples show the way to produce this type of imagery:</p><h4>ArcGIS</h4><p>The GIS industry leader helps to easily make False Color Composite imagery. First, it is needed to get every layer or band of a RGB image. There are two ways to do that, one is to simply drag every layer from the raster dataset when shown in the ArcCatalog tree of a file like in the Figure 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IMuhO3i6naC5Afph9uMuVA.png" /><figcaption>Figure 4. Drag and drop every pancromatic band.</figcaption></figure><p>Another way is to use the <strong><em>Make Raster Layer tool</em></strong> from the <strong><em>ArcToolbox</em></strong>, and pick the input Composite image and choose the single band output desired, for instance the band 1, the Red Band. See Figure 5.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LSkuYLi7yb8pvbyRjS8FkA.png" /><figcaption>Figure 5. Make Raster Layer tool to extract one band from a color composite image.</figcaption></figure><p>Once the independent bands are extracted by either of the previous two available ways, there are plenty of combinations between them, that can be performed. Most common ones are the result of changing the ordinary channel for each of the Red, Green and Blue colors. However, a less common one is to used objects’ height into one of the channels or sum up height to all of them (RGB+DSM), let’s do the first one, including interchanging the blue band by the DSM (RGDMS), to do that ArcGIS counts on the <strong><em>Composite Bands tool</em></strong> in the <strong><em>Raster Processing</em></strong> tab of the ArcToolbox. See figure 6.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7wp1lWqZUl_qQNZtbv6kXA.png" /><figcaption>Figure 6. Producing RG_DSM Composite Image using bands red, green and DSM instead of the blue band.</figcaption></figure><p>The result can be seen in Figure 7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*NIiotrGxEuE2Px71yihA-A.png" /><figcaption>Figure 7. RG_DSM</figcaption></figure><p>The bluish the taller, see Figure 8. The bluish tree is 2224 height, the street height is 2202 meters above see level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j8HDTGFYP9gC6b2GLjoKkw.png" /><figcaption>Figure 8. Heights in RG_DSM</figcaption></figure><p>See more details of this procedure and its applications in these two papers:</p><ul><li><a href="https://www.mdpi.com/2306-5729/7/4/50">HAGDAVS: Height-Augmented Geo-Located Dataset for Detection and Semantic Segmentation of Vehicles in Drone Aerial Orthomosaics</a></li><li><a href="https://www.mdpi.com/2220-9964/11/10/508">A GIS Pipeline to Produce GeoAI Datasets from Drone Overhead Imagery</a></li></ul><h4>QGIS</h4><p>First of all open QGIS, go to Complements and install the <strong><em>Virtual Raster Builder Plugin.</em></strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WTs7rlIqL6VBi-OoIKzReA.png" /><figcaption>Figure 9. Virtual Raster Builder Plugin</figcaption></figure><p>Start the plugin, then drag and drop the RGB and the DSM Raster Layers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*RXkq1ohoqkJoYqeIgW16rg.png" /><figcaption>Figure 10. Virtual Raster Builder</figcaption></figure><p>Now, drag and drop bands 1 (Red) and 2 (Green) from the RGB image and band 1 from the DSM image in the <em>‘Virtual raster’</em> panel on the right. See the result in the Preview pane in the lower left part of the window. Specify a name in the output box and click on open after creation. Last, click on Save VRT and wait for the Color Composite Image, the resultant image is the same as the shown in Figure 7.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Oy-jYP_nDCRXAxlqmJx34g.png" /><figcaption>Figure 11. A RG_DSM false color composite creation on the VRT Builder.</figcaption></figure><h4><strong>Normalization and Scaling of Images</strong></h4><p>Both processes consist of re-calculating image values to a pre-defined interval, in the case of Normalization to the [-1,1] interval centered on zero. This means with a mean of zero and a standard deviation of one. Meanwhile, scaling is accomodating values to a customized interval, normally the [0,1] interval. Equation 1 is used for scaling to any interval of interest, whereas equation 2 is for scaling to the [0,1] interval, this is Max scale value = 1 and Min scale value = 0.</p><p><strong><em>Rescaled Image = [(Image — Min value Image) * (Max scale value — Min scale <br>value) / (Max value Image — Min value Image)] + Min scale value</em></strong> (1)</p><p><strong><em>Rescaled Image = [(grid — Min value Image) / (Max value Image — Min value Image)]</em></strong> (2)</p><p>The Red and Green bands live in the interval [0,255], so applying the second equation in the Raster Calculator of ArcGIS, to the DSM results in:</p><p>Re-scaled DSM = [(“EL_Retiro_dsm_WGS.tif” — 2160,55) * (255) / (2338,3–2160,55)]</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xmtfB0qc2DEjShZG2ZWA2g.png" /><figcaption>Figure 12. Re-scaled DSM in the raster calculator.</figcaption></figure><p>So the same tree shown in the figure 8 has now a value in the interval [0,255], see Figure 13.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/1*kb4v5Tm2L2cmi-EOSNxZ5g.png" /><figcaption>Figure 13. Re-scaled DSM to the [0,255] interval.</figcaption></figure><h3>Conclusion</h3><p>Making false color composite imagery allows to highlight characteristics that are discriminative in objects of Earth’s surface, for instance objects’ height can be encoded in any of the channels of a RGB color composite, letting objects be, for example, segmented by hight and not only by their color.</p><h3>Support me</h3><p>Enjoying my work? Show your support with <a href="https://www.buymeacoffee.com/jrballesteros">Buy me a coffee</a>, a simple way for you to encourage me and others to write. If you feel like it, just click the link and I will enjoy a <a href="https://www.buymeacoffee.com/jrballesteros">cup of coffee!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/0*azhAw2fMYJMnt8jO.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e20492f729fe" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Shortest Guide to Use Google Places API]]></title>
            <link>https://medium.com/@jrballesteros/the-shortest-guide-to-use-google-places-api-310b1b0ea29c?source=rss-f0d63b49f84------2</link>
            <guid isPermaLink="false">https://medium.com/p/310b1b0ea29c</guid>
            <category><![CDATA[cartography]]></category>
            <category><![CDATA[google-map-api]]></category>
            <category><![CDATA[mapas]]></category>
            <category><![CDATA[maps]]></category>
            <category><![CDATA[cartografia]]></category>
            <dc:creator><![CDATA[John R. Ballesteros]]></dc:creator>
            <pubDate>Sun, 25 Feb 2024 21:21:53 GMT</pubDate>
            <atom:updated>2024-04-12T01:26:27.699Z</atom:updated>
            <content:encoded><![CDATA[<p>Google Cloud offers a plenty of services and APIs, Maps and AI are the ones of my interest. This story talks about a simple way to consume the Google Places API, it helps to retrieve information about places, including points of interest (POIs), but you can also go deeper and fetch users reviews and other important information.</p><p>Google Cloud offers 90 days of free trial with a credit of 300 usd, after that an user free layer is up to 200 usd in total for any of the services available or a combination of them. Scraping data from Google Maps is against Google’s Terms of Service. It’s important to note that web scraping may violate the terms of service of the website you are scraping. Google Maps, in particular, has strict terms against automated access and scraping. Here’s a general overview of how Google Places API can be used.</p><p>Get an API Key:</p><ul><li>Go to the Google Cloud Console.</li></ul><p><a href="https://console.cloud.google.com/apis/library/places-backend.googleapis.com?hl=es&amp;project=macro-landing-273415">Google Cloud console</a></p><ul><li>Create a new project and enable the Google Places API.</li><li>Generate an API key.</li></ul><p>Make API Requests:</p><ul><li>Use the generated API key to make requests to the Google Places API.</li></ul><p>The following script shows a simple example.</p><pre>import requests # A cool library to handle requests to different apis.<br><br>api_key = &#39;YOUR_API_KEY&#39;<br>base_url = &#39;https://maps.googleapis.com/maps/api/place/nearbysearch/json&#39;<br><br># Example parameters for a nearby search<br>params = {<br>    &#39;location&#39;: &#39;37.7749,-122.4194&#39;,  # Latitude, Longitude<br>    &#39;radius&#39;: 1000,  # Search radius in meters<br>    &#39;type&#39;: &#39;restaurant&#39;,  # Place type (e.g., restaurant, hotel)<br>    &#39;key&#39;: api_key,<br>}<br><br># Make a request to the API<br>response = requests.get(base_url, params=params)<br>data = response.json()<br><br># Extract and print relevant information from the response<br>for place in data[&#39;results&#39;]:<br>    print(f&quot;Name: {place[&#39;name&#39;]}&quot;)<br>    print(f&quot;Address: {place[&#39;vicinity&#39;]}&quot;)<br>    print(f&quot;Type: {&#39;, &#39;.join(place[&#39;types&#39;])}&quot;)<br>    print(&quot;----&quot;)</pre><p>Latitude and Longitude coordinates in the code correspond to a point in Mission District in San Francisco, and the code retrieves the Restaurants located within one kilometer of that point. It is similar to the manual search shown in the following figure.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_qF9N6AqdgDfteJR0cHhEg.png" /><figcaption>Figure. Google Place API result for a specific query shown in the previous script.</figcaption></figure><p>Read a related guide in one of my other stories:</p><p><a href="https://medium.com/@jrballesteros/querying-pois-from-osm-using-python-41453922d713">Querying POIS from OSM using Python</a></p><h3>Support me</h3><p>Enjoying my work? Show your support with <a href="https://www.buymeacoffee.com/jrballesteros">Buy me a coffee</a>, a simple way for you to encourage me and others to write. If you feel like it, just click the next link and I will enjoy a <a href="https://www.buymeacoffee.com/jrballesteros">cup of coffee!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/0*pMkeGPXZUNYUOYbs.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=310b1b0ea29c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Burning Money on AI: The ROI Framework That Actually Works]]></title>
            <link>https://medium.com/@jrballesteros/the-roai-the-return-on-investment-of-ai-projects-5e85bdda7114?source=rss-f0d63b49f84------2</link>
            <guid isPermaLink="false">https://medium.com/p/5e85bdda7114</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[roi]]></category>
            <category><![CDATA[ai-product-management]]></category>
            <category><![CDATA[ai-projects]]></category>
            <dc:creator><![CDATA[John R. Ballesteros]]></dc:creator>
            <pubDate>Tue, 23 Jan 2024 12:17:35 GMT</pubDate>
            <atom:updated>2025-08-31T18:21:55.410Z</atom:updated>
            <content:encoded><![CDATA[<p>This short story talks about how to calculate ROI of AI Projects.</p><p><strong>ROI</strong> is defined as the financial gain or loss from an investment relative to its cost. Since AI Initiatives are not always meant to generate more revenues, but to solve a problem that can take years to observe a financial impact, and in fact, in a near term companies may experience a decrease in revenues when investing in AI foundations; a more appropriate term for assessing the success of AI initiatives is called ROAI, which means The Return on AI Investment.</p><p>So, <strong>ROAI</strong> is a way to know if AI is having an impact on the business process, a product or a service. It tracks improvement over a baseline measurement, for instance, time, tasks, or people savings, or in a standardized units, i.e. services/hour.</p><h4>Where does ROAI fit?</h4><p>The success of an AI initiative is not one particular metric. Instead, there are three inter-connected ways to measure the success of an AI project, these are:</p><ul><li><strong><em>Model Success:</em></strong> when an Ai model performs well during development and while in production, metrics used are specific to the used algorithm and problem specific, for example precision, recall, F1-score, and so on.</li><li><strong><em>User Success:</em></strong> Most Ai models interact with people, users can be the customers, the vendors, or the employees of a company. User success is the adoption of the technology, so evaluating that is a way to surface model and non-model issues. This constitutes a qualitative feedback, normally obtained by surveys, or interviews to the Ai model users after deployment.</li><li><strong><em>Business Success:</em></strong> It is how an AI automation is impacting an organization, so this is where ROAI stands up, resulting in time savings, reducing human errors or preventing customer churn. The ROAI is used after deployment.</li></ul><h4>ROAI</h4><p><strong>ROAI </strong>as a metric should tie to the <strong>potential benefits</strong> and <strong>pain points</strong> of the business. It is an expected minimum acceptable numerical value that should be revised over time.</p><p><em>Examples:</em><strong><br></strong>Some pain points in organizations are: <strong><br> </strong>— To reduce analysts’ workload</p><p>— To increase the number of processed orders</p><p>— To reduc the number of complaints per hour</p><p>This may lead to a ROAI like:</p><p><strong>To reduce the number of complaints per hour:<br> <br> Metric: complaints per hour<br> Baseline Measurement: 1000 of complaints per hour<br> Expected ROAI: 80% reduction of complaints per hour</strong></p><h4><strong>Measure ROAI Over Time</strong></h4><p>Since improvements in ROAI can not be observable immediately, changes in ROAI should be tracked with time, i.e. months or model iterations in post development testing (PDT). An expected value of ROAI, also called the expected ROAI should be met. It is quite common that ROAI surpasses the expected ROAI with iterations, which would mean that the AI Project has fulfilled Business Success. Figure 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LPd1S4Z4G579Q3lqWzHp7A.png" /><figcaption>Figure 1. Business Success measured by ROAI.</figcaption></figure><h4><strong>Non-Model Factors</strong></h4><p>When assessing Model, Business, and User Success, there are often other confounding factors that impact the success of AI Projects, and although certain complaints from the Ai users would require model improvements, many will be non-model related, they show up as different problems like:</p><ul><li>A poor use interface</li><li>The lack of user training in consuming the Ai output</li><li>A wrong ROAI</li><li>Network latency</li></ul><p>There is a tendency for companies to blame Ai models when users are unhappy or the ROAIs are low. That is an easy way out, as models don’t get offended. But this is wrong. The majority of the time, if models are well developed and tested, poor ROAIs are often caused by Non-Model Factors.</p><h4>References</h4><ul><li><a href="https://books.google.com.co/books?hl=es&amp;lr=&amp;id=abMuCp4kZJMC&amp;oi=fnd&amp;pg=PR3&amp;dq=ROI+for+data+projects&amp;ots=XYh0wpW4k7&amp;sig=ct__QpULtUrv2xq-AoeB6hH8T5I&amp;redir_esc=y">https://books.google.com.co/books?hl=es&amp;lr=&amp;id=abMuCp4kZJMC&amp;oi=fnd&amp;pg=PR3&amp;dq=ROI+for+data+projects&amp;ots=XYh0wpW4k7&amp;sig=ct__QpULtUrv2xq-AoeB6hH8T5I&amp;redir_esc=y#v=onepage&amp;q&amp;f=false</a></li></ul><h3>Support me</h3><p>Enjoying my work? Show your support with <a href="https://www.buymeacoffee.com/jrballesteros">Buy me a coffee</a>, a simple way for you to encourage me and others to write. If you feel like it, just click the next link and I will enjoy a <a href="https://www.buymeacoffee.com/jrballesteros">cup of coffee!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/0*4J5F9D2KELMidlF6.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e85bdda7114" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A No Code Regression Model using Weka]]></title>
            <link>https://medium.com/@jrballesteros/a-no-code-regression-model-using-weka-a571ea013794?source=rss-f0d63b49f84------2</link>
            <guid isPermaLink="false">https://medium.com/p/a571ea013794</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[regression]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[weka]]></category>
            <category><![CDATA[regression-modeling]]></category>
            <dc:creator><![CDATA[John R. Ballesteros]]></dc:creator>
            <pubDate>Fri, 17 Nov 2023 01:45:08 GMT</pubDate>
            <atom:updated>2024-04-12T01:29:29.844Z</atom:updated>
            <content:encoded><![CDATA[<p>This story presents an example of a Regression Model without the need of write a single line of code, this is, using Weka. Weka is an open source tool in JAVA from the times of the data mining, created by the University of Waikato in New Zeland. A procedure to download the software and a list of features included in Weka can be found in one of my previous stories here:</p><p><a href="https://medium.com/@jrballesteros/weka-how-to-learn-machine-learning-for-non-experts-70e9767b08b2">Weka: How to learn Machine Learning for Non-Experts</a></p><p>An example of a classification model can be found here:</p><p><a href="https://medium.com/@jrballesteros/a-no-code-machine-learning-classification-model-using-weka-e0f0c9bfac93">A No Code Machine Learning Classification Model Using Weka</a></p><h4>A Regression Model</h4><p>Regression in machine learning consists of mathematical methods that allow data scientists to predict a continuous outcome <em>y,</em> based on the value of one or more predictor variables <em>x</em>. Linear Regression is probably the most popular form of regression analysis, because of its ease-of-use in predicting and forecasting. In summary, a Regression Model can be explained as “can a variable Y, be expressed as a non-linear combination of a set of variables X?”</p><p>To perform a Regression Model in Weka, please follow next steps:</p><p>Open Weka and click on Explorer button, after that go to Open file button and navigate to the directory “C:\Program Files\Weka-3–9–6\data” pick and open the cpu.arff dataset. Figure 1 shows the interface with the values of the cpu dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wla-yhJ7wBRkaaQYKA-qmw.png" /><figcaption>Figure 1. cpu Dataset. It contains 6 independent numerical variables, 1 dependent numerical variable, and 209 examples.</figcaption></figure><p>The minimum, maximum, Mean, Standard Deviation and data distribution can be observed in the interface for every variable.</p><p>One typical problem that may affect a Regression Model is the different range for every independent variable, so the dependent variable diverges or at least makes it more complex to converge. To solve this problem a normalization process of the input variables should be performed, this is to re-scale the values to the interval [0,1]. Weka can do that for you in an easy way. To normalize all values at once go to: Filter/Choose/filters/Unsupervised/Attributes/Normalize and then click on the Apply button. All the values are normalized. Figure 2 shows normalized values of the cpu.arff dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gGUNMnu_dqwL4Jf0KJln0A.png" /><figcaption>Figure 2. Normalized input data.</figcaption></figure><p>The purpose of normalize is to make all variables comparable to the same scale. What does every variable of the dataset mean? Right click the .arff file and see the metadata.</p><p>To make a regression model, go to Classify tab, then click on Choose, go to functions and then to Linear Regression and then click on Start button. The result is shown in figure 3.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*TWQ3inyAjnGfxv6MFdhKqg.png" /><figcaption>Figure 3. Linear Regression Model.</figcaption></figure><p>Using a Multilayer Perceptron the results are shown in figure 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/947/1*Td0I5OSHzL4UNmtPSDAhYQ.png" /><figcaption>Figure 4. Using a MultiLayer Perceptron</figcaption></figure><p>Support Vector Machines is the following.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/980/1*AIYWp6KFPD3YdFYG0OeEeA.png" /><figcaption>Figure 5. Support Vector Machines.</figcaption></figure><p>Last, the Ramdom Forest algorithm obtained 0.956, which became the best model performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M7OhWefNakLI9sBJrkqI3w.png" /><figcaption>Figure 6. Ramdon Forest, which became the best model for this purpose with a correlation coefficient of 0.95 and a mean absolute error of 25.1.</figcaption></figure><h4>Conclusion</h4><p>Weka makes simpler all the process of creating a Regression Model. Exploring the data and modeling are two steps that can be done in the platform with a few clicks.</p><h3>Support me</h3><p>Enjoying my work? Show your support with <a href="https://www.buymeacoffee.com/jrballesteros">Buy me a coffee</a>, a simple way for you to encourage me and others to write. If you feel like it, just click the next link and I will enjoy a <a href="https://www.buymeacoffee.com/jrballesteros">cup of coffee!</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/305/0*4J5F9D2KELMidlF6.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a571ea013794" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>