BrainsToBytes - page 4

Quick tips: Running Rails Jobs on the terminal

You can run Rails Jobs without having to configure any backend. The only things you need are the Rails console and the perform_now method. Suppose you created a job called PrintHappy: rails generate job print_happy You can navigate to the app/jobs folder and populate the perform method with anything you need: class PrintHappyJob < Applic...

Read more

Better ways of learning

Learning is an important activity in almost any context. We humans need to acquire new knowledge and skills to face the challenges we find in our lives, no matter where we live or what we do. This is especially true for knowledge workers like engineers or software developers. The work we produce is very often intangible: a piece of software or ...

Read more

Fostering R-mode and capturing insight

In the previous article, we discussed two different brain operation modes. While not a literal representation of what’s going on in our brain, it’s still a useful tool when thinking about how our brain processes things. On one hand, we have L-mode: linear, logical, abstract and in charge of verbal and symbolic representation of knowledge. On th...

Read more

Quick tips: Using multiple change matchers with RSpec

It’s possible to use multiple RSpec change matchers with a single block of code. The only thing you need is to use the and keyword to link them. The general form is something like this: expect{ action_that_produces_change }.to change(...) .and change(...) ... .and change(...) Let’s see how this can help us usin...

Read more

A tale of two brains: Dual operation modes

In the previous article of this series, we discussed the Dreyfus model, an abstraction that lets you understand the progression we humans go through when learning a new skill. In this article, we will discuss another useful model. In this case, the subject is our own amazing brain. Have you ever faced a very tough problem and spent hours trying...

Read more

Pragmatic Thinking & Learning: The Dreyfus Model

I recently started reading Pragmatic Thinking and Learning: Refactor Your Wetware by Andy Hunt (Yes, the guy from The Pragmatic Programmer). It’s a cool book, so cool in fact that I believe it’s one of the best things I’ve read on the topic. I wanted to write a series summarizing the main ideas Andy talks about in his book. This is, of course, ...

Read more

Unsupervised learning

In a previous article, we learned about supervised learning: using labeled examples for creating models that solve a variety of tasks such as classification and regression. There is another type of learning that doesn’t require labeled examples: unsupervised learning. As it turns out, unlabeled data is much more common than labeled data. Often,...

Read more

One-hot encoding, with Pokemon examples

Categorical data is extremely common in most real-world machine learning applications. The main problem is that most algorithms don’t really know how to manage categorical data: they are really good at working with numbers but don’t really understand the concept of category. Because of this, it’s important to have a way to convert categorical da...

Read more

Overfitting, and what to do about it

Overfitting is an important concept all data professionals need to deal with sooner or later, especially if you are tasked with building models. A good understanding of this phenomenon will let you identify it and fix it, helping you create better models and solutions. In brief, overfitting happens when your models fail to learn only the most i...

Read more

Test, training and validation sets

As you might remember, supervised learning makes use of a training set to teach a model how to perform a task or predict a value (or values). It’s also important to remember that this training data needs to be labeled with the expected result/right answer for every individual example in the set. In projects that use supervised learning, some ef...

Read more

Precision vs Recall

Selecting the right metric plays a huge role in evaluating the performance of a model. It can sound a bit exaggerated, but your project’s chances of succeeding depend in great part on choosing a good performance measure. Making the wrong choice can result in models that are a poor fit for the task you are trying to solve. Precision and recall a...

Read more

Mean Absolute Error vs Root-Mean Square Error

MAE and RMSE are some of the most common error metrics for regression problems. Despite being used for the same task (understanding the errors in your predictions) there are important differences between the two. Choosing the right metrics for your model can make a huge difference in your ability to solve a problem. The algorithms you’ll use t...

Read more

ML Concepts: Supervised learning

Supervised learning is perhaps the most common form of machine learning task in use nowadays. This form of learning makes use of a labeled training dataset to create a model that predicts a target of interest. If this line makes absolutely no sense to you, don’t worry. After reading this article you will have a clear understanding of supervised...

Read more

WWWH Data Science: How to do data science?

In the previous articles, we learned a definition of data science and why so many companies are investing in this field. We also learned about some of the most common scenarios where data science is the right tool for the job. In this article (the last in the series) we will learn a basic framework for organizing the tasks in a data science pro...

Read more

WWWH Data Science: Why use data science?

In the previous article, we learned what types of problems are a good fit for a data-science solution. Now we will tackle the why: we will discuss the main reasons for using data science in the industry, and how companies benefit from using the power of data to improve their performance. Data is everywhere The digitization of information enab...

Read more

WWWH Data Science: When is data science a good fit?

In the previous article of the series, we answered our first question: what is data science and which contributions led to its creation? In this article we will explore another important question: When should I use data science? DS has lots of incredibly useful applications in fields as diverse as finance, forest planning, and genetics resear...

Read more

WWWH Data Science: What is data science?

I wanted to write a series of articles that explore data-science from a high-level perspective. These articles aim to answer the following questions: WHAT data science?: What is data science and how it came to be? When exactly did it become a field of knowledge and what developments lead to its formation? WHEN data science?: When should yo...

Read more