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

[D] Is there a way to introduce a rating system for an isolated game tournament that could produce better results than simple overall winning percentage?

Hello /r/machinelearning! Long time Redditor, first time posting here. I hope this isn’t too weird of a question.

I’m not looking for someone to do this or anything, this is a conceptual question. It is: Is there a way to introduce a rating system for an isolated game tournament that could produce better results than simple overall winning percentage?

This idea came about because my dad’s friends host a Euchre tournament every year. For those that don’t know, Euchre is a 2v2 card game, and you play to 10 points.

Now this is a friendly tournament among friends, so it’s not like a cut-throat competition. There are players there with a variety of skill levels.

Currently, you just sort of play all day with who is available, and you try not to play with the same person as your teammate all day (that way the two best players don’t just team up all day and have a great record together). You only keep track of wins and losses. At the end of the day, the top 4 winning percentages go into a bracket for the title. We probably play around 20-30 games throughout the day, so the sample size is low.

There are numerous weaknesses to this method. I used to work for a Game Dev studio and really love game design, so it’s a natural hobby of mine to assess the potential exploitation methods. Again, it’s a friendly competition, so I don’t believe anyone is actively practicing any of the below, but there absolutely are some ways that this method falls very flat.

1. There is an active incentive to stop when you’re ahead.

Towards the end of the day, if your winning percentage is high, you basically don’t want to play games anymore. Winning will hardly move your winning percentage up, but a loss can tank your great percentage by a lot.

2. You can absolutely game the system with partner selection and opponent avoidance

If you play games with the people who you know are the best, and play against players who are known to be poor, you can dramatically affect your winning percentage. If a very poor player asks you to be their partner, especially if you go up against a strong team, you’re at a huge disadvantage. If you keep playing these games, your odds aren’t 50/50 to win, but probably more like 75/25 in worst or best case scenarios. This kind of manipulation is incentivized by the rule structure, and a player playing with truly random partners/opponents would be at a disadvantage.

3. Scoring is completely ignored

Losing by 10 or losing by 1 doesn’t matter at all. This is a huge mechanical weakness in my view. If you get behind in a game, there’s a good incentive to try to play aggressively to catch up, but if you come back from being down 7-0 and lose 10-9, you get no points whatsoever for making a great comeback. In the interest of time, it would likely be worth more to just lose the game quickly and start a new one.


There are more criticisms at play here, but these are the main ones I could think of.

How could you go about designing a system that might help mitigate some of these factors? I thought about instituting an ELO-style (or glicko) rating system, but I’m not sure how it would play out given an internal tournament. We also wouldn’t want legacy rankings because lower-ranked players would never make it far enough up the leaderboard to enter the finals.

Is there any sort of system that constantly re-evaluates all the permutations of games that have happened and spits out a ranking of sorts? Something that could actually take into account having a close loss when you have a weak teammate and strong opponents? It would basically take the entire tournament results as a whole, figure out all the rankings and decide on a top 4 players for the tournament.

Is this a concept that exists, or how could current practices apply here?

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

AI Builds AI: Startup’s AI Generates Compact Neural Networks

University of Waterloo researcher Alexander Wong didn’t have enough processing power for his computer vision startup, so he developed a workaround. That workaround is now the company’s product.

Ontario-based DarwinAI, founded by a team from the Ontario-based university, provides a platform for developers to generate slimmed-down models from neural networks. This offers a quicker way for developers to spin out multiple networks with smaller data footprints.

The company’s lean models are aimed at businesses developing AI-based edge computing networks to process mountains of sensor data from embedded systems and mobile devices.

Industries of all stripes — autonomous vehicles, manufacturing, aerospace, retail, healthcare and consumer electronics — are developing next-generation businesses with AI computing at the edge of their GPU-powered networks.

It’s estimated that by 2025 some 150 billion machine sensors and IoT devices will stream continuous data for processing.

Yet many find that talent and computing resources run high to build these various models.

DarwinAI’s position is that companies can reduce development time and costs — like DarwinAI did for themselves — by using its platform to spin out compact models from full-sized ones.

“We can enable AI at the edge for mobile devices and clients who need to put powerful neural networks into cars, watches, airplanes and other areas,” said Sheldon Fernandez, CEO and co-founder at DarwinAI.

Generative Synthesis: Hello, World 

DarwinAI’s platform, dubbed GenSynth, is the result of pioneering research on what’s called generative synthesis. There’s an easy way to think of generative synthesis: It’s AI to create AI.

The startup’s founders late last year released a research paper on generative synthesis and then fused that with its proprietary research to launch the company’s offering.

