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

[Discussion] How can one get hands on experience with optimization problems (as opposed to supervised learning problems)?

I would like to learn more about optimization. Right now I get to do some regression and various classification type stuff, but no real world experience with optimization (other than whatever optimizers are being run to fit the supervised learning methods I use).

I know the basics of the theory and algorithms behind it (LP, QP, IP, Genetic Algorithms, etc…), and I’ve packaged optimization ERP tools, but I don’t see how I can extend that knowledge to real world data sets and hands on use cases where I solve new problems.

For supervised learning, there is Kaggle, and hundreds of other open data sets which you can practice on, but for optimization I can’t find any similar competitions or data sets. Moreover the popular tools (Gurobi, Cplex, etc…) seem to be more proprietary and lack the community resources that ML and Stats open source tools have (i.e open source isn’t as much of a thing for optimization as it is for ML)

Also: Even if one had access to the right data and the right tools, how does one validate the quality of their Optimization solution? With supervised problems you have the ground truth to compare against. With clustering you have information theoretic and visual methods to examine your data.

But with optimization and search problems, how do you evaluate your solution in a real world use case? You can try fake data such that the global optimum is known before hand, but those will always be toy examples. For real world data sets, you don’t know what the global optima are, by definition, otherwise you wouldn’t have to use optimization algorithms and search heuristics to solve the problem in the first place?

Any advice and resources on how to get hands experience with optimization and OR problems in general?

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

[D] How are some people publishing 5+ first author papers a year at top conferences??

Yi Tay: https://scholar.google.com.sg/citations?hl=en&user=VBclY_cAAAAJ&view_op=list_works&sortby=pubdate)

Ryan Cotterell: https://scholar.google.de/citations?hl=en&user=DexOqtoAAAAJ&view_op=list_works&sortby=pubdate

For example Yi Tay has ~15 first-author publications in 2018 at top venues (AAAI, NeurIPS, etc.). How is this even possible?? I struggled to publish 1 paper a year during my PhD (as a main author)…

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

[D] What do you think of this workflow?

I described it this Twitter thread: https://twitter.com/colobas_/status/1144395631588306945

Transcribing it here:

#Jupyter & #Python people of Twitter, let me know what you think of this:

  • Using Jupytext to have my notebooks in percent format, and still be able to work on them as normal notebooks.
  • In the code, I have defined classes and functions I might want to import somewhere else
  • I’ll also have stuff you’d have in a normal notebook: experiments, markdown, etc
  • At the beginning of the notebook I have the following:

snippet

  • For every block I want to run in “Jupyter mode”, I precede it with if ipython is not None:
  • Every block that isn’t preceded by that is considered to be in “script/module mode”.
  • I can use this to have importable stuff, in the same place I have tests and experiments that explain and test its behaviour
  • Bonus: I get to use my favourite IDE to write the bulk of my notebook

Share your thoughts!

EDIT: fixed broken image

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

Understanding model transferability [D]

Understanding model transferability [D]

I’m trying to reproduce and use the deep-clustering method introduced by Guo et. al (authors implementation ) on data from a physics experiment. Reproducing the authors results on MNIST was thankfully trivial as they provide an implementation. The transfer of application has so far, not worked at all, as we seem to be unable to attain a Normalized Mutual Information (nmi) score of over 0.3 on our data, and the adjusted rand scores match that level of poor performance.

My question is: why would I expect that the model cannot fit the data? Or how should I scale the model s.t. it retains the same properties as it had for the MNIST dataset (I have several thoughts on this but I don’t want to bias your thinking)?

Information about the data:

Number of images 46283 (can get more)
Number of classes 3
Class balance 2:1:2
Image dimensions 80x80x1 (or 128x128x1)

I’ve attached an image of each of the classes. They are visually very distinct, at least class 0 from the 1 and 2. I’ve not been able to

Example of class 0

example of class 1

Example of class 2

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

[P] Fast cloth color identification from customer images in Go

Hi everyone,

I’m currently working at Leboncoin, which is a French company where anyone can sell goods, a bit like Craigslist.

I was given the task of labelling a lot of cloth items by their color, and I wrote an article on my approach and the final model.

https://medium.com/leboncoin-engineering-blog/fast-cloth-color-identification-from-customer-images-in-pure-go-bec3cc97851e

TL;DR: K-Means+KNN

I’d be happy to hear any criticism or what you would have done in the same situation.

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

Predicting Bus Delays with Machine Learning

Hundreds of millions of people across the world rely on public transit for their daily commute, and over half of the world’s transit trips involve buses. As the world’s cities continue growing, commuters want to know when to expect delays, especially for bus rides, which are prone to getting held up by traffic. While public transit directions provided by Google Maps are informed by many transit agencies that provide real-time data, there are many agencies that can’t provide them due to technical and resource constraints.

Today, Google Maps introduced live traffic delays for buses, forecasting bus delays in hundreds of cities world-wide, ranging from Atlanta to Zagreb to Istanbul to Manila and more. This improves the accuracy of transit timing for over sixty million people. This system, first launched in India three weeks ago, is driven by a machine learning model that combines real-time car traffic forecasts with data on bus routes and stops to better predict how long a bus trip will take.

