Human vs Machine Learning – for kids – Part II

Continue from my Part I post

Now it is turn to know, how a machine do similar things to act smart.

In contrast to what we discussed about human senses in previous post, I started asking my son, some basic computer questions like, “What acts like brain and input senses like we identified above for computer? “

He ran horses of his mind and said a word called “Sensors” which is used as input senses. This topic we also touched a bit in Part I. Now my curious question to my kid was “What is a Sensor ?”

My Kid’s definition of Sensor “It is a device which measures/detects, what you ask (program) it to.

That was impressive and near to what Sensor is in actual. I familiarize him little more with Sensors subject. I gave him below definition :

sensor is a device, that measures a physical quantity and converts it into a ‘signal’ which can be read by an observer or by an instrument. Like Thermometer

A good sensor obeys some rules, to be called a Sensor:

  • It do what it is configured for (measured property)
  • It ignores everything else (other property), encountered in it’s use

I want to explain types of sensors but it will be too much load at this time, so I kept that topic for future.

Now we have established that device called Sensor acts as senses to Computers. Now question is, what machine senses are human equivalents ?

I told him we are surrounded by different sensors in various devices in our home and if he can detect them and provide me some examples ?

He started thinking, I gave him some hints like “how computer can see us” and he identified “Camera”, which help computer to see.

Then we discussed about hearing, and talked about how computer or smart devices like Google Home / Alexa listen to us and he Identified “Mic”.

Next sense we talked about was “Smell”, it was quite challenging for him to guess, but then we talked with a hint “What happen in kitchen, when your mom makes his favorite Parantha or fried food items “, he said “After some time Nest start complaining about “Smoke in the Kitchen“, and he got the fact that it is a Smoke Sensor. 🙂

What next in sense’s identification, it is “Taste Senses”, this was also a bit difficult for him as it is not that straight forward. We talked about an example “Do you remember when your grandfather test his Blood Sugar every week, how he do it ?” and my kid explained “He take a pinch using needle to get drop of blood, then drop it over a strip and attach to machine, where it tells you some number.” I asked “So what it is ? :)”, his reply “Ooooo that strip and machine both taste and sense?” I said yes.

And will answer about that combo (Strip + machine) later in this discussion after finishing last sense.

So we are now left with one sense which is Touch sense and he jumped saying “I know this -my school Chromebook”, my response was “You got It :), another one is Touch lamps to do on/Off”.

example where floating sensor let computer know about water level

So now we concluded with what sensors are and how they map with Human senses.

Human Senses Computer / Machine Senses
VisionCamera
HearingMicrophone
Smellsmoke sensors, gas sensors (famous name Nest)
TasteBlood Diabetes monitor, soil pH monitor
Touchtouch laptop and phones, elevator touch sensor, lamp touch on/off
Human vs Computer senses

What next ? We have the input data using Sensors, What acts as brain?

My kid said “Computer’s motherboard chips”, it was very near and ok, as he was not aware of computer elements much in details.

I explained him with some examples, to clarify, how Computer’s so called chips (processor) act as a brain.

Sensors act as an Input, Computer Chips works as brain to calculate that data and identify results as per desired requirement and related coding, uses monitor to display output.

Image Courtesy : Google Image Search

We picked back example of that Blood Sugar meter, where Strip was a sensor and Machine was brain with specific program coded to read that data and give value. and My Kid’s response was “Oooooo, now I can relate”.

So mission accomplished for this Part II 🙂

In next and final part, we will be explaining, how Learning is done by computers and working on a Image Classification hands on project 🙂

Human vs Machine Learning – for kids – Part I

This weekend, I was reading some articles about Machine Learning and was trying some hands-on, which my 10 year old boy noticed and starting firing his curious questions. 🙂

His first few questions after looking the topic were “What is Machine Learning ? and how can machine learn as it is not alive ? “

And I started thinking how to make him understand this interesting topic in layman terms.

I thought to start with a collaborative comparison, between human and machine, to make him realize, what are basic differences between two and how Machine Learning help computers to be smart, in some limited use cases.

I asked him, “how we as human learn things, and he answered by reading, watching, touching and brain helps process that information.”

I stopped him and asked, “how do you know when you looked at some object first time, about it’s name, shape, color ? For example – if you looked at a car, how do you know, that it is a car, of model Odyssey and of white color?”

He took few seconds and said “I know that this is a car, and I can read it’s name and see it’s color”

I asked him again, to “think like he is looking at any kind of car first time and don’t know about cars as subject.”

and he said “it will be you or mom, will tell me that this is a Car, of white color and what it is used for.”

and I asked, what will happen when you see similar object again “I can say that this is a car”

He got the point, what I am trying to establish 🙂

I asked him to continue and name our senses, which work like input/output sensors to our brain. (We will touch sensors more in next part.)

He started naming them as below :

image courtesy: google image search

Till now we have established, that there are some senses which act like input for human’s brain, using which brain do some processing, but it also need some guidance to process that information to establish some facts.

Now it is turn to know, how a machine do similar things and act smart.

I will cover that part in Part II of this topic 🙂

I hope this will help your little ones to understand this complex subject and inspire them to research more in this direction 🙂

Will catch you soon in part II.

Battery Capacity

Battery capacity (Ah) is defined as a product of the current that is drawn from the battery while the battery is able to supply the load until its voltage is dropped to lower than a certain value for each cell.

Here below are some conservative power ratings for good quality alkaline-manganese dioxide batteries, which are available in your near by groceries.

Battery TypeCapacity (mAh)Typical Drain (mA)
AAA100010
N65010
9 V50015
AA240050
C6000100
D13000200

Lower the current drawn, better the capacity of a battery. To find out battery life, divide the capacity by the actual load current to get the hours of life.

Continue reading “Battery Capacity”

