Machine Learning: Data Preparation

Choose a study mode

Play Quiz
Study Flashcards
Spaced Repetition
Chat to Lesson

Podcast

Play an AI-generated podcast conversation about this lesson

Questions and Answers

¿Cuál es la importancia de integrar variables en la preparación de datos para el aprendizaje automático?

  • Minimizar el tamaño del conjunto de datos.
  • Simplificar el proceso de limpieza de datos.
  • Crear un registro completo por cada entidad (persona/producto/servicio/sede). (correct)
  • Reducir la necesidad de realizar análisis estadístico.

¿Por qué es crucial eliminar variables irrelevantes y redundantes en la preparación de datos?

  • Para aumentar la complejidad del modelo y mejorar su precisión.
  • Para facilitar la interpretación de los resultados del modelo.
  • Para reducir el ruido en los datos y mejorar la eficiencia del modelo. (correct)
  • Para asegurar que todas las variables tengan el mismo peso en el análisis.

¿Qué tipo de variables se verían afectadas más directamente por la descripción estadística de los datos?

  • Variables numéricas y categóricas en igual medida.
  • Variables numéricas principalmente. (correct)
  • Variables categóricas únicamente.
  • Variables de texto.

¿Cuál es el propósito principal de la limpieza de datos atípicos (outliers)?

<p>Para prevenir que valores extremos distorsionen los resultados del análisis. (C)</p> Signup and view all the answers

¿Qué implica 'balancear datos' en el contexto de la preparación de datos para el aprendizaje automático?

<p>Ajustar el conjunto de datos para que las clases estén representadas equitativamente. (C)</p> Signup and view all the answers

¿Por qué es importante tener en cuenta el método de machine learning al transformar datos?

<p>Porque algunos métodos solo funcionan con ciertos tipos de datos. (D)</p> Signup and view all the answers

Al integrar datos de diferentes fuentes, ¿qué problema específico se busca resolver en la fase de 'Integración de los Datos'?

<p>La creación de un registro unificado por cada entidad. (B)</p> Signup and view all the answers

¿Cuál de las siguientes opciones describe mejor el propósito de eliminar variables irrelevantes durante la preparación de datos?

<p>Reducir la dimensionalidad del conjunto de datos y evitar el sobreajuste. (D)</p> Signup and view all the answers

En el contexto de la descripción estadística de datos numéricos, ¿cómo se interpretaría un histograma platicúrtico?

<p>Los datos están muy dispersos con baja concentración alrededor de la media. (D)</p> Signup and view all the answers

¿Qué enfoque se debe tomar al encontrar datos atípicos (outliers) en una variable numérica, como la edad, que exceden un rango razonable?

<p>Asignar un valor nulo (NULL) a los valores atípicos para evitar distorsiones en el análisis. (C)</p> Signup and view all the answers

¿Cuál es la principal desventaja de eliminar registros que contienen valores nulos en comparación con la imputación?

<p>La eliminación puede resultar en una pérdida significativa de información. (C)</p> Signup and view all the answers

¿Cuál es la diferencia fundamental entre undersampling y oversampling en el balanceo de datos?

<p>Undersampling elimina muestras de la clase mayoritaria, mientras que oversampling crea nuevas muestras para la clase minoritaria. (B)</p> Signup and view all the answers

¿Qué es SMOTE y cuál es su propósito en el balanceo de datos?

<p>Es una técnica para generar sintéticamente nuevas muestras en la clase minoritaria. (B)</p> Signup and view all the answers

En la transformación de datos, ¿por qué es necesario discretizar variables numéricas si el método de Machine Learning elegido es para variables categóricas?

<p>Para hacer que los datos sean compatibles con el método de aprendizaje automático. (D)</p> Signup and view all the answers

¿Qué tipo de algoritmos de machine learning son adecuados para ser utilizados directamente con 'variables numéricas'?

<p>Redes Neuronales (RN), Máquinas de Vectores de Soporte (SVM) y K-Vecinos Más Cercanos (KNN). (A)</p> Signup and view all the answers

Si un algoritmo de Machine Learning requiere variables categóricas, ¿cuál es el paso crucial para transformar una variable numérica, como la edad, en categórica?