DarwinAI’s platform relies on machine learning to probe and understand the architecture of neural networks for customers. Then its AI generates a new family of neural networks that are functionally equivalent to the original but smaller and faster, according to the company.

The company is a member of the NVIDIA Inception program that helps startups move to market faster.

Audi Rides DarwinAI Networks 

The startup’s research has attracted interest from consumer electronics companies, aerospace and automakers, including Audi.

Audi’s case study with DarwinAI used the GenSynth platform to accelerate design of custom, optimized deep neural networks for object detection in autonomous driving.

The GenSynth platform helped Audi developers train models 4x faster and slash GPU processing time by three-fourths.

“They worked with two terrabytes of data, and we really reduced the testing time,” said Fernandez. “There’s real savings for their GPU training time and real benefits for the developers.”

GPUs for GenSynth

DarwinAI developed GenSynth to reduce its own development time, tapping into NVIDIA GPUs on AWS and Microsoft Azure and local instances on premises to boost its coding cycles.

Many of DarwinAI’s early customers are now using the platform to speed their development. It also helps reduce the data processed on customers’ systems running NVIDIA Jetson modules on site and NVIDIA V100 Tensor Core GPUs in the cloud for training and inference.

“Deep learning is so complex that you need to collaborate with AI enabled by GPUs to do it properly — it will free up your time to do the creative work,” said Fernandez.

 

Image credit: Taken at the University of Waterloo by Victor Vucicevich; licensed under Creative Commons Attribution-Share Alike 3.0 Unported.

The post AI Builds AI: Startup’s AI Generates Compact Neural Networks appeared first on The Official NVIDIA Blog.

Classify Toxic Online Comments with LSTM and GloVe

Photo credit: Pixabay

Deep learning, text classification, NLP

This article shows how to use a simple LSTM and one of the pre-trained GloVe files to create a strong baseline for the toxic comments classification problem.

The article consist of 4 main sections:

  • Preparing the data
  • Implementing a simple LSTM (RNN) model
  • Training the model
  • Evaluating the model

The Data

In the following steps, we will set the key model parameters and split the data.

  • MAX_NB_WORDS” sets the maximum number of words to consider as features for tokenizer.
  • MAX_SEQUENCE_LENGTH” cuts off texts after this number of words (among the MAX_NB_WORDS most common words).
  • VALIDATION_SPLIT” sets a portion of data for validation and not used in training.
  • EMBEDDING_DIM” defines the size of the “vector space”.
  • GLOVE_DIR” defines the GloVe file directory.
  • Split the data into the texts and the labels.

https://medium.com/media/e404f87284057d710e0e0f3967897354/href

Text Pre-processing

In the following step, we remove stopwords, punctuation and make everything lowercase.

https://medium.com/media/eadbd6070963e87f8225525edc19beff/href

Have a look a sample data.

print('Sample data:', texts[1], y[1])
  • We create a tokenizer, configured to only take into account the MAX_NB_WORDS most common words.
  • We build the word index.
  • We can recover the word index that was computed.
tokenizer = Tokenizer(num_words=MAX_NB_WORDS)
tokenizer.fit_on_texts(texts)
sequences = tokenizer.texts_to_sequences(texts)
word_index = tokenizer.word_index
print('Vocabulary size:', len(word_index))
  • Turns the lists of integers into a 2D integer tensor of shape (samples, maxlen)
  • Pad after each sequence.
data = pad_sequences(sequences, padding = 'post', maxlen = MAX_SEQUENCE_LENGTH)
print('Shape of data tensor:', data.shape)
print('Shape of label tensor:', y.shape)
  • Shuffle the data.
indices = np.arange(data.shape[0])
np.random.shuffle(indices)
data = data[indices]
labels = y[indices]

Create the train-validation split.

num_validation_samples = int(VALIDATION_SPLIT*data.shape[0])
x_train = data[: -num_validation_samples]
y_train = labels[: -num_validation_samples]
x_val = data[-num_validation_samples: ]
y_val = labels[-num_validation_samples: ]
print('Number of entries in each category:')
print('training: ', y_train.sum(axis=0))
print('validation: ', y_val.sum(axis=0))

This is what the data looks like:

print('Tokenized sentences: n', data[10])
print('One hot label: n', labels[10])
Figure 1

Create the model

  • We will use pre-trained GloVe vectors from Stanford to create an index of words mapped to known embeddings, by parsing the data dump of pre-trained embeddings.
  • Then load word embeddings into an embeddings_index

