Hi, I am Faruq.

An AI engineer who occasionally writes papers.

Surprisingly, I Don't Know Much About Integer Division!

Today I learned a new thing that forced me to reckon my understanding of Python. It is about //. It is just not a double slash or typo. It is an operator called integer division. The detail about how this operator works is mentioned in PEP 238. So I came across the Code Signal test and stuck at this question: Fig. 1. What, wait?! I thought that the result of both snippets should be the same....

January 14, 2022 · 3 min · Faruq Sandi

How EMG/EEG signal features looks like

If you ever come across The Springfield Files episode, you may find the scene where Homer gets his lie detector test very amusing. But how actually does the lie detector (aka Polygraph test) work? This is pretty much an accurate description of how EEG works. As the video above, the signal output of the machine looks random. You won’t decipher the real message hidden deeply in the signal unless you are a machine....

December 22, 2021 · 5 min · Faruq Sandi

How to copy/clone scikit-learn estimator

Depends on the use cases, the way you want to copy the scikit-learn model may be different. In my case, last week, I have to train and test estimators against different targets. I work in EMG or EEG stuff and I need to estimate finger joint sensor reading. Unlike random forest and neural networks, other estimators usually do not support multi-output systems 1. That is means, for every single finger joint in my hand, I have to create an estimator....

September 26, 2021 · 3 min · Faruq Sandi

How to generate fake data with Python

While fake data provider exists for ages, with any kind of data provided along with your choice of data format, it is not usual to generate our own dataset in the runtime. The fake data is used to speed up the development process. Instead of waiting for the real data which may be slow and hard to obtain, why don’t we use the fake data instead for now, and replace it later with the real one later?...

September 15, 2021 · 5 min · Faruq Sandi