Logo TIB AV-Portal Logo TIB AV-Portal

Brainwaves for Hackers 2.0

Video in TIB AV-Portal: Brainwaves for Hackers 2.0

Formal Metadata

Brainwaves for Hackers 2.0
Title of Series
Part Number
Number of Parts
CC Attribution - NonCommercial - ShareAlike 3.0 Unported:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal and non-commercial purpose as long as the work is attributed to the author in the manner specified by the author or licensor and the work or content is shared also in adapted form only under the conditions of this license.
Release Date
Production Place
Bilbao, Euskadi, Spain

Content Metadata

Subject Area
Andreas Klostermann - Brainwaves for Hackers 2.0 This talk is a sequel to "Brainwaves for Hackers" and illustrates some experiments you can do with a Neurosky Mindwave headset, a bluetooth enabled EEG device. I'll also talk some more about how to integrate the device with the IPython Notebook for real time viewing and how to use the Mindwave with the Raspberry Pi.
Keywords EuroPython Conference EP 2015 EuroPython 2015
versions man boom traction water bits heads events theoretical potential libraries
period inference scale Computer animation information Fourier time analysis bits measures energy Results
time plots equal Ranges real time angles functions heads part image mathematics rates different workgroup Display framework classes exception man Development moment sample real time bits indicators Computing measures connections Types message-based processes testing pattern Rolling Right sort frame batch Slides component time-series analysis branch browser Mass CAP events period PIE Hacker report platforms user interfaces data processing Graph key interfaces analysis applications plane Computer animation Software case DAS statements cloud classes internet of things Display Routing localization near
choice bottom regression Java states time views outliers Ranges combination part sign framework model extent script man Arm regression concentrations binaries feedback bits Computing several connections mining Types means communication sum Right sort variations Results since laptop laptop batch table high resolution component maximal similar time-series analysis Stream events Twitter second period goods Correlation root terms profiles linear form tasks batch high resolution analysis directories applications timestamps Symbolic Computer animation case functions hybrid statements table coefficients family square libraries
web pages current point presentation functionality Regular Expressions code plots time sources real time browser part sun potential Arm framework mobile man icons information systems bits bin system call data management message-based Computer animation Software communication boom objects libraries
Meeting/Interview storage formal several connections number
hello from my name is the will someone and in this talk I will talk about libraries and all we as and hectares can use all the tools to explore all brains event last year due applies not heads of 1 . 0 version of this talk of this year I there's only certain minutes so I'm going to make it extremely short so stress of this theory behind brainwaves but we have to cover a bit of it so that every 1 of you understands what we're going be about the talks don't have a lot of overlap so this is really 2 portal now 1st of all what our brain is actually the blame rests on an electoral physiological potential that you measure on understand that basically is a water which
of measurements which is result over time there was electrodes that are on the sky and what you're measuring there is some to some potential most or even all your brain so all which
devolved electrical signals to communicate with each other but also a bit of a cynic he gets energy gets transmitted all at once and so you can structural measure it on on scale results having to go inside the skull I most of what the the most useful analysis of brain there's usually is the Fourier transform which basically only means that we assume that the signal is composed of several frequencies and we want to know which frequency is dominant and by doing that but we can infer something about what's a brainstorming because we know what read when certain in a certain frequency ranges over represented them gender subject is for example concentrated only lexical on that that kind of information now to
measure of this current that we we need an electroencephalograph from and these devices can be applied and cumbersome and quite expensive about what I have here is basically the newest I'm I'm by which is a which is connected headset a really low quality and very optimized for developers and hackers on and kept does all the amplification and stuff inside this headset and digitalizes data it also does something very preliminary analysis of the data so that you could be even connects us to work on your hands out of you would be able to turn the ship concentrated on so when are we use are not really sophisticated processes software indicators for that's quite nice and I've ordered
ideology framework and that is the framework for physiological experiments and as its currently mostly on his report mind made the EEG but eventually also called for ECG from battalion parts that's not activated currently it's powered by side by side Ayatollah yeah and it's not but I never so what I want to achieve this on and experimentation platform that works for do we just say people who don't have and that offensive equipment or something but I want to use mainly the bad which is this quantified serious type devices which grew to its connections although near future stuff and it's currently prices 3 . 4 on the and on that making heavy use of raising now you probably heard of the Internet of Things the basic idea is that that you have some local computers connected to and some kind of sensors and that's a pattern that I see in the branching in this data acquisition applications so a local component right very much but also as a computer is like a rest period policy on not or something because it has to be right next to the device and because of the role range of a sense of that and that's that's itself component which actually analyzes the data and that does not matter where it is just that it is connected to 1 network and the user interface connected also to plot and local image displays data and the user can interact with the analysis and in my case the local component is just basic I O data so that I've written it communicates all all local tools with armed with this thing here and it's also believes that the connection so if I switch it off and switch it on again then it really reconnect and try to fix also and that's quite nice to have that separated from the IPython grounded which is the cloud component because it's difficult to deal with it for the user to deal with all the exceptions that occur the and so on we have most of the data processing inside of the country event an endergonic pushes data to the user interface which is the a browser so in my personal like this 1 you have to solve the camera and and the interface and they are somewhat separated but you need to sort of 4 pies and anyway now I'm going to quickly show you a real time demonstration so the change of data because but nothing was connected to the noisy and not well this is real but as I I would be a silent for a moment so that you can appreciate moment when the problem was EEG also is that the brain has and are sold so we that pretty much everything is going on inside the on your had all the muscles of facial muscles and and I muscles or contribute artifacts through the data and are stronger than the actual brain data I can show you that I can try to clench my keys which are like strongest muscle in in the head I can also use my eyes to a yeah and not really and that makes the EEG signals are very difficult to analyze also this is supported by the graph and using by President Richard to push data out the from the can I know to use a remote books and also the kind of this 1 immunizing who internally so that it can communicate well that's all that is what I call and which handles the route was stuff don't know I'm and you can go to the next slide knowledge to some data science Data Scientist useful data science so we need some data for that and the 2 to get good data need experiments because discovery requires experimentation and this is the central idea in the by eulogy frameworks of that is the experiments of the experiment this year initial later is initialized and then immediately use as a decorator and much like the advisable into 1 and this decorated with when when I started from it was rate for data from the server and whenever there's no data this hand messages caught and it can then toss that can then do its thing true what do whatever in this case it just display the output of means the output is here and then some part that statement is written with the mass detention data so attention is the value that is computed by the newest and it's safe inside the headset and I can show you how that works and that is we only take so this is a very between 0 and 100 currently it seems I'm took totally inattentive but I can that push the higher well sometimes it doesn't work that way but we don't have time to that means that not experiment classes have this tributes that attention as a time series so every 2nd or so the such a value is computed by the device and send all of you to spend I try to figure out when that was that it's a bit difficult to do that in any case the panel's time series and stuff so got and so it's just accumulating the experiment what's is a raw data communication data in different so the other things also learned from communicated and start now that was 1 thing running experiments in real time but we also right to equality from that is done by giving it find and that is the age of 5 times in this case I think I have a box because like 1 or 2 gigabytes of data and that's it is completely crazy I have to fix that later and in any case and do the same as before but it displays the amount of raw data which is here and then experiment roll over 512 because auditors at 512 samples the 2nd now let's recall some raw data of the think it's not working included ml now to redirect the data we need to know the so-called pitch class and the Dutch class can restrict the data and and here we recorded data from another session which just as much the same as the experiment from I forgot to tell you what actually branch is every time run the experiment I records the
different batch so 1st time that she was the 2nd time and that she 1 and that way experiments don't right on data and you can also try to very easily experimental conditions on if you want to do that now
I'd like to show you next the symbol experiment I don't have time for a lot of them so I only do 1 so the newest mind they've compute these 2nd mutation attention values there's sort of the patent events and that sort of thing what I wasn't brother that they don't read it I also wanted to read them and and then transforming the time series data to a table feature so I don't have time to really explain what's going on there but it takes the nodes of a sort of the nodes of the time series data than I compute from different brain fear a frequencies act and in the same role also the raw attention and the meditation I wrote separates library which is stable enough and we need that to clean some of the data that because some of the data is on bad told you before and we have lots of artifacts in the data and we don't want you analyze and artifacts we want to analyze we'll EEG data so this statement in a library is inspired by John forms and these tabular data of nice thing is that all quotes both of annotated data set and a dataset of the so on the bottom we see a table of the root of mitigation costs and the reasons and the most polls 206 roles the to it's because and there was too much variation in the EEG data following the lead user when there's an artifact then we tried to removed that that that that wall the table also for signal is computed by dividing by the 900 itself but that's not so important and this so if you need to date of annotation thing maybe you should look into it and now I'm doing is a linear regression analysis so I said we have features of right most correlated with attention and meditation up and the linear regression on a task is it tries to explain some the tension value or the meditation value in terms of the frequencies trends so it modifies the each frequency with the coefficient and then they they are always something and that way to read that many of the out coefficient you know how important it was a different frequencies of for this the value and you can't poorer countries the labels on the references I didn't have time to make certain that all what what you may that you see is that we have here the is this all the highest and most of the significant coefficients are active that was so on the hybrid on the beach frequencies from 17 hundreds of what's offensive that that does just journal believe me when I tell you that there's a certain range of frequencies which is called beta frequencies between 17 and I think certainly what's different depending on the different issues and they are strongly associated with all sorts of attention and concentration of so if you're ever out of about the prefrontal cortex and the tension the city of some sort of brain also ADHD that has a lot to do with this with the fate of brain days now and I like to meditate a bit about meditation on there's a similar laughter parts we have more going on so here we have the values which are between in this case between like 8 and 10 want 10 not suggest significant but also some data values which are bit undecided being that's because most of the time I addressed to and it's true to do something concentration to enhance so i for values and during that stage you need to have a somewhat comment to picture the extreme view that exhibits a kind of 1 you close your eyes which is also easy but that's not what we want to to have In the case of these values are used in your feedback so you can write an application that looks for attention meditation and feedback to you and then you can learn how to consciously manipulate these brain states of what I was talking about last year at your place and running and to solve 14 and that also you because of the talk which right going to more detail about the psychology and biology behind what is on your stuff so this is all also sort of a implies as a linear regression implies that strength of the frequencies are not dependent on each other and so I don't know where I'm not pretend going to get it to work from many cases of correlated and this is not the only the other signs of Italy is correlated among each other and that much between xi and better and when but it has some biological meaning that I'm not going to go into that I'd like to make some technical remarks ruderals is really that's what I mean so if you have a good use data coming in and they don't come often often don't come with timestamps and these timestamps you have to get through them timestamps and the local component in discover that so and figure out which are the right type since industry do it wrong then have like all in data and causing all timeline is strictly forbidden except for cheap tricks yeah this thing I was very good for and problem resolution so you can do like you'd from read and write you from and so I do the 2nd whitest farther from being I wasn't was reconnecting and I can range for a few seconds and then you connect again the result disturbing anything notes the combination of walking and nautical Richard really on the rocks because of this model has its own and that sort of course the communication channel which I can use to and stream data to the JavaScript side and update the charts and in general debate on what was really great tool to computation narratives rises skip that are also event minded complicated narrative about the brain and about attention and meditation but I didn't really have time for more but you can imagine that you can do in real-time and experiment all arms show the computation rocks and also explain on narrates how all the data we're what sorts lots of things that the only by the origin framework is an example of the library for the notebook which really is big on the inside so I just this experiment decorator named entites hides all this vessel that increasing and other magic mostly from the user so I'd like to thank you you for your attention and my twitter and motivation was which was a few years ago supposed to be a part of their choice and also something about knowledge of something and my libraries by the origin just published it's very small and you probably won't get it to work and especially under throughout this little devised by the way the resistance is futile down and this table in the library I tried to make it a bit bigger because and had a lot of trouble with the times validating use the data and that the sort of mine attention fix the problems in any case brought also this notebook as a library which are used for for turning copies script into java script and solving it's from the actual library it's not from the extension stuff which I find that bitch troublesome because the outliers notebook profile of directory Nokia 1 1 direct connection to bring to hide some binary summation stuff and basically all thank you for your attention and we have time for some questions maybe but you know when you want to go to the lightning talks I but I tried to do
some stuff with that wouldn't mind where many years ago but I'm guessing that that's hi you're framework didn't exist and because had to connect the some some preparatory to executable that had to wrap stuff or so so this your Python code to the blue to stuff guess also the current procurement agent for my interest points from my older libraries from my interest it's a bit difficult to do and I think what's the newest doing isn't really that developer-friendly on the library side but support management and no question about so it is if there wanna get 1 of these years things instead I just had a brief look at the web pages of the news kind mind where mobile which is going to get in but yes I think that's the best advice 1 that is a bit more expensive and more variable about my things reduced government more what is best 1 that for like 100 2 100 euros currently you can also get it on amazon and of the actual and you only need that the device itself you don't need any of their self interesting just you must all also make something that even wire are ugliness directed to the sinking ship so as long as we have some time when you want to show that call for part of them apart because of the new you know by the way this I want to publish this in the notes but it wasn't able to need to push it gets from this network and it contains a lot of notes on of what I was talking about which are not visible in the presentation itself and so here's the thing about colds this is a real time data and was to to know what's going on here so normal OK the let's make a plot stuff and then use the raw source will be modeled source code and data sources which important to have a reference to it and then I'm my approach it the now the
message want know do something something and then I push the date of the converted data to this fossils data on those inside but the volcanoes with the spoken data objects no the idea on the browser are also on the Python science so I push this idea the year this and then replace book adaptive 1st and then we judge which has communication between the price insight and mobile site and it I've just this function replaceable at source which fortresses from the data source with the idea and the new data to the JavaScript side and then it deconstruct it and put that into the data source the bookie data sources on the browser and then magically through different colored so reference just go on the thank you I think that's the mind you know
this and world the requirements you the number of how things and the store things which but it's sometimes problems on this of the connection not convex novel connections made and I must be official grammar and just now it's really just wants to find the severity of religion that I would like to thank the lecturer think that's what they and what I think that the uncertainty of 1 of the things that you can you heard it here at religion and of that use of this technology to the of like that I can also be