Best macOS backend for graphics in Spyder IDE

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?

Continue reading “Best macOS backend for graphics in Spyder IDE”


Concatenate epochs across subjects in Python-MNE

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.

Spectral topography of click sound stimulation (just for education purpose).

Continue reading “Concatenate epochs across subjects in Python-MNE”

Decision tree classifier model

Introduction to machine learning

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.

Continue reading “Decision tree classifier model”

Data science with Python? No problem!

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.

Continue reading “Data science with Python? No problem!”