Skip to content

Commit

Permalink
Merge branch 'main' into cat
Browse files Browse the repository at this point in the history
  • Loading branch information
Radhika-okhade authored Nov 15, 2024
2 parents 91affb5 + d548fd8 commit 0620ae8
Show file tree
Hide file tree
Showing 119 changed files with 6,493 additions and 248 deletions.
2 changes: 1 addition & 1 deletion bin/concept-of-the-week.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
content/uiux/concepts/logo/logo.md
content/rust/concepts/conditionals/conditionals.md
14 changes: 7 additions & 7 deletions content/ai/concepts/machine-learning/machine-learning.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Title: 'Machine Learning'
Description: 'Machine learning (ML) is a discipline of computer science that relates to using data and algorithms to develop computer programs that improve their performance at tasks without being explicitly programmed to do so.'
Description: 'Machine learning is a branch of computer science that uses data and algorithms to create programs that enhance performance at tasks without explicit programming.'
Subjects:
- 'Machine Learning'
- 'Data Science'
Expand All @@ -16,7 +16,7 @@ CatalogContent:
- 'paths/data-science'
---

**Machine learning (ML)** is a discipline of computer science that relates to using data and algorithms to develop computer programs that improve their performance at tasks without being explicitly programmed to do so. Machine Learning is considered a branch of Artificial Intelligence as some machine learning algorithms are designed to imitate the way that humans learn and interact with their environment.
**Machine learning (ML)** is a discipline of computer science that uses data and algorithms to develop computer programs that improve their performance at tasks without being explicitly programmed to do so. Machine Learning is considered a branch of Artificial Intelligence, as some machine learning algorithms are designed to imitate the way that humans learn and interact with their environment.

## Branches of Machine Learning

Expand All @@ -38,21 +38,21 @@ Machine Learning algorithms that receive unlabeled data as input and produce a g

- Clustering: Recognize patterns and structures in unlabeled data by grouping them into clusters.
- K-Means: Categorizes data points into clusters based on their proximity to cluster centroids.
- Hierarchical Agglomerative Clustering: Groups data points into clusters based on various measures of similarity such as smallest average distance between all points, minimal variance between data points, or smallest maximum distance between data points.
- Dimensionality Reduction: Scale down the dimensions in the dataset from a high-dimensional space into a low-dimensional space, while maintaining the maximum amount of relevant information.
- Hierarchical Agglomerative Clustering: Groups data points into clusters based on various measures of similarity, such as the smallest average distance between all points, minimal variance between data points, or smallest maximum distance between data points.
- Dimensionality Reduction: Scale down the dimensions in the dataset from a high-dimensional space into a low-dimensional space while maintaining the maximum amount of relevant information.
- Principal Component Analysis (PCA): Reduces the dimensionality of a dataset to the 'n' number of principal dimensions that contain the most valuable information.

### Reinforcement Learning

Machine learning algorithms that act as agents in an environment, which receive a current state, environment, reward, and goal as input and produce a policy of best action relative to the stated goal as output.
Machine learning algorithms that act as agents in an environment receive a current state, environment, reward, and goal as input and produce a policy of best action relative to the stated goal as output.

- Model-Free: Act as trial-and-error algorithms that use only real samples of the environment to calculate optimal actions instead of the transition probability distribution to create a model of the environment.
- Model-Based: Create models of the environment to generate predictions of the next state and reward to calculate optimal actions.

Some methods used in reinforcement learning include:

- Markov Decision Processes (MDPs): Use a model of the environment based on their state transition probability and reward functions to create a policy of optimal action and satisfy the Markov property.
- Monte-Carlo methods: Model-Free randomized algorithms that learn from episodes of experience whether continuous or terminal to calculate the value for a state based on the average return from those experiences.
- Monte-Carlo methods: Model-Free randomized algorithms that learn from episodes of experience, whether continuous or terminal, to calculate the value for a state based on the average return from those experiences.
- Q-Learning/Deep Q-Learning: Model-Free algorithms that focus on maximizing the expected value of reward using q-tables, or artificial neural networks.

## Machine Learning vs. Deep Learning
Expand All @@ -70,6 +70,6 @@ Based on the evaluation results, the model's user might modify the model's hyper

## Evaluation

There are several methods to accurately evaluate the performance of ML algorithms. Methods vary based on which algorithm is being evaluated, and for which purpose. For classifiers such as Logistic Regression, confusion matrices inform analysts of the number of true and false positives as well as negatives to calculate values such as recall, precision, and F1 scores.
There are several methods to accurately evaluate the performance of ML algorithms. Methods vary based on which algorithm is being evaluated and for which purpose. For classifiers such as Logistic Regression, confusion matrices inform analysts of the number of true and false positives as well as negatives to calculate values such as recall, precision, and F1 scores.

These values help analysts understand if their models are underfitting or overfitting, which is critical to improving and maintaining their performance.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
Title: 'Gaussian Activation Function'
Description: 'The Gaussian activation function takes the input and transforms it into a Gaussian or Normal Distribution curve, with the output values varying depending on the specific implementation and parameters.'
Description: 'The Gaussian activation function shapes the output of a neuron into a bell-shaped curve that is symmetric about its unique peak.'
Subjects:
- 'Machine Learning'
- 'Data Science'
Expand All @@ -19,29 +19,29 @@ A **Gaussian activation function** is a mathematical function known as the norma

## Gaussian Function

Characterized by its bell-shaped graph, where most data points are near the middle (average), and the likelihood of getting values decreases as you move away from the average. This curve is symmetric, meaning that the probabilities of getting values above the average are the same as getting values below the average.
The Gaussian function is characterized by its bell-shaped graph, where most data points are near the middle (average), and the likelihood of getting values decreases as you move away from the average. This curve is symmetric, meaning that the probabilities of getting values above the average are the same as getting values below the average.

