1. 程式人生 > >What To Do During Machine Learning Model Runs

What To Do During Machine Learning Model Runs

I think this is an important question. I think answers to this question show a level of organization or maturity in your approach to work.

I left a small comment on this question, but in this post I elaborate on my answer and give you a few perspectives on how to consider this question, minimize it and even avoid it completely.

What to do during machine learning model runs

What to do during machine learning model runs
Photo by Mark Fischer, some rights reserved

Run fewer experiments

Consider why you are executing model runs. You are almost certainly performing a form of exploratory data analysis.

You are trying to understand your problem with the aim of achieving a result with a specific accuracy. You may want the result for a report or you may want the model to operationalized.

Your experiments are intended to teach you something about the problem. As such, you need to be crystal clear on what intend to learn from each experiment that you execute.

If you do not have a clear unambiguous question that the experimental results will enlighten, consider whether you need to run the experiment at all.

When you get empirical answers to your questions, honor those results. Do your best to integrate the new knowledge into your understanding of the problem. This may be a semi-formal work product such as a daily journal or a technical report.

Run faster experiments

The compile-run-fix loop of modern programming is very efficient. The immediate pay-off lets you continually test ideas and course-correct.

This process was not always so efficient. As engineers, you used to design modules and desk-check their logic by hand with pen and paper. If you do any mathematics in your programming you very likely still use this process.

A useful modern tool are unit tests that automate the desk-check process making them repeatable. A maxim for good test design is speed. The more immediate the feedback, the faster you can course-correct and fix bugs.

The lesson here is you want speed.

You want to get the empirical answers to your questions quickly so that you can ask the follow-up questions. This does not mean designing bad experiments. It means making the experiments only large or detailed enough to answer one question.

The simplest way to have faster experiments is to work with reduced samples of your data. It’s so simple a technique that it’s often overlooked.

Often the effect you are looking for scales predictably with the data, whether it is a property of the data itself like outliers or the accuracy from models of the data.

Run tuning as experiments

Some experiments are inherently slow, like tuning hyper-parameters. In fact, tuning can be really addictive when your pursuit is optimized accuracy.

Completely avoid hand tuning any parameters, it’s a trap! My suggestion is to design methodical tuning experiments using a search method like random or grid search.

Collect the results and use the parameters that your experiments suggest are optimal.

If you want better results, design follow-up experiments on reduced hyper-cubes in parameter space and change the search algorithms to use gradient (or quasi-gradient) based methods.

Run experiments in downtime

Avoid running experiments in your most productive time. If you get you work done in daylight working hours, don’t tie up your machine and focus in that time with a blocking task like a model run.

Schedule your experiments to run when you are not working. Run experiments at night, in your lunch hour and over the weekends.

To run your experiments in your down time means that you will need to schedule them. This becomes a lot easier if you are able to batch your experiments.

You can do this by taking time to design 5-10 experiments in a batch, preparing the model runs and running experiments in sequentially or parallel in your off-time.

This may require discipline to decouple the question and the answers that your experiments serve. The benefits will be the depth of knowledge you gain about your problem and the increased speed at which you obtain it.

Run experiments off-site

Some experiments may require days or weeks, meaning that running them on your workstation is practically infeasible.

For long-running experiments you can harness compute servers in the cloud (like EC2 and friends) or a local compute server. Regardless of it’s locale, the compute server is not to be used in real-time. You feed in questions and receive back answers.

The most efficient use of a compute server is to have a queue of questions and a process for consuming and integrating the answers into your growing knowledge base on the problem.

For example, you may set the goal of running one experiment per day (or night) no matter what. I often try to hold to this pattern on new projects. This can be good for keeping momentum high.

When ideas wane, you can fill the queue with thoughtless optimization experiments to tune the parameters of well performing models, an ongoing background task that you can always back on.

Plan while experiments are running

Sometimes you must run experiments on your workstation in real-time. Your workstation must block while the model runs. The reason will be some pressing real-time requirement that you cannot delay.

When this happens, remember that you project and your thoughts are not blocked, only your workstation.

Pull out a text editor or a pen and paper (preferred so you don’t steal any cycles from your experimental run). Use this time to think deeply about your project. Make lists like:

  • List and prioritize experiments you would like to perform
  • List questions, expected answers, set-up required and impact the results each experiment will have.
  • List and prioritize assumptions and experiments you can do to dispute them.
  • List and prioritize areas of the code you would like to write unit test for.
  • List alternative perspectives and framing of your problem.

Be creative and consider testing long held beliefs about the project.

I like to do my creative work at the end of the day to allow my subconscious to work on the problems while I sleep. I also like to run experiments on my workstation over night to let it think alongside my subconscious.

