Computer Science Notes: Introduction to Machine Learning
1. What is Machine Learning?
A subset of Artificial Intelligence (AI) that allows systems to learn from data.
Improves performance without explicit programming.
Involves pattern recognition and decision making.
2. Types of Machine Learning
Supervised Learning:
Uses labeled data.
Examples: Linear Regression, Decision Trees, Support Vector Machines (SVM), k-NN
Unsupervised Learning:
Uses unlabeled data.
Examples: Clustering (K-Means), Dimensionality Reduction (PCA)
Reinforcement Learning:
Learns through rewards and penalties.
Example: Game AI, Robotics
3. Common Algorithms
Linear Regression: Predicts continuous value.
Logistic Regression: Classification problem.
Decision Trees: Tree-like model of decisions.
k-Nearest Neighbors (k-NN): Classifies based on proximity.
Support Vector Machine (SVM): Finds optimal boundary.
Naive Bayes: Probabilistic classifier.
K-Means Clustering: Unsupervised grouping of data.
4. Model Evaluation Metrics
Accuracy: Correct predictions / Total predictions.
Precision: True Positives / (True Positives + False Positives).
Recall: True Positives / (True Positives + False Negatives).
F1 Score: Harmonic mean of precision and recall.
Confusion Matrix: Table layout for prediction outcomes.
5. Overfitting vs Underfitting
Overfitting: Model performs well on training data but poorly on new data.
Underfitting: Model performs poorly on both training and test data.
Solutions: Cross-validation, Regularization
6. Tools and Libraries
Python Libraries: Scikit-learn, Pandas, NumPy, Matplotlib
Advanced Tools: TensorFlow, Keras, PyTorch
7. Applications of Machine Learning
Email Spam Filtering
Image and Speech Recognition
Predictive Analytics
Medical Diagnosis
Recommendation Systems (e.g., Netflix, Amazon)
Summary
Machine Learning is revolutionizing industries.
Learning algorithms and data preparation are key to success.
Real-world ML projects require understanding of data, model selection, and evaluation.