Linear Learner
Ref: https://www.udemy.com/course/aws-certified-machine-learning-engineer-associate-mla-c01/learn/lecture/45285403
- 🔧 Fit a line into dataset
- Linear regression → predictions based on linear function
- Classification → uses linear function as threshold
- Binary or multi-class function
- ‼️ Linear learner can do much more than linear regression!
- Works similarly to DL neural NWs
- 💡 If a dataset doesn't look like it can fit a line well, better use another algorithm
- Diagram
- Example: classify handwritten numbers from pixels
Input Data (Preprocessing)
- File & Pipe modes supported
- Valid formats:
- RecordIO-Protobuf (Float32 data only)
- CSV (First column = label)
- Should be normalized
- Either yourself or tell Linear Learner to do it
- Why? → So all features are weighted equally
- Should be shuffled → gets better results
Training
- Uses Stochastic Gradient Descend (SGD)
- Many optimization algorithms supported (SGD, Adam, Adagrad…)
- Trains multiple models in parallel
- Most optimal model chosen during validation
- Offers L1 & L2 regularization to prevent overfitting
- Instance Types
- single or multi-machine CPU
- single-machine GPU
- âť—Â Multi-GPU doesn't help!
Important Hyperparameters
Balance_multiclass_weights
- each class gets equal importance in loss functions
Learning_rate
& mini_batch_size