mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-28 07:14:05 -06:00
update
This commit is contained in:
parent
56273230ff
commit
c6bd57892f
@ -456,6 +456,6 @@ Here are some of the most widely adopted software design principles:
|
||||
Software design principles are fundamental to writing clean, maintainable, and scalable software. By adhering to these principles, developers can create systems that are easier to understand, modify, and extend, ultimately leading to more robust and reliable software.
|
||||
|
||||
|
||||
# Patterns
|
||||
# Design Patterns
|
||||
|
||||
[[Creational Design Patterns]]
|
||||
[[Creational Design Patterns]]
|
||||
|
||||
79
content/Article&Books/books/Hands on Machine Learning.md
Normal file
79
content/Article&Books/books/Hands on Machine Learning.md
Normal file
@ -0,0 +1,79 @@
|
||||
#ai
|
||||
#ml
|
||||
#books
|
||||
|
||||
# Chapter 1
|
||||
|
||||
### When to Use Machine Learning
|
||||
|
||||
Machine learning (ML) can be a powerful tool, but it’s not always the best solution. Understanding when to use ML and when not to depends on the nature of the problem, the data available, and the desired outcomes. Here’s a breakdown of when you should consider using ML and when you might want to opt for traditional programming or other methods.
|
||||
|
||||
#### When to Use Machine Learning
|
||||
|
||||
1. **When There is a Need to Make Data-Driven Predictions**:
|
||||
- **Use Case**: Predicting stock prices, estimating house prices, or customer churn prediction.
|
||||
- **Rationale**: ML models excel at making predictions based on patterns in historical data, enabling accurate forecasting in scenarios with complex relationships between variables.
|
||||
|
||||
2. **When the Problem Involves Complex Patterns or Non-Linear Relationships**:
|
||||
- **Use Case**: Image recognition, natural language processing (NLP), and speech recognition.
|
||||
- **Rationale**: Problems involving complex, non-linear relationships or unstructured data (e.g., images, audio, text) are challenging to solve with rule-based approaches. ML models can detect subtle patterns in such data that would be difficult or impossible to encode manually.
|
||||
|
||||
3. **When Manual Feature Engineering or Rules Are Impractical**:
|
||||
- **Use Case**: Identifying spam emails, classifying products in an e-commerce catalog.
|
||||
- **Rationale**: For problems that require hundreds or thousands of rules or for scenarios where these rules constantly change, using ML can automate feature extraction and pattern recognition.
|
||||
|
||||
4. **When You Need to Personalize User Experiences**:
|
||||
- **Use Case**: Personalized recommendations (e.g., Netflix, Amazon), targeted advertisements.
|
||||
- **Rationale**: ML models can learn user preferences and behavior over time, providing personalized recommendations and improving user engagement.
|
||||
|
||||
5. **When the System Needs to Adapt Over Time**:
|
||||
- **Use Case**: Fraud detection systems, dynamic pricing models.
|
||||
- **Rationale**: Some systems must adapt to changes in user behavior, data patterns, or the environment. ML models can be updated regularly with new data, making them ideal for dynamic and evolving systems.
|
||||
|
||||
6. **When Handling Large Amounts of Unstructured Data**:
|
||||
- **Use Case**: Sentiment analysis, summarization of large documents, automatic tagging of images.
|
||||
- **Rationale**: Unstructured data (e.g., text, images, videos) often cannot be easily handled with traditional algorithms. ML models, particularly deep learning, can process and extract insights from these data types effectively.
|
||||
|
||||
#### When NOT to Use Machine Learning
|
||||
|
||||
1. **When the Problem Can Be Solved with Simple Rules**:
|
||||
- **Example**: Validating email addresses, basic arithmetic operations.
|
||||
- **Rationale**: If the problem can be defined using straightforward if-else rules or regular expressions, using ML adds unnecessary complexity and resource consumption.
|
||||
|
||||
2. **When You Don’t Have Enough or Good Quality Data**:
|
||||
- **Example**: Predicting sales with very few data points or with incomplete data.
|
||||
- **Rationale**: ML models rely heavily on data to learn patterns. Without sufficient data, the model is likely to overfit or produce unreliable results. It’s better to first focus on collecting more data or improving data quality before applying ML.
|
||||
|
||||
3. **When Interpretability and Transparency are Crucial**:
|
||||
- **Example**: Legal decision-making, medical diagnosis.
|
||||
- **Rationale**: Some ML models, like deep learning networks, act as "black boxes" and offer little interpretability. In scenarios where understanding the decision-making process is critical, using traditional, interpretable methods (e.g., rule-based systems or linear models) might be more appropriate.
|
||||
|
||||
4. **When There Are No Clear Performance Metrics or Objectives**:
|
||||
- **Example**: Exploring a new problem without knowing what to optimize for.
|
||||
- **Rationale**: ML models require well-defined metrics to evaluate their performance. If the problem’s success criteria are unclear or not measurable, it’s better to refine the problem statement and objectives first.
|
||||
|
||||
5. **When the System Needs to Operate with Low Latency and Limited Resources**:
|
||||
- **Example**: Real-time systems with strict performance constraints.
|
||||
- **Rationale**: ML models can be computationally intensive and may not meet the performance requirements of real-time systems, especially if resources like CPU or memory are limited. In such cases, lightweight algorithms or rule-based approaches may be more suitable.
|
||||
|
||||
6. **When the Cost of Error is Extremely High**:
|
||||
- **Example**: Autonomous driving, high-stakes financial trading.
|
||||
- **Rationale**: ML models are probabilistic and can produce erroneous outputs. In situations where errors can result in significant damage, loss, or risk to human life, using deterministic methods or combining ML with strong safety mechanisms is recommended.
|
||||
|
||||
7. **When Legal, Ethical, or Privacy Concerns Are a Priority**:
|
||||
- **Example**: Using personal data for predictive modeling without clear user consent.
|
||||
- **Rationale**: ML often requires large amounts of data, and using this data can pose ethical and legal issues, particularly if it involves sensitive information. In such cases, it’s better to avoid ML or ensure strict adherence to legal and ethical guidelines (e.g., GDPR compliance).
|
||||
|
||||
### Deciding Factors
|
||||
Here are a few questions to ask when deciding whether to use machine learning:
|
||||
|
||||
1. **Can the problem be defined clearly with rules?** If so, use traditional programming.
|
||||
2. **Is there sufficient quality data available?** If not, focus on data collection first.
|
||||
3. **Does the problem require adaptability over time?** If yes, ML can be beneficial.
|
||||
4. **Is interpretability crucial?** If yes, consider rule-based methods or simpler models like linear regression.
|
||||
5. **Are there strict performance constraints?** If yes, evaluate whether ML models can meet them.
|
||||
|
||||
In summary, machine learning should be used when traditional programming falls short due to the complexity or dynamic nature of the problem, and when there is sufficient high-quality data to support the model’s learning process.
|
||||
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user