<p>Discretización de la variable en rangos. (C)</p> Signup and view all the answers

En el contexto de la transformación de datos para Machine Learning, ¿cuál es la principal razón para normalizar variables numéricas?

<p>Para asegurar que todas las variables tengan la misma escala y evitar que una domine a otras. (A)</p> Signup and view all the answers

En la transformación de variables categóricas a numéricas, ¿qué implica la creación de variables dummy o one-hot encoding?

<p>Crear una nueva variable binaria para cada categoría. (D)</p> Signup and view all the answers

¿Cuál es la implicación de 'eliminar variables irrelevantes para la minería de datos' durante la fase de preparación de datos?

<p>Reducir la complejidad del modelo y mejorar su eficiencia eliminando datos no informativos. (D)</p> Signup and view all the answers

Si se tienen las variables 'Edad', 'Año de nacimiento' y 'Mayor de edad (sí/no)', ¿qué paso de preparación de datos sería más apropiado aplicar y por qué?

<p>Eliminación de variables redundantes, ya que 'Año de nacimiento' y 'Mayor de edad' son redundantes con 'Edad'. (D)</p> Signup and view all the answers

¿Cuál es la diferencia clave entre un histograma con asimetría positiva y uno con asimetría negativa?

<p>En la asimetría positiva, la cola se extiende hacia valores más altos; en la negativa, hacia valores más bajos. (B)</p> Signup and view all the answers

¿Que significa el término 'imputar' en el contexto de 'Limpieza de valores nulos'?

<p>Predecir o estimar y luego sustituir, los valores faltantes. (D)</p> Signup and view all the answers

¿Por que la técnica de undersampling podria ser problematica?

<p>Puede perder información valiosa al eliminar instancias. (A)</p> Signup and view all the answers

¿Cuál es el efecto principal de aplicar la técnica SMOTE a un conjunto de datos?

<p>Genera nuevas instancias sintéticas para la clase minoritaria. (A)</p> Signup and view all the answers

Normalizar un rango de datos a $[0, 1]$ es un paso crucial para que tipos de algoritmos?

<p>K-Nearest Neighbors (KNN). (E)</p> Signup and view all the answers

Una de las técnicas para volver datos categoricos, especialmente texto, en números se llama One-Hot Encoding. ¿Que efecto tiene esta técnica en el dataset?

<p>Aumenta la dimensionalidad. (D)</p> Signup and view all the answers

¿Cuándo seria más apropiado aplicar una transformación de datos que involucre la creación de 'dummies'?

<p>Cuando la mayoria de algoritmos no soporta valores categóricos directamente. (B)</p> Signup and view all the answers

Flashcards

Data Integration

Process of combining data from different sources into a unified view.

Irrelevant Variables

Removing variables that do not contribute to the analysis.

Redundant Variables

Duplicated variables that provide the same information.

Statistical Description

Summarizing key characteristics of data using statistics.

Signup and view all the flashcards

Outlier Cleaning

Cleaning or removing data points that deviate significantly from the norm.

Signup and view all the flashcards

Missing Data Cleaning

Handling missing data values in the dataset.

Signup and view all the flashcards

Data Balancing

Adjusting the dataset to address class imbalance.

Signup and view all the flashcards

Data Transformation

Convert data types based on the needs of the model.

Signup and view all the flashcards

Numerical Variables

Numerical variables representing measurable quantities.

Signup and view all the flashcards

Categorical Variables

Variables representing distinct categories or groups.

Signup and view all the flashcards

Undersampling

Technique to reduce majority class samples.

Signup and view all the flashcards

Oversampling

Technique to increase minority class samples.

Signup and view all the flashcards

SMOTE

Statistical method to oversample minority classes.

Signup and view all the flashcards

Data Discretization

Process of grouping numerical data into distinct ranges.

Signup and view all the flashcards

Data Normalization

Scaling numerical data to a specific range.

Signup and view all the flashcards

Label Encoding

Converting categorical variables into numerical values.

Signup and view all the flashcards

Dummy creation

Creates binary columns for each category in variable.

Signup and view all the flashcards

Data Atipicos

Values too far away from the majority of the data.

Signup and view all the flashcards

Business understanding