The Beginnings of a Model
In the many cities without real-time forecasts from the transit agency, we heard from surveyed users that they employed a clever workaround to roughly estimate bus delays: using Google Maps driving directions. But buses are not just large cars. They stop at bus stops; take longer to accelerate, slow down, and turn; and sometimes even have special road privileges, like bus-only lanes.

As an example, let’s examine a Wednesday afternoon bus ride in Sydney. The actual motion of the bus (blue) is running a few minutes behind the published schedule (black). Car traffic speeds (red) do affect the bus, such as the slowdown at 2000 meters, but a long stop at the 800 meter mark slows the bus down significantly compared to a car.

To develop our model, we extracted training data from sequences of bus positions over time, as received from transit agencies’ real time feeds, and aligned them to car traffic speeds on the bus’s path during the trip. The model is split into a sequence of timeline units—visits to street blocks and stops—each corresponding to a piece of the bus’s timeline, with each unit forecasting a duration. A pair of adjacent observations usually spans many units, due to infrequent reporting, fast-moving buses, and short blocks and stops.

This structure is well suited for neural sequence models like those that have recently been successfully applied to speech processing, machine translation, etc. Our model is simpler. Each unit predicts its duration independently, and the final output is the sum of the per-unit forecasts. Unlike many sequence models, our model does not need to learn to combine unit outputs, nor to pass state through the unit sequence. Instead, the sequence structure lets us jointly (1) train models of individual units’ durations and (2) optimize the “linear system” where each observed trajectory assigns a total duration to the sum of the many units it spans.

To model a bus trip (a) starting at the blue stop, the model (b) adds up the delay predictions from timeline units for the blue stop, the three road segments, the white stop, etc.

Modeling the “Where”
In addition to road traffic delays, in training our model we also take into account details about the bus route, as well as signals about the trip’s location and timing. Even within a small neighborhood, the model needs to translate car speed predictions into bus speeds differently on different streets. In the left panel below, we color-code our model’s predicted ratio between car speeds and bus speeds for a bus trip. Redder, slower parts may correspond to bus deceleration near stops. As for the fast green stretch in the highlighted box, we learn from looking at it in StreetView (right) that our model discovered a bus-only turn lane. By the way, this route is in Australia, where right turns are slower than left, another aspect that would be lost on a model that doesn’t consider peculiarities of location.

To capture unique properties of specific streets, neighborhoods, and cities, we let the model learn a hierarchy of representations for areas of different size, with a timeline unit’s geography (the precise location of a road or a stop) represented in the model by the sum of the embeddings of its location at various scales. We first train the model with progressively heavier penalties for finer-grain locations with special cases, and use the results for feature selection. This ensures that fine-grained features in areas complex enough where a hundred meters affects bus behavior are taken into account, as opposed to open countryside where such fine-grained features seldom matter.

At training time, we also simulate the possibility of later queries about areas that were not in the training data. In each training batch, we take a random slice of examples and discard geographic features below a scale randomly selected for each. Some examples are kept with the exact bus route and street, others keep only neighborhood- or city-level locations, and others yet have no geographical context at all. This better prepares the model for later queries about areas where we were short on training data. We expand the coverage of our training corpus by using anonymized inferences about user bus trips from the same dataset that Google Maps uses for popular times at businesses, parking difficulty, and other features. However, even this data does not include the majority of the world’s bus routes, so our models must generalize robustly to new areas.

Learning the Local Rhythms
Different cities and neighborhoods also run to a different beat, so we allow the model to combine its representation of location with time signals. Buses have a complex dependence on time — the difference between 6:30pm and 6:45pm on a Tuesday might be the wind-down of rush hour in some neighborhoods, a busy dining time in others, and entirely quiet in a sleepy town elsewhere. Our model learns an embedding of the local time of day and day of week signals, which, when combined with the location representation, captures salient local variations, like rush hour bus stop crowds, that aren’t observed via car traffic.

This embedding assigns 4-dimensional vectors to times of the day. Unlike most neural net internals, four dimensions is almost few enough to visualize, so let’s peek at how the model arranges times of day in three of those dimensions, via the artistic rendering below. The model indeed learns that time is cyclical, placing time in a “loop”. But this loop is not just the flat circle of a clock’s face. The model learns wide bends that let other neurons compose simple rules to easily separate away concepts like “middle of the night” or “late morning” that don’t feature much bus behavior variation. On the other hand, evening commute patterns differ much more among neighborhoods and cities, and the model appears to create more complex “crumpled” patterns between 4pm-9pm that enable more intricate inferences about the timings of each city’s rush hour.

The model’s time representation (3 out of 4 dimensions) forms a loop, reimagined here as the circumference of a watch. The more location-dependent time windows like 4pm-9pm and 7am-9am get more complex “crumpling”, while big featureless windows like 2am-5am get bent away with flat bends for simpler rules. (Artist’s conception by Will Cassella, using textures from textures.com and HDRIs from hdrihaven.)

