Web Snippets
Tuesday, June 23, 2020
Monday, June 15, 2020
Wednesday, February 5, 2020
Wednesday, January 29, 2020
Error functions
- In most learning networks, error is calculated as the difference between the actual output and the predicted output.
- The error function is which tells us how far are we from the solution.
- The function that is used to compute this error is known as loss function.
- Different loss functions will give different errors for the same prediction and thus would have a considerable effort on the performance of the model.
Canny edge detector
The Canny edge detector is an edge detection operator that uses a multi-stage algorithm to detect a wide range of edges in images. It was developed by John F. Canny in 1986. Canny also produced a computational theory of edge detection explaining why the technique works.
Grayscale to RGB conversion
we will convert an color image into a grayscale image. There are two methods to convert it. Both has their own merits and demerits. The methods are:
- Average method
- Weighted method or luminosity method
- using skimage
Average method
Average method is the most simple one. You just have to take the average of three colors. Since its an RGB image, so it means that you have add r with g with b and then divide it by 3 to get your desired grayscale image.
Its done in this way.
Grayscale = (R + G + B / 3)
pyplot
Provides a MATLAB-like plotting framework.
pylab
combines pyplot with numpy into a single namespace. This is convenient for interactive work, but for programming it is recommended that the namespaces be kept separate, e.g.:import numpy as np
import matplotlib.pyplot as plt
x = np.arange(0, 5, 0.1);
y = np.sin(x)
plt.plot(x, y)
Subscribe to:
Posts (Atom)
Labels
- Algorithms (52)
- Apache Kafka (7)
- Apache Spark (21)
- Architecture (8)
- Arrays (23)
- Big Data (98)
- Cloud services (6)
- Cognitive technologies (12)
- Data Analytics (3)
- Data Science (6)
- Design (1)
- devOps (1)
- Hadoop (26)
- Hive (11)
- Java (2)
- JavaScript (65)
- JavaScript Run-time (12)
- Machine learning (11)
- Maths (6)
- mongoDb (2)
- MySQL (1)
- Networking (3)
- No SQL (2)
- Node (20)
- Python (28)
- Security (4)
- Spark Grpahx (1)
- Spark MLlib (1)
- Spark Sql (3)
- Spark Streaming (4)
- SQL (40)
- Sqoop (2)
- ssis (3)
- Strings (13)