The general, big picture understanding of the Business.

Signup and view all the flashcards

data understanding

Understanding all the information about the data

Signup and view all the flashcards

Study Notes

  • Machine Learning I 258440 is taught by Ing. Wilson Arrubla at the Universidad de Sucre.

Data Preparation Steps

  • Integrate data from various sources.
  • Eliminate irrelevant and redundant variables.
  • Describe the data statistically.
  • Clean atypical data.
  • Handle missing values.
  • Balance the dataset.
  • Transform data according to the chosen machine learning method.

Variable Types in Data Preparation

  • Numerical Variables (quantitative): Examples include weight, age, years in the company, salary, sales, and debt value.
  • Categorical Variables (qualitative): Examples include sex (Male, Female), Marital Status (Married, Single), if they are an adult (S, N), Disease (Yes, No), Religion (Catholic, Other), and Education Level (Bachelor's, Professional, University).
  • Character Strings: Dates.

Data Integration

  • Create a record for each person/product/service/location with all integrated variables.
  • Eliminate duplicate records (e.g., repeated customer IDs or invoice numbers).

Eliminating Irrelevant Variables

  • Remove variables that are irrelevant to the mining process to reduce noise and improve model performance.
  • Delete redundant variables to simplify the dataset and avoid multicollinearity.
  • Irrelevant information includes: name, phone number, address and identification document.
  • Redundant variables: age, birth year, and if they are an adult. Also, sales in 1, 3 and 6 months.

Statistical Description of Data

  • Use descriptive statistics and visualizations like histograms, box plots, and scatter plots for numerical variables.
  • Variables are described through descriptive statistics and visualizations with histograms, frequency boxes and dispersion.

Histogram Types

  • Leptokurtic: Data has many values that converge to the mean.
  • Mesokurtic: Data is close to the mean.
  • Platykurtic: Data has few values converging to the mean, with a large standard deviation.
  • Symmetrical Distribution: mean, median and mode are equal.
  • Asymmetrical Positive Distribution: mode < median < mean
  • Asymmetrical Negative Distribution: mean < median < mode

Categorical Variable Representations

  • Use bar charts and pie charts to visualize categorical data.

Cleaning Atypical Data (Outliers)

  • Outliers are values outside the expected range.
  • Establish cleaning rules to address these outliers.
  • Example age range is considered 18 to 90.
    • Minimum value: 19.
    • Maximum value: 75.
    • Mean: 35.546.
    • Standard Deviation: 11.375.
  • If outliers are detected, assign a NULL value.

Handling Missing Values

  • Missing values can originate from various sources, including typographical errors.

Strategies to handle null values include:

  • Eliminate records or variables with too many null values, rows with 30% or Columns with 30% nulos.
  • Impute missing values using the mean or mode.
  • Predict missing values using data mining techniques.

Balancing Data (Classification)

  • Undersampling: Reduces the quantity of the majority class to balance the dataset.
  • Oversampling: Randomly duplicates the minority class or creates synthetic data.

SMOTE Technique

  • Synthetic Minority Oversampling Technique (SMOTE) addresses imbalanced data by oversampling the minority class.
  • It generates synthetic instances to balance the dataset.
  • Requires the selection of neightborhood of between 2-5 registers.
  • A random register is taken and synthetic data is created.

Data Type Transformation

  • This depends on the Machine Learning Method.

Data Transformation Based on ML Method Type

  • Numerical ML: Normalization is used to convert data to a standard range to prevent certain features to dominate others.
    • Normalization of variables.
      • Converts categorical variables to numbers.
      • Formula: Xnorm = (X - Xmin) / (Xmax - Xmin)
  • Categorical ML: Variables are categorized through Descretization. Also, Dummy Variables are created.
    • Unify ranges of variables.
    • Encode labels.
    • Create Dummies (Predictor Variables).
      • If 2 categories, one must be deleted. -If 3 or more categories exist in the model, all should be deleted and rewritten.
  • For Categorical Variables the following can be used: Arbol, Bayes and Apriori.

Studying That Suits You

Use AI to generate personalized quizzes and flashcards to suit your learning preferences.

Quiz Team

Related Documents

More Like This

Use Quizgecko on...
Browser
Browser