Skip to main content

Blog

Learn About Our Meetup

5000+ Members

MEETUPS

LEARN, CONNECT, SHARE

Join our meetup, learn, connect, share, and get to know your Toronto AI community. 

JOB POSTINGS

INDEED POSTINGS

Browse through the latest deep learning, ai, machine learning postings from Indeed for the GTA.

CONTACT

CONNECT WITH US

Are you looking to sponsor space, be a speaker, or volunteer, feel free to give us a shout.

Author: torontoai

[P][R] ML in the embedded world

The last couple weeks I’ve started experimenting with ML. As an electronic engineer I’m focus on the embedded domain and the last years on the embedded Linux domain. The last few months the semiconductor industry has turned to ML (they like to call it AI) and from now on almost all the new CPUs and MCUs are coming out with some kind of AI accelerator. The software support for that HW is still quite bad though, so there is plenty of HW and no SW, but it will get better in the future, I guess.

That said, I though that it was the right time to get involved and I wanted to experiment with ML in the low embedded and the Linux embedded domain, providing some real-working examples and source code for everything. The result, was a series of 5 blog posts which I’ll list here with a brief description for each one.

  1. [ML on embedded part 1]: In this post there’s an implementation of a naive implementation of 3-input, 1-output neuron that is benchmarked in various MCUs (stm32f103, stm32f746, arduino nano, arduino leonardo, arduino due, teensy 3.2, teensy 3.5 and the esp8266.
  2. [ML on embedded part 2]: In this post I’ve implemented another naive NN with 3-input, 32-hidden, 1-output. Again the same MCUs where tested.
  3. [ML on embedded part 3]: Here I’ve ported tensorflow lite for microcontrollers to build with cmake for the stm32f746 and I’ve also ported a MNIST keras model I’ve found from a book to tflite. I’ve also created a jupyter notebook that you can hand-draw a digit and then from within the notebook run the inference on the stm32.
  4. [ML on embedded part 4]: After the results I got from part 3, I thought it would be interesting to benchmark ST’s x-cube-ai framework to do 1-to-1 comparisons with tflite-micro on the same model and MCU.
  5. [ML on embedded part 5]: As all the previous posts were about edge ML, I’ve implemented a cloud acceleration server using a Jetson nano and I developed a simple TCP server with python that also runs inferences in the same tflite model that I’ve used also in part 3 & 4. Then I’ve written a simple firmware for the ESP8266 to send random input arrays serialized with flatbuffers to the “AI cloud server” via TCP and then get the result. I’ve run some benchmarks and did some comparisons with the edge implementation.

Although these are more interesting for embedded engineers, I think it also fits in here.

submitted by /u/dimtass
[link] [comments]

[D] Predicting Fantasy Football Points for German Bundesliga (kicker.de)

[D] Predicting Fantasy Football Points for German Bundesliga (kicker.de)

Hey guys. This years fantasy football season is about to start. So I decided to do a little project and try to predict each players points for the upcoming season. At first I searched for other people who have done similar stuff. Most of it was in US Sports (NFL, NBA, MLB). One reason imo was the availability of data. Other projects on football were done for week to week predicitons, and mostly in the middle of the season. This is not what I am going for.

Speaking of data availability. I had to put a lot of effort into getting historic fantasy points. But eventually I managed to obtain them by scraping the website (kicker.de) and recalculating the points from season 00/01 onwards (makes about ~9k datapoints). As for features I have, name, club, position and age. The target value is obv the fantasy score by the end of the season. The scores is heavily influenced by Rating (1.0-6, German school grading system. 1.0 best, 6 worst) and is done by editors of the newspaper. This is a human perception rating, not a statistic derived one!

I used mainly sklearn. My metric to optimize is mean-squared-error (MSE) and I tried several linear regression methods (Lasso, ElasticNet and BayesianRidge). I got results around 2000 MSE. Some hyperparameter tuning later I got to ~1650.Then I thought of giving LGBM a go, but it was actually worse, even with hyperparameter tuning. I thought about trying LSTM, but I think the dataset is way to small for that.

To be hones I am DISAPPOINTED with the results. ~1650 MSE is about 41 points of error on AVERAGE. Thats alot. So my next idea was to analyse if the model is bad on all the data, but good at particular areas. All this was done for the 2018/19 season.

left-to-right (Goalkeeper, Defenders, Midfield, Forward)

This is the mean-error per position. GK seems to be really hard to predict. One thing thats common knowledge is that from all regular players goalies tend to score a lot of points on average. But ofc there is just one per team playing and they are less likely to get injured or even be left out because of fatigue. Defenders seem the easiest, Midfielders slightly worse and Forwards even more. Those positions are kind of reasonable good, but still not in the are were I would be confident.

y = mean error, x=amount of players

For this one I put the data into bins of points (-75,250, 25). Real in this context is the actual points that were scored and predicted, the predicted one. So I basically wanted to see the point distribution of the real points and my predicted points. And as it turns out the model is putting way to many players in the (26,50) range. Bot distributions kind of have the same shape, but the spread for the predicted ones is not big enough.

y = mean error, x= bins of points

So my idea was, maybe the model is good in some point range. And schockingly, where most of our data for predictions is, there is most of our error. The model is quite good and predicting the top end players (150+ points) and quite good to sort out the garbage( <0 points), but inbetween its quite horrible.

x = teams , y = mean error

We see now the error for all the teams, two suprising points are the very accurate ones. Augsburg and Nürnberg are in the bottom half of the table, no suprise. Nürnberg was a promoted team and got relegated instantly, Augsburg survived but also fought against relegation all season long. On the other end Borussia Dortmund played a quite good season, fighting for the Championship with Bayern. The big error I assume is because of several factors. First they bought some players that performed quite well with no historic data (Witsel, Paco, Hakimi) or just very few (Sancho, Akanji, Delaney). Secondly they performed all quite well and above league average. So teamwise there doesn’t seem to be much insight imo.

https://i.redd.it/qo8wegslged31.png

So I was interested if there is maybe some sort of correlation between age and points. Like very young players rarely score points, beginning to mid-late 20s is the prime. With eventual bumps and with the 30s they are declining. But as the boxplots suggest, the data is pretty much all over the place. We have huge variances right from the beginning. It really tones down in the 30s. Age also seems like a pretty bad feature to consider.

Additionally, I plotted some age/pts graphs for specific players. There are veterans, even on world class level (Neuer), but also from midtable teams, that never made it to international level. Also players with injury issues (Reus, Bender) or people who seemed like good international material and then completely vanished. Also some One-Hit-Wonders. Just have a peek. I put them in an imgur album to not make this post even bigger (https://imgur.com/a/2kSVXdm)

So my question. What would be your ideas to improve the performance? More data? Feature Engineering (but what?). Maybe train a regressor per position?

P.S: if there is enough interest in the data and you guys wanna play around with it yourself I can publish it.

submitted by /u/thecluelessguy90
[link] [comments]

[D] E2E Case Studies

Hello All.

I am looking for some intro in E2E of Machine Learning pipelines. I will be glad if you can share some stories or links of existing case studies that describe ways of E2E implementation of machine learning processes (something like kubeflow or tensorflow extended).

I am trying to find out the golden middle or best-used practices from SRE/DevOps point of view. Thank you.

submitted by /u/Yellow_Robot
[link] [comments]

[D] On the viability of the “AI Dungeon Master”

I originally posted this on /r/learnmachinelearning since it’s technically a question, but I think it goes beyond the scope of questions like “how do I set up tensorflow” and is worth putting here well.

I love tabletop RPGs, and I’m specifically curious if there are any areas of current ML technology that might allow the nerd fantasy of an independent AI dungeon master to come true, whether fully or even partially.

For those unfamiliar with tabletop RPGs, I’ll run over the basic gameplay loop, using Dungeons & Dragons as my example.

At the center of it all you have a system of core rules (easily programmable rules, in fact) which tracks character stats, specifics of movement, items, abilities, success/failure checks, and other details down to a very granular level. This part is easy for computers, evidenced by the fact that RPG video games derived from these rulesets.

However, with a tabletop RPG, the game is ran by a person known as the Dungeon Master or Game Master, who acts as a kind of referee for the rules. The Dungeon Master can take whatever request a player makes, then translate that request into something compatible with the rules.

This process of “compiling” a request into a rule check can be done for something simple, such as “I attack the orc” (damage based on a dice roll + weapon type + skill modifiers + proficiency bonus, etc.), or for something crazy and convoluted, such as “I fashion the rope in my inventory into a lasso and toss it so that it loops around the damaged stone pillar at the other side of the chasm” (dice roll based on the player’s dexterity skill), followed by “I pull the rope as hard as I can” (another roll based on their strength skill, success resulting in the pillar toppling and creating a bridge of rubble, and the player losing the rope item) followed by “I walk across the rubble to cross” (dice roll based on the player’s acrobatics ability to update the player’s position and allow them to continue the loop by interacting with things on the other side of the chasm).

So there is consistency mixed with inconsistency. A player’s input can be wild and unpredictable, but it always resolves into rule checks that are consistent, mechanical, and easily understandable by a machine. The Dungeon Master is the missing link. The adjudication of a human brain allows players to interact with the rules in a way that’s deeper and freer than clicking pre-programmed buttons to perform actions, which is why video games have never been able to replicate the feeling of a real tabletop RPG.

But now we have machine learning. What kind of AI, if any, could be used to taking ambiguous statements and convert them into standard game interactions? And to what extent could it be pushed? If it’s impossible to account for everything (which I’m guessing it is, at least for now), then what kind of sacrifices could be made on the player’s side (e.g. typing only short, simple requests in a specific format, or entering nouns and verbs into text boxes) to make it possible?

submitted by /u/MindChisel
[link] [comments]

[P] Book recommendation engine

Hello,

I’m working on a project from http://www2.informatik.uni-freiburg.de/~cziegler/BX/ and I’m given a question “If I like Lord of the Rings, what else I should read?”. How would you proceed? My first thought was find other users/readers who like the book too and find what else they rated high. So, I’ve tried to create a pivot table, which ran out of memory (there’s over 1.3M rows), so I’ve create a group dataframe instead but I’m kinda in how to make a correlation. My second thought was to create clusters, find in which cluster is LOTR and recommend other books from the cluster. But I’m not sure about the later one.

Any insight would be most appreciated. Thanks!

submitted by /u/BeggarInSpain
[link] [comments]

[D]ual Numbers and Automatic Differentiation explained

For those struggling to understand AD and dual numbers, this article might help :)!

If I understand correctly, AD essentially computes an derivative of each operator using — for example, dual numbers — analytically exact methods, and combine them using the chain rule. This is feasible because programmable functions are defined using “primitive” operators, and we can compute their derivatives algorithmically (or analytically).

edit:

noticed the author has another multivariate example.

edit 2:

This was also helpful.

submitted by /u/kevinccccccc
[link] [comments]

[D] What’s missing in blogs?

Hello everyone.

Recently, I’ve been thinking about starting a blog on Deep Learning, but when I look around, there’s just so many that are doing such a good work! There are some awesome blogs on Medium that go through ML topics both for knowledgeable and expert readers, some intriguing blog on a number of platforms that publish articles on the latest big things, so to speask, in ML, and vlogs on YouTube that are clearly spending a lot of time and resources on their videos! So, I wanted to ask you guys this. What do you think is missing in blogs? If you wanted to make a blog on ML what would you write about? I really want to somehow contribute back to this awesome community that has made it possible to learn just so much for free!

Thank you 🙂

submitted by /u/mfarahmand98
[link] [comments]

[D] is there study order(course) of RNN ?

Hello… may I question something?

I am a student studying at a foreign university lab.

I am studying stock price forecasting.

Adjusting the LSTM unit and layer is complete.

The topics(plan) of the next research were auto-keras or NLP.

But the professor said that the topic was too broad.

he wants Step by step to build up my capabilities.

So I looked for all the paper related to stock predict.

Recent research was based on the attention mechanism or the process of using natural language like news.

The following research themes should be decided, but the gap between basic research and the latest research is too large.

I do not know what to make the next research topic.

In the case of CNN, there are various networks such as LeNet, AlexNet, ZFNet, GoogLeNet, VGGNet, and ResNet

However, LSTM is SOTA(LSTM: A Search Space Odyssey https://arxiv.org/abs/1503.04069 ) in RNN

So, in the case of RNN is LSTM only

I think that methodology of improving accuracy of LSTM should be the subject of research.

do you have any course for forecasting time series data?

I do not know how to get directions

Your valuable opinions and thoughts will be very much appreciated.

submitted by /u/GoBacksIn
[link] [comments]