I have always wanted to try Apple HomeKit out. While I did’t want to spend ridiculous amount of money to just find out I have decided to build this on my own as see.
I had RaspberryPi 3 in home without any purpose. Originaly I bought this computer for learning in electronics and programming. I did some basic stuffs like controling LEDs, LCD etc. and then I bought Arduino for my projects. So it was the right time to get a life to this little guy.
This time it will be short review of what I have found. As you can read here I got to work Spyder IDE in macOS as standalone app with Python 3.5 in it (backed it up in DMG file).
As I usually work with EEG data I picked a MNE module for my data analysis tool. In this manner I need to use interactive graphs and plots. On retina screen which is not still managable in Qt5 enviroment from some reason.
So, what to do when using retina resolution at macOS and would like to use interactive plots?
If you are same as me, you probably love to work with Python because of it’s versatility and open-source. Since I was participated on some Python projects I started to do more in Python than in MATLAB as I did before. But I like clean solutions.
I switched to open source science in my case done by open source Python module MNE. Python-MNE has also module for MATLAB (for reading MNE dedicated FIF files containing everything) and C (for source localization and channel corregistration toolbox, which I believe only works on Linux and macOS). It works with Python 3 and above same as with good old 2.7.
Today we take a closer look at the most basic machine learning algorithm to train on well-known dataset of Iris flowers (it has itself even Wikipedia page) and predict new Iris flowers based on your measurements.
First of all, we need to have Python installed (this tutorial is written for Python 2.7). Then some proper Python IDE or some text editor. I highly recommend Spyder (for Windows) and CodeRunner (for macOS).
We are ready to go. So how machine learning works? Well, you need some dataset and some classifier. Each dataset has to contain some measurements e.g., attributes and some labels of class e.g., predictors. Each row represents one instance. On the other hand, classifier is considered as instance of sci-kit learn library object (programmatically speaking). So we need some dataset and create instance of some classifier to train it.
Maybe you think what is the purpose of using Python when MATLAB is around (or maybe Maple, Mathematica or even R). First of all I lived in paradigm that Python is only good for learning and for proper coding I would rather use C++ and for scientific computation MATLAB or R.
My EEG expertize is based on MATLABs toolbox EEGLAB. I faced too many times compatability issues (newer version of MATLAB versus newer version of EEGLAB) and so slow performace (in some tasks). Since then I re-discovered a Python programming language and started to experiment with it.
Then i found excelent tool for EEG analysis Python-MNE, machine learning and others. Not even that works everywhere and it is open-source but it is soooo faster than MATLAB. Did I mention that every Python module I have tried had great documentation with gallery of most wanted exampled from scratch to final product? And tutorials on GitHub? No? Well, that’s why I try to switch to Python as many scientists are nowadays.