as good as one can be job-hunting

Job Search

My goal was to obtain a full time opportunity by the end of summer 2022 in the beginning I embarked on working with Borealis AI on developing FIRST E.A.D. I have applied to approximately 270 roles now, however asI was focused on tailoring my resumes and cover letters to meet each job description I applied to. I failed to keep a record of my job applications, this became an issue as I started to apply to roles, and the website wouldn’t accept the application because I had already applied submitted an application for it last week.

Continue reading “as good as one can be job-hunting”

FIRST E.A.D: Completed Model and Final Thoughts

Goal

We began 2 months ago, to develop a ML model to detect distress using EEG signals.

First  Month:

we were confused where to begin, the cloud servers were hard to navigate with for some of us. EEG data collected from subjects in pain, was just impossible to find, leading us to look for what we can get. We came across grasp and lift and SEED after 2 weeks of looking.

The first route of action was to understand the data, are there any missing values, how was it collected, are there any special attributes or patterns that can be used for our purpose.

The EEG data is recorded at 1000Hz (0.001s) but downsampled to 200 Hz which is 0.002s, I used time series concepts studied at UBC. Transformed the data into frequency domain using a spectral density function but soon realized due to alterations in such a small time frame, the signals would seem like white noised the autocorrelations would not be accurate due to the downsampling.

After deciding the traditional approach of building a simple LR model and then improving the base model using ML models would not be feasible due to lack of domain specific knowledge. I decided to focus my efforts more on combining both datasets together as the ideal model would only have one raw-eeg input.

The SEED data is sparse, and the authors did a fantastic job in providing the datasets with working tutorials that were building blocks for me to extract data. The MNE package is another great tool that allowed me to pick channels that are in both motion and emotion datasets. This ensured similar dimensions of the EEG data.

Selected 28 EEG nodes (marked in red).

Continue reading “FIRST E.A.D: Completed Model and Final Thoughts”

FIRST E.A.D: Proposed Methods and Challenges

Goal is to merge two datasets, Motion and SEED. due to different dimensions I have to drop 34 channels from SEED and use only 28 channels for input.

Power-Spectral Density Function

the EEG signals are a time series data stream, the above figure shows the power spectral density of the 28 channels, this function uses Fourier transform to convert time domain to frequency domain. This allows us to learn about relationships that are not sequential like the weather patterns but like population growth patterns (refer to the hare and lynx population problem).

28 EEG Sensor Placement

the sensor placement above shows the 28 channels that are present in both datasets.

There are 3 methods that seem feasible to go ahead with to achieve our goal of using EEG signals to send distress calls in need.

1. Separate Features -> Ensemble

This method is quite extensive to code, but the logic is simple and would most likely provide the best results.

we use a total of 56 features (EEG channels), 28 from the intersection and the other 28 being a weighted sample from the Motion and Seed sets. To train several CNN models for every combination of 56 features.

The weights would be calculated using gradients, similar groups of EEG would be selected based on gradients. this would help us identify nodes that have similar patterns with a given motion and emotion.

In the end we would have an ensemble layer, that compiles the best performers of all the networks trained, from this layer we would be able to identify the important electrode nodes to use to send distress signals.

2. Downsample

Is our Minimum Viable Product, this is the easiest model to implement, as we restrict our dataset to 28 channels for input and then to overcome different dimensions of the arrays we vary the batch size accordingly for a larger sample we would use smaller batch size and vice versa.

There are various optimization techniques we can implement in this method. such as:

  • alternating strides and padding to improve training.
  • Spatial Decomposition Analysis
  • Time Series Techniques such as LSTM, (which is essentially telling our network layers to retain information about t-1, while optimizing the loss function at t)
  • Attention factors ( allow the network to decide and accordingly assign weights to nodes that are not false/noisy)

3. NeuroPsychology

this method is likely to be the golden solution with far greater challenges on its path. It requires extensive knowledge of neuroscience to engineer features that show causal effects rather than correlated features.