https://medium.com/media/4a58a99c42bc4a3760b0155be6d63f59/href

  • Create the embedding layers.
  • Specifies the maximum input length to the Embedding layer.
  • Make use of the output from the previous embedding layer which outputs a 3-D tensor into the LSTM layer.
  • Use a Global Max Pooling layer to to reshape the 3D tensor into a 2D one.
  • We set the dropout layer to drop out 10% of the nodes.
  • We define the Dense layer to produce a output dimension of 50.
  • We feed the output into a Dropout layer again.
  • Finally, we feed the output into a “Sigmoid” layer.

https://medium.com/media/6d48566a561c43069f9da57f9ad9e800/href

Its time to Compile the model into a static graph for training.

  • Define the inputs, outputs and configure the learning process.
  • Set the model to optimize our loss function using “Adam” optimizer, define the loss function to be “binary_crossentropy” .
model = Model(sequence_input, preds)
model.compile(loss = 'binary_crossentropy',
optimizer='adam',
metrics = ['accuracy'])

Training

  • Feed in a list of 32 padded, indexed sentence for each batch. The validation set will be used to assess whether the model has overfitted.
  • The model will run for 2 epochs, because even 2 epochs is enough to overfit.
print('Training progress:')
history = model.fit(x_train, y_train, epochs = 2, batch_size=32, validation_data=(x_val, y_val))

Evaluate the model

loss = history.history['loss']
val_loss = history.history['val_loss']
epochs = range(1, len(loss)+1)
plt.plot(epochs, loss, label='Training loss')
plt.plot(epochs, val_loss, label='Validation loss')
plt.title('Training and validation loss')
plt.xlabel('Epochs')
plt.ylabel('Loss')
plt.legend()
plt.show();
Figure 2
accuracy = history.history['accuracy']
val_accuracy = history.history['val_accuracy']
plt.plot(epochs, accuracy, label='Training accuracy')
plt.plot(epochs, val_accuracy, label='Validation accuracy')
plt.title('Training and validation accuracy')
plt.ylabel('Accuracy')
plt.xlabel('Epochs')
plt.legend()
plt.show();
Figure 3

Jupyter notebook can be found on Github. Happy Monday!


Classify Toxic Online Comments with LSTM and GloVe was originally published in Towards Data Science on Medium, where people are continuing the conversation by highlighting and responding to this story.

Visa, Inc. Data Science Interviews

Visa Data Science Interviews

In 2018, Visa had $20.61 billion in revenue.

In 2015, the Nilson Report, a publication that tracks the credit card industry, found that Visa’s global network (known as VisaNet) processed 100 billion transactions during 2014 with a total volume of US$6.8 trillion. VisaNet data centers can handle up to 30,000 simultaneous transactions and up to 100 billion computations every second. Visa is a very household name all over the world. If you ever owned a credit card, you will surely know what Visa is. With a 100 billion transactions, the scale of data in the company is beyond compare. It could be a highlight of a Data professionals’ career.

Photo by Sharon McCutcheon on Unsplash

Interview Process

A senior data scientist from the team reaches out for the first telephonic interview after the resume is selected. The interview involves resume based questions, SQL, and or a business case study. After the first round, there is another telephonic technical interview. Eventually, there are five on-site interviews. On-site interviews are with top level personnel, directors and VPs. Each of those interviews is 45 minutes long.

Important Reading

Source: Data Science at Visa

Data Science Related Interview Questions

  • Invert an integer without the use of strings.
  • Write a sorting algorithm.
  • How do you estimate a customer’s location based on Visa transaction data?
  • Write a code for a Fibonacci sequence.
  • What functions can I perform using a spreadsheet?
  • Who would be your first line of contact to report a missing data you’re keeping record of?
  • Give the top three employee salaries in each department in a company.
  • What is Node.js?
  • What is MVC?
  • What is synchronous vs asynchronous Javascript?

Reflecting on the Interviews

The data science interview at Visa, Inc. is a rigorous process which involves many different interviews. The team is top notch and they are looking for similar candidates to hire. Most interviews look for fundamentals in SQL, coding, probability and statistics as well as ML. A decent amount of hard work can surely get you a job with the world’s largest credit transaction processing company!

Subscribe to our Acing AI newsletter, I promise not to spam and its FREE!

Newsletter

Thanks for reading! 😊 If you enjoyed it, test how many times can you hit 👏 in 5 seconds. It’s great cardio for your fingers AND will help other people see the story.

The sole motivation of this blog article is to learn about Visa Inc. and its technologies and help people to get into it. All data is sourced from online public sources. I aim to make this a living document, so any updates and suggested changes can always be included. Please provide relevant feedback.