Azure – increase Linux VM OS Disk size

I am using Azure Linux (Ubuntu) VM’s default OSDisk 30 GB, due to data and other files there was a need emerged to increase that size.

I went to Azure portal and it was straightforward to increase disk size. Shut down VM, alter Disk config to increase size, save and reboot machine.

But surprisingly nothing changed when i checked the size again using df -h

Then i started reading the documentation of Azure and came across below URL (see bottom ref section) which explained that Portal only create / modify size but you still have to do update of partition , modify of filesystem to reflect recent changes.

Also on my /dev/sda i was getting below error

GPT PMBR size mismatch (62914559 != 125829119) will be corrected by w(rite).

started reading on stack blogs and found the reason and solution for this GPT error. As we recently increased the size which was not completely utilized so system was complaining about it.

Below commands i performed to resolve my issue and they are pretty standard what i found when you have to work on Linux fs.

Continue reading “Azure – increase Linux VM OS Disk size”

Error: socket hang up

While working with Node.js microservice that had some long-running request/queries, I needed a way to increase the request timeout for the Express application.

It is not clearly defined in documentation and not at all, in the Express documentation so here’s how you do it.

Simply put, you need to configure the timeout value on the HTTP Server that express generates when you call the listen method.

Continue reading “Error: socket hang up”

Https SSL cert name mismatch warning – “The security certificate presented by this website was issued for a different website’s address.”

Recently I was working on one project and encountered an Interesting issue related to SSO server’s SSL Cert where it was complaining about being used for a domain name other than it was registered for.

During investigation it was revealed that there are two domain names are configured with same IP. Cert was generated with alias name, hence it was complaining when we call the primary URL which was not listed in that cert.

What that meant is, let say – you have a self-signed cert for local domain “localhost” but you trying to use it for “test.nits.com” as well and both pointing to same IP address for example “127.0.0.1”.

When we trying to call localhost it works fine, as cert have it listed.

When we trying to use other local domain, it giving warning

So what is the problem here with SSO call, as this is just a warning ?

So when we try to call this HTTPS domain where name is mismatching in cert, Async call from project is getting rejected with below error, saying certificate is invalid as per validation procedures.

System.Net.Http.HttpRequestException
Continue reading “Https SSL cert name mismatch warning – “The security certificate presented by this website was issued for a different website’s address.””

Trying to Login with DOMAIN\USERNAME but getting error “Login failed for user ‘DOMAIN\MACHINENAME$'”

There are two servers, one is app and one is Db both hosted on AWS separate EC2. App server have an IIS and logged in with service account to communicate with DB server. Application is using Trusted_Connection option in connection string so that not have to specify credentials and communicate as logged in user. While communicating App server hits with below error, IIS app was configured with default AppPoolIdentity –

System.Data.SqlClient.SqlException: Login failed for user ‘DOMAIN\MACHINENAME$’.

Continue reading “Trying to Login with DOMAIN\USERNAME but getting error “Login failed for user ‘DOMAIN\MACHINENAME$’””

Node-sass module issues while working with private npm registry or artifactory like JFrog

Node-sass is one of famous library used by Node Js projects now days. Nodesass is a library that provides binding for Node.js to LibSass, the C version of the popular stylesheet preprocessor,Sass. It allows you to natively compile .scss files to css at incredible speed and automatically via a connect middleware.
When you install this library it download binary as per the machine on which you are running it.

Like if you are on a windows machine 64 bit architecture, it will try to download
“win32-x64-57_binding.node” and different binary in case of other OS.

It works all fine when you are on a machine where you have no internet restrictions in term of opening a site like in this case these binaries are located on GITHUB. So if you have access to github you will see ‘npm install’ going smooth.

But what if your organization mandates to use private artifactory solution like JFrog and have no access to Github ??

npm install complaining about unable to download binary and suggesting to use proxy

Don’t worry we have solution for this =)

I am going to tell you two ways to tackle this situation, one for old version of node-sass like nodes-sass@4.5.3 (it was in my case) and one is for latest versions which are more configurable.

Continue reading “Node-sass module issues while working with private npm registry or artifactory like JFrog”

“The page is performing an async postback but the ScriptManager.SupportsPartialRendering property is set to false. Ensure that the property is set to true during an async postback” OR “Invalid postback or callback argument”

Recently I was working on performance testing for one of my application and  came across this issue where all of my call failing in JMeter.

I started analyzing and found it was a wizard where series of calls were on same page using ASYNC Ajax calls which were complaining “The page is performing an async postback but the ScriptManager.SupportsPartialRendering property is set to false. Ensure that the property is set to true during an async postback”  due to which my main POST was failing with error “Invalid postback or callback argument”.

The strange thing was all of this was working fine when run via UI. Then started reading about when this error occurs and came across one discussion on a forum where they mentioned about SupportsPartialRendering is not supported by every browser

Continue reading ““The page is performing an async postback but the ScriptManager.SupportsPartialRendering property is set to false. Ensure that the property is set to true during an async postback” OR “Invalid postback or callback argument””

Google Cloud Platform : Enable Authentication with SSH and Password using AuthenticationMethods option

Here I am going to explain, how to enable Key and Password based authentication in linux instances of Google Cloud. This can be applied on other Cloud or standalone Linux instances. But do check manuals 🙂

When i say Key + Password, I am not referring passphrase which we give while created Private/Publich SSH key. I am referring to multiple auth methods where system will be first authenticated via PubKey and then via Password.

If your Pubkey is not matching it won’t allow you to login. If password not matching then also it won’t allow you to login. You must use exact same credentials which you configured.

I am not explaining here how to create SSH keys or password, I am assuming you already know that.

Continue reading “Google Cloud Platform : Enable Authentication with SSH and Password using AuthenticationMethods option”