Summary

In this post you have discovered some ways to tackle the problem of being productive during machine learning model runs.

Below is a summary of the key tactics that you can use:

  • Consider whether each experiment is required using the contribution it will provide to your understanding of the problem as the evaluation criteria.
  • Design experiments that run faster and use samples of data to achieve speed ups.
  • Never tune hyper-parameters by hand, always design automated experiments to answer questions of model calibration.
  • Run experiments during your down time, such as overnight, lunch breaks and weekends.
  • Design experiments in batch so that you can queue and schedule their execution.
  • Delegate experimental runs to compute servers off your workstation to increase the efficiency.
  • If you must run blocking real-time experiments, use that time to think deeply about your problem, design future experiments and challenge base assumptions.

相關推薦

What To Do During Machine Learning Model Runs

Tweet Share Share Google Plus I think this is an important question. I think answers to this qu

What to do during break from work?

I attempt to mediate using headspace, but if I don't feel in the mood for that, I go for a walk around the city. However, if I am feeling rather lazy, I si

Metrics to measure machine learning model performance

How to read: It depends on what you want to measure. For accuracy, a value closer to 1 (or 100%) is better.Gains chartsThis metric measures how a model per

Deploying your machine learning model to unlock its potential

Map Unavailable Date/Time Date(s) - 2018-Dec-05 2:00 pm EST - 2:30 pm EST Add to iCal calendar iCal Categories Svetlana Levitan will in

Use Watson Knowledge Studio to build a custom machine learning model in the medical domain

About this webcast One of the key benefits of building a machine learning annotator is the ability to train Watson in a complex domain such as medicine.

What to do next to activate this settings for already existing users

-m man date incr env central templates com comm Link: http://sharepoint.stackexchange.com/questions/89284/sharepoint-2013-mysite-increase

How To Load CSV Machine Learning Data in Weka (如何在Weka中載入CSV機器學習資料)

How To Load CSV Machine Learning Data in Weka 原文作者:Jason Brownlee 原文地址:https://machinelearningmastery.com/load-csv-machine-learning-data-weka/

機器學習_論文筆記_1: A few useful things to know about machine learning

> 翻譯總結by joey周琦 希望把自己閱讀到的,覺得有營養的論文,總結筆記和自己想法,留給自己,也分享給大家。因為英文論文中一些專有,有難度的詞句,會給出英文原文。 這篇文章總結了有關機器學習的12條重要,簡單,明瞭的經驗。本文面對分類問題總結,但不限於分類問題。

Deploying a Machine Learning Model as a REST API

As a Python developer and data scientist, I have a desire to build web apps to showcase my work. As much as I like to design and code the front-end, i

Ask HN: Let go from startup I was cofounder at. What to do next?

I've been working at this startup for the last two years as a cofounder/CTO, and I was informed just this morning by my CEO that they want me to transition

Everybody’s Crazy: Why Management is Hard (And What to Do About It)

Everybody’s Crazy: Why Management is Hard (And What to Do About It)Your Job is Working With People. People Are Hard.The Weird ThingEvery so often, when I w

How to Apply Industrial Machine Learning

The concept of machine learning is becoming better understood as we increasingly interact with it every day. From Netflix and Amazon recommendations, to Si

How to become a machine learning engineer: A cheat sheet

Machine learning engineers--i.e., advanced programmers who develop artificial intelligence (AI) machines and systems that can learn and apply knowledge--ar

How to deliver on Machine Learning projects

As Machine Learning (ML) is becoming an important part of every industry, the demand for Machine Learning Engineers (MLE) has grown dramatically. MLEs comb

Building a Machine Learning Model through Trial and Error

The machine learning roadmap is filled with trial and error. Engineers and scientists, who are novices at the concept, will constantly tweak and alter thei

6 Steps To Write Any Machine Learning Algorithm From Scratch: Perceptron Case Study

This goes back to what I originally stated. If you don't understand the basics, don't tackle an algorithm from scratch. For the Perceptron, let's go ahead

Deploy any machine learning model serverless in AWS

When a machine learning model goes into production, it is very likely to be idle most of the time. There are a lot of use cases, where a model only needs t

How to Decide What to Do With Your Life

Stop Doing This to YourselfWhat’s your purpose in life?What’s your passion?These questions send cortisol grenades throughout your body when you think about

What to Do If You Get Seasick on Dry Land

What to Do If You Get Seasick on Dry LandA new therapy holds hope for sufferers of Mal de Debarquement syndromeBy Eliza StricklandI n July of 2014, Chris P

Ask HN: I've made some it projects. What to do next?

> Now it is closed source free for use library in c.If you don't plan to charge for the use of this library, open source it. Or you can put a dual licen