by Suf | Dec 4, 2021 | Data Science, Programming, Python, Tips
Invalid literal for int() with base 10 occurs when you try to convert an invalid object into an integer. Python is good at converting between different data types. When using the int() function, we must follow a specific set of rules. If we do not follow these rules,...
by Suf | Dec 1, 2021 | Data Science, Programming, Python, Tips
Table of contentsWhat is a String?What is a Substring in Python?Using split()Using [start:]Using [:end]Using [start:end:step]Using List ComprehensionCheck if Substring Exists in SubstringSimilarities Between StringsPython String ComparisonSummary What is a String? A...
by Suf | Nov 30, 2021 | Data Science, Programming, Python, Tips
If we try to concatenate an integer with a string, we will raise the error “TypeError: can only concatenate str (not “int”) to str”. This error occurs because you can only concatenate strings with other strings. In this tutorial, we will go through the...
by Suf | Nov 27, 2021 | Data Science, Programming, Python, Tips
Table of contentsWhat is Cosine Similarity?How to Calculate Cosine SimilarityCosine DistanceVisual Description of Cosine SimilarityNumerical Example of Cosine SimilarityPython Example of Cosine SimilarityDifferences Between Cosine and Jaccard SimilaritySoft Cosine...
by Suf | Nov 25, 2021 | Data Science, Programming, Python, Tips
Understanding the similarity between two objects is a universal problem. In machine learning, you can use similarity measures for various issues. These include object detection, classification and segmentation tasks in computer vision and similarity between text...
by Suf | Nov 19, 2021 | Data Science, Machine Learning, Python, Tips
Machine learning is the science of programming a computer to learn from different data and perform inference. Yesteryear, machine learning tasks involved manual coding all of the algorithms and mathematical and statistical formulae. Nowadays, we have fantastic...