Data Science

Measure the performance of our model

Image for post
Image for post
Image by Author

Let assume that we’re working on a simple classification problem using deep learning. We gave the picture (blueberry) as an input to the model and get our prediction results (with probability) as follows.

How will you evaluate your model? Do you know about the difference between the top-1 and top-5 accuracy?

We test the model on 5 images and get the following results. …


Data Science

From 2012 to present

Image for post
Image for post
Evolutionary history of deep CNNs (Image by Author)

A convolutional neural network (CNN or ConvNet) is a specific kind of deep learning architecture. At the moment, there are many tech companies have developed active research groups for exploring new architectures of CNN such as Google, Microsoft, and Facebook and they demonstrated that CNNs are one of the best learning algorithms for understanding and analyzing image content that has shown high performance in image segmentation, classification, detection, and retrieval related tasks.

What is CNN?

CNNs were designed for image recognition tasks were originally applied to the challenge of handwritten digit recognition¹ ². The basic design goal of CNNs was to create a network where the neurons in the early layer of the network would extract local visual features, and neurons in later layers would combine these features to form higher-order features. …


Though Programmer

Adapter, Decorator, Proxy, Information Expert, Composite, Bridge, Low Coupling, Flyweight, Protected Variations and Facade

Image for post
Image for post
Structural patterns of design classes and objects

Structural design patterns are concerned with how classes and objects can be composed, to form larger structures. They enable you to create systems without rewriting or customizing the code because these patterns provide the system with enhanced reusability and robust functionality.

Each pattern describes a problem which occurs over and over again in our environment, and then describes the core of the solution to that problem, in such a way that you can use this solution a million times over, without ever doing it the same way twice. —Christopher Alexander

There are following 10 types of structural design patterns.


Data Privacy

Dissolving the myth of easy-to-fake face recognition

Image for post
Image for post
Image by Author

Thanks to the quick advance in technology, especially in computer science and electronics. Nowadays, facial recognition is becoming the second most largely deployed biometric authentication method at the world level in terms of market quota right after fingerprints. Each day more and more manufacturers are including face recognition in their products, such as Apple with its Face-ID technology, the banks with the implementation of eKYC solutions for the onboarding process.

Contrary to the main aim of research in face recognition has been given to the improvement of the performance at the verification and identification tasks, the security vulnerabilities of face recognition systems have been much less studied in the past, and only over the recent few years, some attention has been given to detecting different types of attacks consists of detecting whether a biometric trait comes from a living person or it is a fake. …


Fingerprints, facial recognition, hand geometry, iris recognition, retinal identification, voice recognition, keystroke dynamics, and handwritten signature

Image for post
Image for post
Image by Author

Biometric has been for long the target of future authentication that expected that biometric authentication will largely displace other means of our current authentication and access control. Biometric systems can be used in two distinct modes as follows.


Thought Programmer

How do we beat the CAP theorem?

Image for post
Image for post
the CAP theorem

There is one theorem in computer science called the CAP theorem states that it is impossible for a distributed data store to simultaneously provide more than two out of the following three guarantees.

A Brief of History

In 2011, Nathan Marz proposed an important approach to tackling the limitations of the CAP theorem in his blog¹, it called the Lambda architecture. …


Thought Programmer

Explaining common different architecture patterns

Image for post
Image for post
Photo by Alexander Andrews on Unsplash

An architectural pattern is a general, reusable solution to a commonly occurring problem in software architecture within a given context.

A pattern is a solution to a problem in a context.

Many programmers are nowadays still confused about the difference between architecture patterns or don’t even know much about it.

Let me explain to you…!

Layered Architecture

The most common architecture pattern is the layered architecture or known as the n-tier architecture. It is widely known by most software architects, designers, developers. Although, there are no specific restrictions in terms of the number and type of layers that must exist, most layered architecture consists of four tiers: presentation, business, persistence and database as follows. …


What is in the picture?

Image for post
Image for post
Photo by Karsten Winegeart on Unsplash

How to predict an image’s type?

There are the following six steps to determine what object does the image contains?


Thought Programmer

What’s different between them?

Image for post
Image for post
Photo by Edwin Andrade on Unsplash

Nowadays we have many options when it comes to architecture design patterns. After developing many apps using Model-View- ViewModel (MVVM), Model-View-Presenter (MVP), and Model-View-Controller (MVC), I finally feel qualified to talk about the differences between them. For easier to understand, we can use a simple example like developing a screen to search books in the BookSearch App.

Let’s begin now…!

MV(X) essentials

First of all, we need to understand briefly MVC, MVP, and MVVM architecture before dive into them.

Why Model-View-(C or P or VM)?

The aim of these architectures is to separate the responsibilities of visualizing, processing, and data management for UI applications.


Thought Programmer

Loops may achieve a performance gain for your program but recursion may achieve a performance gain for your programmer

Image for post
Image for post
Photo by Jen Theodore on Unsplash

Recursion is a problem-solving technique, where the solution of a larger problem is defined in terms of smaller instances of itself. You can try to imagine an example in the real world when you’re digging through your home and come across a mysteriously locked suitcase, the key for the suitcase is probably in this other box. This box contains more boxes, with more boxes inside those boxes. The key is in a box somewhere.

How to search for the key?

There are two popular approaches for us to solve this problem.

The first approach

In this solution, we use a while-loop algorithm: “while the pile isn’t empty, grab a box, and look through it.” …

About

Trung Anh Dang

I write about things that I like and things that I don’t, mainly in the business, art and tech sphere. Sign up for my newsletter http://junryo.xyz

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store