Visa, Inc. Data Science Interviews was originally published in Acing AI on Medium, where people are continuing the conversation by highlighting and responding to this story.

[P] A PyTorch implementation of “Continuous Relaxation Training of Discrete Latent Variable Image Model”

Hi All,

Just wanted to share a PyTorch implementation of “Continuous Relaxation Training of Discrete Latent Variable Image Models”, Casper Kaae Sønderby, Ben Poole, Andriy Mnih. It includes the GS-Soft and VQVAE models from the paper and (to my knowledge) is the only implementation that that gets close to the reported bits per dimension on CIFAR10 for VQVAE.

Link to repo: https://github.com/bshall/VectorQuantizedVAE

Link to paper: http://bayesiandeeplearning.org/2017/papers/54.pdf

submitted by /u/b-shall
[link] [comments]

[N] AEV releases multi-modal autonomous driving dataset

An open multi-sensor dataset for autonomous driving research available for the academic community. This dataset comprises of annotated semantic segmentation images and point clouds, 3D bounding boxes, and also unannotated 360° time-synchronized and registered camera and lidar data, as well as data bus, for three recorded sequences. We hope this commercial-friendly dataset will further facilitate active research and development in AI and robotics for autonomous driving.

Link: https://www.audi-electronics-venture.de/aev/web/en/driving-dataset.html

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

Why AI Could Be the End of the Aisle for Shoplifters

Security guards. Closed circuit TV. Anti-theft tags and alarms.

Retailers are constantly battling shoplifters to protect store profits — up to 50 percent of which are lost to theft.

Now, they have a new weapon in their armory.

ThirdEye Labs, a London-based company and member of Inception, NVIDIA’s startup incubator, is combining off-the-shelf CCTV cameras with state-of-the-art AI algorithms to detect fraudulent activities in stores.

Caught AI Handed

Every year, U.S. retailers lose up to $32.25 billion due to theft.

In addition to those pocketing items straight from the shelves, it’s estimated that one percent of all customers who visit self-service checkouts steal. Sometimes it’s accidental — an item doesn’t scan through properly or the wrong type of pastry is selected from the bakery menu.

But some supermarket stealers are more slick — following schemes such as “the banana trick” (steaks scanned as potatoes) or “the switcheroo” (scanning the barcodes of cheaper items, instead of a pricier purchase).

To date, retailers’ attempts to deter thieves have had little effect. Hiring more security personnel is expensive and creates unpleasant shopping experiences. While security alarms are evaded and self-service counters continue to be deceived.

ThirdEye Labs’ AI algorithms help security staff work more effectively and efficiently. Trained on NVIDIA GPUs, the company’s deep learning networks can detect specific indicators of fraudulent behavior from CCTV footage and then alert staff, who can take appropriate action on the spot.

“We chose to train our algorithms on NVIDIA GPUs as they are fast, reliable and effective,” said Raz Ghafoor, CEO and co-founder at ThirdEye Labs. “Without the power of these GPUs, our development time would have doubled.”

ThirdEye Labs’ AI software can be used with existing security infrastructure — no additional hardware or software is needed. None of the video footage used is recorded or stored anywhere and the system doesn’t perform any facial recognition, meaning the system is GDPR compliant.

At stores where ThirdEye Labs’ system has been introduced at self-service checkouts, the AI technology analyzes every scan to detect non-scans, non-payments, substitute scanning and fraudulent refunds. Over the course of a month, two stores caught 27 thieves in action, up from basically zero, by implementing ThirdEye Labs’ point-of-sale system.

In the aisles, too, fraudulent behavior hasn’t gone unnoticed. ThirdEye Labs’ “In-Aisle Theft Detector” sends security guards push notifications every time someone picks up high-risk items, like champagne bottles or fresh meat. They can then decide whether or not to take action, helping them work more efficiently and effectively.

The service has saved stores tens of thousands of dollars in losses by helping security guards have their eyes on the right person, at the right time.

The Future of Convenient Shopping

ThirdEye Labs plans to expand its technology further to improve customer shopping experiences.

Its “Queue Detector” will predict when lots of customers are about to get in checkout lines. By alerting staff, tills can be manned before the rush.

Its “Stock-out Detector” will help stores monitor their shelves and identify when stock is low. Empty shelves cost retailers an estimated three percent of their total revenue each year, so optimizing stock replenishment has big benefits for sellers as well as those looking to purchase.

Image credit: kc0uvb

The post Why AI Could Be the End of the Aisle for Shoplifters appeared first on The Official NVIDIA Blog.