ML Bit #37 When communicating the performance numbers for your machine learning models to the stakeholders, do say that 3% error doesn't mean that the model will take the same input 100 times and fail 3 times. If all the 100 inputs are hard for the model, it will fail 100 times.
ML Bit #36 In machine learning, if there's an implementation error, and your model is suboptimal because of it, there's no way you can know that. Unless you implement one or multiple benchmarks one of which would beat your solution.
When trying to solve a new problem using machine learning:
1) Find a public dataset for solving a similar problem to yours
2) Solve the problem using this similar dataset and compare your result with a published one
3) If success, replace the public dataset with yours
Several sponsorship spots are left in October in my weekly AI newsletter with more than 470,000 subscribers. If your company's business is based on AI or data or you organize an event in this domain, it may be a fit. If you are interested, please contact [email protected].
ML Bit #34 If your model must predict perfectly all examples from the training, validation, and test data, but you still need holdout data for model validation, then in production use a database lookup for all examples that you already have, and only use the model for new data.
Currently, three counterfeit sellers sell my book on @amazon : Blue planet UK, Prowisdombooks, and assis books. They took over the "Buy Now" and "Add to Cart" buttons and I lost almost all sales. Amazon's been aware of the situation for more than 10 days now. Beware!
ML Bit #33 When you deliver a model, make sure that all stakeholders understand that your model's performance is guaranteed *only* when the model's input in production obtained following *exactly* the same procedure. Otherwise, there's only hope, no guarantee.
ML Bit #32 When choosing machine learning algorithms/models for your problem, choose those that are the fastest on your dataset with the default values of hyperparameters. This will allow you to test more hyperparameter configurations and will give you a strong baseline.
ML Bit #31 Most scikit-learn supervised learning algorithms for classification are prohibitively slow for a typical 2020's dataset. Except for SGDClassifier: super fast and accurate.
ML Bit #30 Be careful when buying data for machine learning: you can purchase crap generated by a poorly trained model disguised as an original dataset.
ML Bit #29 Model ensembling can be very powerful, especially when you combine orthogonal models: those trained on different types or sources of data or using different ML algorithms: different architectures of neural networks, tree-based algorithms, kNN, and SVM.
ML Bit #27 Use your model to find the wrong labels in your training data. If your model predicts a different label, verify that the label in the training data is correct, fix it if needed, and retrain the model.
ML Bit #26 When you need to compute the dot product between two vectors, never use a for-loop. Use https://t.co/6tMa5otMtV instead. It will be ~100 times faster.
ML Bit #23 Classification can be 1) binary when the model outputs one label and that label can have one of two possible values, 2) multiclass when the output label is still unique but can be one of the N values, and 3) multilabel when the model can output several labels.
ML Bit #21 Before training a neural network, train a baseline. XGBoost has a great performance out of the box and would serve as a good baseline. Other choices: Linear SVM, logistic regression, and kNN with k=3 or 5 and Euclidean distance.
ML Bit #20 If your neural network has two outputs or you would like to optimize two cost functions, it's possible by introducing another hyperparameter cost = gamma \times cost_1 + (1-gamma) \times cost_2. The value of gamma rages in (0, 1) and to be tuned on validation data.