For instance there must be some channels that provide signals for Flight/Fight response in human beings, we would pool such nodes or use a linear combination of them to effectively obtain signals to such responses. This would reduce our false positives and improve our ability to save a human life.

Reference

As I dwell further in modeling, I often look back and try to understand the data as much as I can. I don’t have any experience in neuroscience, but I do have extensive skills and tools in Causal Inference, Machine Learning and Time Series Analysis.

I found the paper on learning CNN features from DE features for emotion recognition quite useful and do plan to apply similar feature engineering techniques in the motion dataset, to see if I achieve better results for a shorter run time.

Continue reading “FIRST E.A.D: Proposed Methods and Challenges”

FIRST E.A.D: Convolutional Neural Networks (CNN)

Spatial Invariance

We essentially scan the waves with a motion detector and assign a score to each run of waves, indicating the likelihood the subject is lifting, grasping or holding.

CNNs systematize this idea of spatial invariance, exploiting it to learn useful representations with fewer parameters.

What does it mean by “Convolutional”? and why should we care?

While previously, we might have required billions of parameters to represent just a single layer in an data-processing network, we now typically need just a few hundred, without altering the dimensionality of either the inputs or the hidden representations. The price paid for this drastic reduction in parameters is that our features are now translation invariant and that our layer can only incorporate local information, when determining the value of each hidden activation. All learning depends on imposing inductive bias. When that bias agrees with reality, we get sample-efficient models that generalize well to unseen data. But of course, if those biases do not agree with reality, e.g., if data turned out not to be translation invariant, our models might struggle even to fit our training data.

Continue reading “FIRST E.A.D: Convolutional Neural Networks (CNN)”

FIRST E.A.D (EEG Aided Detection): Intro

Abstract

Working or Travelling in the backcountry carries inherent risk. In British Columbia (BC) there are 1900 incidents per year, out of which 2100 people have been rescued by 3000 volunteers in 79 SAR (Search and Rescue Groups) [Dwight Yochim]. The only mode of communication is a Satellite Emergency Messaging Device (SEND).these devices combine the functions of a GPS with a commercial satellite phone in text only (SMS) mode. They are not able to make voice calls, but they can send text messages through various gateways to email, mobile phones and to social media.

Triggering a SEND device means hitting the “SOS” or “911” button intended to issue an emergency alert call for help. When a SEND device is triggered, the following sequence of events occur:

  • User’s position and request for help are sent through a commercial satellite system to a ground monitoring agency.
  • Agency passes along the alert to the appropriate local responding agency. In British Columbia this is the Joint Rescue Coordination Centre (JRCC) in Victoria, BC.
  • The JRCC determines what kind of response is required. For ground-based alerts they send the message to EMBC’s Emergency Coordination Centre in Saanichton, BC.
  • The ECC activates the nearest BC ground search and rescue team.
  • The team mobilises with resources depending on the location and severity of the incident.

In the 2021-22 winter season 35 people died in the US and the average annual deaths related to winter activity is 22.8 [BC Coroners Service] in BC. This number is likely to climb as it is getting harder to anticipate hazards given climate change and rising uncertainties related to snowpack. Assuming we have the data, we believe it would be beneficial if we can predict real time health conditions in case of an emergency based on a pattern extracted from the past. Having a prediction will allow SAR groups to mobilise resources accordingly.

Continue reading “FIRST E.A.D (EEG Aided Detection): Intro”

Simple Moving Average Trading Strategy

A simple moving average (SMA) calculates the average of a selected range of prices, usually closing prices, by the number of periods in that range.
The SMA is a technical indicator that can aid in determining if an asset price will continue or reverse a bull or bear trend.
Strategy

The agent buys the AMZN stock when the SMA for 5 days, is greater than the SMA for 9 days. The agent sells vice versa.

 

Continue reading “Simple Moving Average Trading Strategy”

Spam prevention powered by Akismet