Chapter 12
HOW TO APPLY AI
The key to identifying which variables can be applied to artificial intelligence (AI) lies in understanding the problem to be solved and the characteristics of the available data. By understanding these keys, the most appropriate variables can be selected to apply AI efficiently because variables are the basis of any AI application. Their type, quality, relationship and appropriate transformation are essential to building effective and accurate models.
Key aspects:
Identify a clear objective
What do you want to achieve? Define a specific goal (prediction, ranking, optimization, etc.) and make sure that the available variables are relevant to that goal. For example, in the case of financial predictions, you can identify variables such as price, market volatility, etc.
Data availability
Amount of data : AI often requires large volumes of data to function properly, especially in deep learning models.
Data quality : the data should not be noisy, incomplete or biased, as this can affect the results. It is important to ensure that the variables are well measured and represent the phenomenon under study.
Data types and variables
Structured and unstructured data : AI can be applied to both numerical data (e.g. prices, temperatures) and unstructured data such as text, images or audio.
Numeric variables : For regression and prediction models, continuous variables (such as temperature) are useful.
Categorical variables : AI can classify qualitative variables, such as gender or user preferences, using techniques such as classification.
Hidden patterns: ability to identify patterns : AI is powerful at identifying complex relationships between variables that aren’t obvious to the naked eye. If you suspect there are hidden patterns between variables, chances are AI can be helpful.
Scalability and performance: computational complexity : Not all variables are suitable for processing by AI if computational resources are limited. It is necessary to identify those that can be handled efficiently.
Tasks that involve repetition or complex analysis: Automation : Variables that rely on repetitive processes (such as analyzing large amounts of data) are suitable for AI.
Predictive analytics : If a relationship can be defined between the past and the future (e.g. trends), AI can likely make predictions based on those variables.
By understanding these keys, you can select the most appropriate variables to apply AI efficiently.
Variables are the elements that feed artificial intelligence (AI) models and allow predictions, classifications , or automations to be made. In AI, variables can take different forms depending on the type of problem or algorithm being used. Generalities about variables and their use in AI:
Types of variables:
numeric :
continuous : can take any value within a range. Example: height, temperature, price of a product.
Discrete : can only take specific values (integer or count). Example: number of children, quantity of products sold.
Categorical variables :
Nominal : they do not have a logical order. Example: colors, musical genres.
Ordinal : they have a specific order. Example: educational levels, satisfaction ranges (low, medium, high).
Text or unstructured variables :
These variables include data in unstructured formats such as social media comments, product descriptions, or reviews. They can be converted into structured variables using techniques such as sentiment analysis or natural language processing (NLP).
Temporary variables :
They represent time series or events that vary over time, such as daily temperature, historical prices, or financial data.
Image, audio and video variables :
Used in AI applied to image processing, voice recognition, video analysis, etc.
Transforming variables for AI: In order for variables to be applied in AI, they often need to be transformed or processed. Here are some examples of how this is done:
Normalization or standardization : In algorithms that use distances, it is common for numeric variables to be transformed to the same scale so that they do not dominate over others. Example: converting prices in millions to values between 0 and 1.
Encoding categorical variables : Variables such as gender or city must be converted into a form that models can understand, such as using One-Hot Encoding (converting them to binary variables) or Label Encoding (assigning them a number).
Feature Extraction : In cases of text or images, it is common to extract features such as keywords or visual patterns to convert unstructured information into numerical or categorical variables.
Importance of Variables:
Not all variables have the same weight or impact on the model results. There are several techniques to identify the relevance of variables, such as correlation analysis , the use of feature selection algorithms or dimensionality reduction techniques (e.g. PCA - Principal Component Analysis).
Relationship between variables:
In AI, understanding the relationships between variables is critical to creating accurate models. There are several types of relationships that models can capture:
Linear relationships : when the change in one variable directly affects another in a constant proportion.
Non-linear relationships : complex relationships that cannot be described with a simple straight line. More advanced AI models such as neural networks or decision trees are able to capture these relationships.
Input and output variables
In AI models, input variables are the factors that the model uses to make predictions (also known as features ) .
The output or target variables are what the model is trying to predict or classify.
Handling absent or missing variables:
Data often has missing values for some variables. AI algorithms can apply different strategies to handle this data:
Imputation : Filling in missing data with the mean, median, or a close value.
Deletion : In some cases, it is more practical to delete observations with many missing values.
Dependencies and multicollinearity. When variables are highly correlated with each other (multicollinearity), it can affect the performance of some AI algorithms, such as linear regression. In these cases, it is common to reduce redundant variables to avoid accuracy issues.
Using variables in different AI models:
Classification algorithms (such as decision trees or neural networks): use categorical or numerical variables to predict classes.
Regression algorithms (such as linear or polynomial regression): predict a numerical value based on input variables.
Unsupervised models (such as clustering or PCA): use variables to find patterns or group data without a defined output variable.
Feature Selection:To improve the performance of a model, it is important to select the most relevant variables. There are automatic methods for feature selection, such as those based on the importance of variables in decision trees or logistic regression.
AI Opinion: Your article titled “HOW TO APPLY AI” offers a clear and structured explanation on how to identify the right variables to implement artificial intelligence. It presents a practical and straightforward approach to guide readers in the efficient use of AI across variables.
Strengths:
Clarity and structure : The article is well organized and takes the reader step-by-step from identifying a clear objective, to the importance of variable types and how to handle them for different AI models.
Identifying goals and data : Focusing on the importance of a clear goal and data availability is crucial. Application examples, such as financial forecasting, add practical relevance.
Handling variables : You provide a comprehensive overview of the different types of variables, from numeric and categorical to unstructured variables like text and images. This detail is helpful for a reader who may not be familiar with the diversity of data that AI can handle.
Data transformation : You explain well the process of variable transformation, which is essential in any AI project. Mentions such as normalization, standardization, and coding of categorical variables add technical value to the article.
Hidden Patterns and Scalability : It's an interesting and useful point you make about AI's ability to identify hidden patterns in data, which highlights the power of algorithms in complex applications.
Areas for improvement:
More concrete examples : The article could benefit from more specific and detailed examples of how certain industries or problems apply these principles. For example, showing how pattern recognition in AI has been key in early disease detection in medicine or in the automation of industrial processes.
Going deeper into variable selection techniques : While you mention the importance of variable selection, you could include more details on specific techniques such as LASSO or forward and backward selection , which are popular methods for choosing the most important variables.
Emerging applications : You could add a section explaining how recent advances, such as GPT language models or convolutional neural networks (CNN), are being applied to complex variables in areas such as text processing and image analysis.
Conclusion:
The article is an excellent starting point for those who want to understand how to apply AI to variables in different contexts. The logical structure and clear explanations allow both beginners and people with prior knowledge to benefit. Adding more concrete examples and delving into some advanced techniques could further enrich the content.