![Gaussian function](https://raw.githubusercontent.com/Codecademy/docs/main/media/gaussian-function-1d.png)

## Advantages and Disadvantages of the Gaussian Activation Function

### Advantages

- Smooth and Continuous: The Gaussian activation function is smooth and continuous everywhere, making it fully differentiable with a consistent gradient. This property simplifies the process for optimization algorithms to find the best solution.
- Non-Linear Properties: It introduces non-linearity to the neural network, enabling the network to capture complex relationships between inputs and outputs.
- **Smooth and Continuous**: The Gaussian activation function is smooth and continuous everywhere, making it fully differentiable with a consistent gradient. This property simplifies the process for optimization algorithms to find the best solution.
- **Non-Linear Properties**: It introduces non-linearity to the neural network, enabling the network to capture complex relationships between inputs and outputs.

### Disadvantages

- Risk of Overfitting: A more complex network can lead to overfitting, where the model overly specializes in the training data and fails to generalize to new, unseen data.
- Increased Network Complexity: Implementing the Gaussian function can add complexity to the neural network, often requiring more computational power and time for training.
- Potential for Local Minima Traps: The Gaussian function may increase the likelihood of the network getting trapped in local minima during the optimization process. This can hinder the achievement of the most optimal solutions.
- **Risk of Overfitting**: A more complex network can lead to overfitting, where the model overly specializes in the training data and fails to generalize to new, unseen data.
- **Increased Network Complexity**: Implementing the Gaussian function can add complexity to the neural network, often requiring more computational power and time for training.
- **Potential for Local Minima Traps**: The Gaussian function may increase the likelihood of the network getting trapped in local minima during the optimization process. This can hinder the achievement of the most optimal solutions.

## Practical Uses for Gaussian Activation Functions
## Practical Uses for the Gaussian Activation Function

Gaussian activation function plays a pivotal role in various AI and machine learning applications across different industries, such as:
The Gaussian activation function plays a pivotal role in various AI and machine learning applications across different industries, such as:

- Image Processing and Computer Vision: In image processing, Gaussian functions are used for smoothing or blurring images. This is crucial in pre-processing steps to reduce noise and improve the quality of feature extraction, which is vital in computer vision tasks like object detection, face recognition, and image segmentation. Additionally, Gaussian functions are used for applications like earth observation, weather forecasting, and environmental monitoring.
- Regression Analysis: Gaussian functions are foundational in Gaussian Processes, a powerful tool for regression analysis in machine learning. They provide a probabilistic approach to modeling uncertainties in predictions, which is important in fields like financial modeling, environmental modeling, and robotics. For instance, they help in modeling stock price variations and market trends, allowing financial analysts to predict future movements and manage risks more effectively.
- Pattern Recognition and Classification: Gaussian functions are often used in algorithms for pattern recognition and classification tasks. In these scenarios, they help to model the distribution of data points, allowing the system to differentiate between various categories or classes effectively. For example, in retail and e-commerce, Gaussian functions aid in customer behavior analysis and sales forecasting in the retail sector. By modeling customer purchase patterns, businesses can predict future sales trends, optimize inventory management, and enhance personalized marketing strategies.
- Natural Language Processing (NLP): In NLP, Gaussian distributions can be used in probabilistic models like Gaussian Mixture Models (GMMs) for clustering or classifying text data. They help in understanding the underlying structure of language data, which is essential for applications like sentiment analysis, topic modeling, and language generation.
- Reinforcement Learning: In reinforcement learning, especially in continuous action spaces, Gaussian functions are used to model the probability distribution of actions. This assists in the exploration-exploitation trade-off, where the algorithm needs to decide between exploring new actions and exploiting known rewarding actions.
- **Image Processing and Computer Vision**: In image processing, Gaussian functions are used for smoothing or blurring images. This is crucial in pre-processing steps to reduce noise and improve the quality of feature extraction, which is vital in computer vision tasks like object detection, face recognition, and image segmentation. Additionally, Gaussian functions are used for applications like earth observation, weather forecasting, and environmental monitoring.
- **Regression Analysis**: Gaussian functions are foundational in Gaussian Processes, a powerful tool for regression analysis in machine learning. They provide a probabilistic approach to modeling uncertainties in predictions, which is important in fields like financial modeling, environmental modeling, and robotics. For instance, they help model stock price variations and market trends, allowing financial analysts to predict future movements and manage risks more effectively.
- **Pattern Recognition and Classification**: Gaussian functions are often used in algorithms for pattern recognition and classification tasks. In these scenarios, they help to model the distribution of data points, allowing the system to differentiate between various categories or classes effectively. For example, in retail and e-commerce, Gaussian functions aid customer behavior analysis and sales forecasting. By modeling customer purchase patterns, businesses can predict future sales trends, optimize inventory management, and enhance personalized marketing strategies.
- **Natural Language Processing (NLP)**: In NLP, Gaussian distributions can be used in probabilistic models like Gaussian Mixture Models (GMMs) for clustering or classifying text data. They help in understanding the underlying structure of language data, which is essential for applications like sentiment analysis, topic modeling, and language generation.
- **Reinforcement Learning**: In reinforcement learning, especially in continuous action spaces, Gaussian functions are used to model the probability distribution of actions. This assists in the exploration-exploitation trade-off, where the algorithm needs to decide between exploring new actions and exploiting known rewarding actions.
Loading

0 comments on commit 0620ae8

Please sign in to comment.