Together with other signals, this time representation lets us predict complex patterns even if we hold car speeds constant. On a 10km bus ride through New Jersey, for example, our model picks up on lunchtime crowds and weekday rush hours:

Putting it All Together
With the model fully trained, let’s take a look at what it learned about the Sydney bus ride above. If we run the model on that day’s car traffic data, it gives us the green predictions below. It doesn’t catch everything. For instance, it has the stop at 800 meters lasting only 10 seconds, though the bus stopped for at least 31 sec. But we stay within 1.5 minutes of the real bus motion, catching a lot more of the trip’s nuances than the schedule or car driving times alone would give us.

The Trip Ahead
One thing not in our model for now? The bus schedule itself. So far, in experiments with official agency bus schedules, they haven’t improved our forecasts significantly. In some cities, severe traffic fluctuations might overwhelm attempts to plan a schedule. In others, the bus schedules might be precise, but perhaps because transit agencies carefully account for traffic patterns. And we infer those from the data.

We continue to experiment with making better use of schedule constraints and many other signals to drive more precise forecasting and make it easier for our users to plan their trips. We hope we’ll be of use to you on your way, too. Happy travels!

Acknowledgements
This work was the joint effort of James Cook, Alex Fabrikant, Ivan Kuznetsov, and Fangzhou Xu, on Google Research, and Anthony Bertuca, Julian Gibbons, Thierry Le Boulengé, Cayden Meyer, Anatoli Plotnikov, and Ivan Volosyuk on Google Maps. We thank Senaka Buthpitiya, Da-Cheng Juan, Reuben Kan, Ramesh Nagarajan, Andrew Tomkins, and the greater Transit team for support and helpful discussions; as well as Will Cassella for the inspired reimagining of the model’s time embedding. We are also indebted to our partner agencies for providing the transit data feeds the system is trained on.

[Discussion] Thinking of Opening a Small Bootcamp to Help Small Farmers via Machine Learning

Guys, I’ve been brewing on the bootcamp idea for a while. The reason I am posting here is to collect your input. I think that I will open the bootcamp even if you tell me that it is a terrible idea, so do not bother shooting the messenger right away. 😛 On the other hand, constructive criticism is welcome. Main purpose of sharing the idea with you is for the purpose of collective thinking. Imagine that you are considering joining such a bootcamp, what will be enticing to you?

Now, without much further due:

  1. Average age of a modern-day farmer is 55 (I will insert my source later :).
  2. Modern farming (especially so in the US) is a large-scale chemical facility, which blasts our food and soil with known carcinogens.
  3. Small farmers find it difficult to compete. However, there has been somewhat of a resurgence of local CSA (community-supported agriculture) because young people are more aware of the food they eat and the way we impact the environment.
  4. Data Science, IoT, Machine Learning are sexy topics with many cerebral young professionals actively participating in developing many fields (fintech, autonomous driving, etc.).
  5. Let’s make agriculture sexy again (now, Reddit, behave 🙂 by combining Machine Learning, IoT, and Data Science with local CSAs.
  6. Imagine a bootcamp, which works on a template meant to ease the pain of growing local foods without the use of pesticides and herbicides. Real-time actionable data displaces the need to rely on chemicals.
  7. Or imagine a bootcamp, which studies beehives from the inside by collecting continuous data and using machine learning techniques (DeepLabCut, for example) to identify beehive problems during early stages.

Now, returning to your opinions, what would you like to see in such a bootcamp? I have a PhD in Healthcare Information Systems, and I will quit my full-time job at a research university, so I can be part of it every day. I would not want for it to be a money-making mill. I love solving complex problems with incremental improvements and collective efforts. What technologies would you like to learn how to use? What kind of equipment would you think be beneficial? What kind of people would draw you to such a bootcamp? Let me know anything that comes to mind. I will be watching and responding as much as I can (I am still working, and I will be traveling this weekend).

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

[D] Thoughts on combining the hidden layer of a VAE with other data sources?

Hi all,

I’m working on a project where I’ve trained an autoencoder on a specific dataset (movie ratings). The hidden layer is a 256-length vector. I have another dataset of loosely related data (user demographics) that I’d like to combine with my encoding somehow to improve my model, though I’m not sure exactly how to implement this.

Do you guys know of any literature that attempts something similar? Any suggestions/criticisms would also be much appreciated.

Thanks

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

[D] Has anyone here looked into evaluating multiple models on a single GPU in parallel?

I’m interested in running neuroevolution algorithms on a single GPU. The idea is to combine the forward pass for many models into a single matrix multiplication per layer. To be clear, I’m not talking about weight sharing between models. All models would have their own exclusive set of weights and in many cases, different inputs as well.

Uber actually made a blog post about doing exactly this here. But they don’t explain much about how they approached implementing this functionality and their provided source code quite difficult to understand (probably in large part because I’m much more experienced with pytorch than tf).

Has anyone here tried to implement anything like this or know of any other relevant projects? Or perhaps someone who understands how Uber achieved this could conceptually step through the matrix math involved in composing these conjoined networks?

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