Blockchain for Business and Product – Part 2: Mining Cryptocurrency

(Part 1: Mental Models for Blockchain)

There is currently a lot of hype around cryptocurrencies, blockchain technology, and decentralized consensus systems. There is also a great deal of confusion around why the hype exists, what the unique value of these systems is, and how one might jump into this ecosystem to try their hand at building something. This, in general, makes it difficult for industry professionals to separate signal from noise.

This blog series is aimed at describing some of the core businesses and products that have arisen in the tech industry given the recent advances in decentralized consensus mechanisms, so that individuals focused on building new products and businesses can see the landscape quickly, get their hands dirty, and build something new.

This second article will walk through the system design for one business in this space – cryptocurrency mining. We will discuss what it is, how it fits into the ecosystem, and how the business works.

Mining for cryptocurrency is renting your compute power to a bank and getting paid for this service. Understand the profit and loss of this business and how to iterate to improve return on investment.

Align your interactions with blockchain and crypto to your values. Mining a cryptocurrency is supporting that economic system and its banking operations, by using your computer systems to be the labor for the banking administrative tasks. Mining many coins is supporting many economic systems and potentially their interactions and dynamics.

This is similar to using your car to support the transportation system and business operations of companies like Lyft or Uber. For instance, with Lyft you use your car as the hardware, spend money for gas, pay for mechanic fees from upkeep, and invest your time to drive instead of other activities. The profit at the end of the day is how much money you made during the day minus all these costs of using your vehicle for this ride-sharing service. Is it viable?

Mining cryptocurrency is like installing a solar panel and selling to the grid. The main objective is to turn electricity into money.

Mining cryptocurrency is also similar to installing a large solar panel array on your house and earning money by selling electricity back to the grid. In this example, you have to buy the array and batteries, pay for installation, and keep the system working. The output at the end of the day is how much money you made from the electricity sale minus the upkeep. Is it viable?

In the same way, when you are mining for crypto, you are using your computer in a “banking-operation-system”-sharing economy. Is it viable to lend your computer in this way?

The high-level overview of a mining business. The main objective is to turn electricity into money.

 

For the following example, I’ll focus on Monero, a specific cryptocurrency that has a mission and economic system that many people value. Monero is a cryptocurrency that has private accounts, robust security against bad actors, a mining system that is more accessible for people wanting to contribute, and many other advantageous features. For more information on Monero, check out this book.

The cost to running this Monero mining business includes:

  • The original cost of your mining hardware
  • Electricity costs, based on your local electricity rates, which are typically measured in kWh/mo
  • Mining pool fees. Even though mining by yourself is possible and accessible to more people in Monero, mining as part of a collective creates more stable revenue. Being a part of this collective, however, incurs a small fee to the pool operator.
  • (If desired) Conversion fees between your mined currency (here, Monero) and a larger cryptocurrency (e.g. Bitcoin)
  • (If desired) Conversion fees between a larger cryptocurrency and USD

Additional pieces you need to support this business:

  • Wallets/accounts for different currencies and for currency exchanges
  • The software for mining
  • Knowledge about how to transfer funds to different accounts

Note: People can hold their assets in many ways. USD, Yen, Euros, real estate, jewelry, art, equity in a company, life insurance contracts, Bitcoin, Monero, etc. For most readers, I’m assuming they keep most of their assets in USD, so I’m also including parts of the business that turn Monero into USD.

Conclusion

Using your computer as an asset in a blockchain-oriented system is just like leveraging your car and time as a driver for Lyft, or a solar panel system for selling electricity to the grid. How is your computer being used? How is it providing value to you? How much does it cost to let your system be used for this? Is it worth it to you?

Setting up a business mining a cryptocurrency (in this example, Monero) requires you to think through how you would create, own, and operate a business. What are the system components? How much do they cost? What are the operations and how does the system run? If the business is not profitable, are there ways you can optimize parts of your business to make it run better and head toward profitability?

I encourage everyone to think through all of these avenues to understand how business in this new era will operate, which ones you should be a part of, and how you can continually make them and yourselves better in the process.

 

(this post was originally hosted on Medium)

Blockchain for Business and Product – Part 2: Mining Cryptocurrency

Tips for organizing large interactive Zoom sessions

Companies are now regularly organizing and running large interactive Zoom meetings that include several back-to-back breakout sessions. Below are a few quick tips to remember to ensure that your large group Zoom meetings run smoothly and gain more engagement:

  • Prepare a clear agenda and share it with participants prior to the meeting. Managing large group Zoom meetings can be more challenging than similarly-sized in-person meetings, so you’ll want to provide even more structure than you’re used to giving — this means concise intros, clear sections and timing, and succinct conclusions.
  • Be sure to build in buffer time for transitions. Incorporating a series of brief breakouts for substantial smaller-group work can be difficult given the time lost in order to move participants into and out of Zoom Breakout Rooms. Building buffer time into your meeting agenda will help you avoid running out of time.
  • If you are the host, it’s important to begin the meeting with a clear introduction of who will be presenting, and in what order.
  • Remember to assign notetakers prior to the meeting beginning.
  • Pre-assign one (or more) meeting facilitator(s) and let participants know at the start that they will be helping to surface questions and/or issues through the Chat or Q&A features.
  • Just like in person, people need to know what level of participation is desired. Are they just there to listen? Or should they be encouraged to ask questions or participate in discussion? Make your expectations clear and encourage the use of specific methods, like Zoom’s Chat or Q&A features. While full team participation can be difficult and disruptive over video when it’s a large group, these features will allow attendees to ask questions, share their thoughts, and give you a quick snapshot of the group’s state. You can also save the chat and review all of the responses more thoroughly later.
  • If you have multiple or recurring meetings arranged, be aware of the people who join late, or not at all. During in-person meetings, there is social pressure to join a room on-time, and those who join late are very visible. Be sure to follow up with these people to address the issue.
  • After completing your Zoom session, follow up with key stakeholders to get their feedback on how it went and what may require further attention. If these are recurring meetings, this will give you the opportunity to make improvements for your next session.

(originally hosted on Medium)

Tips for organizing large interactive Zoom sessions

Blockchain for Business and Product – Part 1: Mental Model

There is currently a lot of hype around cryptocurrencies, blockchain technology, and decentralized consensus systems. There is also a great deal of confusion around why the hype exists, what the unique value of these systems is, and how one might jump into this ecosystem to try their hand at building something. This, in general, makes it difficult for industry professionals to separate signal from noise.

This blog series is aimed at describing some of the core businesses and products that have arisen in the tech industry, given the recent advances in decentralized consensus mechanisms, so that individuals focused on building new products and businesses can see the landscape quickly, get their hands dirty, and build something new.

This first article will establish some baseline metaphors for the current blockchain ecosystem. The second article will walk through the system design for one business in this space — cryptocurrency mining.

A blockchain is like a component of a business, but decentralized. Right now, people are focused on building components for banks and financial systems.

Banks are a particular type of business and product that provide many features to their users. For example, as a user of a bank, you can store your money in a place that’s more stable than under your mattress, as well as send and receive money with other people without mailing it. In order to make the latter feature work, banks must perform a series of administrative tasks that assure the money transfer has been completed correctly. Fixing errors in this process, removing inefficiencies in the administrative tasks, or changing how this business component fundamentally operates are several ways to make everything better and improve this feature of the bank for its users.

Cryptocurrency mining, at its core, focuses on improving fault tolerance and removing security risks in a bank’s money transfer system. Instead of having a centralized record system at the bank, where every employee doing administrative tasks is modifying the same centralized record system, imagine there is a room full of people doing their own administrative tasks on their own separate record systems. These people also sync with each other and share the results of their work, so that they all know the transactions that are happening and can keep each other accountable. This sharing is also public, so customers can hold the bank accountable. If one record system fails, there is still a room full of other systems working and keeping it running. If a bad actor tries to falsify the records of one person, it’s easily detected because everyone else can share the record systems and detect the anomaly.

These changes in the way the business component works makes the product better and delights users more, but they are mostly invisible to bank users. If users go to the bank and send money, they are mostly focused on the process being correct and fast. If it happens to be fault tolerant and more secure, that probably matters as well, but how those aspects are achieved operationally is less important — these things matter to those inside the business.

The reason cryptocurrency users, as bank users, are also so focused on these banking mechanisms is that they also want banks to be completely decentralized. So, they are building systems for two core users — themselves as bank patrons that want to use good financial systems, and themselves as the bank itself that wants their systems to be run by a community. But the systems being built can be effective as improvements to banks just as much as creating and improving a fully decentralized bank.

Supporting a specific cryptocurrency is supporting a specific type of economy. Support using your values.

Banks allow you to perform many actions with your money, like transferring it to others, but these operations are always performed within a specific currency. Even if there are multiple currencies involved, you are leveraging systems that do the work of transferring between currencies.

Holding onto specific currencies is an implicit statement that you think the currency of the associated economic system is strong, and that you believe the mechanisms of those economies will be more robust and successful. Every currency is associated with a country or set of countries, so you are also implicitly aligned with how that country runs itself and its monetary systems. For example, if you hold US dollars (USD), then you believe that America’s economy will keep growing, that the taxation system is acceptable, that the amount of supply and trading rates are acceptable, the way they control inflation and new currency generation is acceptable, and many other economic factors.

Cryptocurrencies all have different economic systems (mostly separate from countries, although some are tied to central banks), and putting your assets in them is an implicit assumption that their economic system is better and will grow long term. Just like real currencies within government economic systems, cryptocurrencies differ in their economic structure. These differences can include the privacy of asset holders and their account values, governance of the economic system, how the mining system works (how their banking tasks work), how secure their system is against bad actors, how money flow is regulated, how regularly new currency is added to the supply, and much more.

For example, Monero is a specific cryptocurrency that has a mission and economic system that many people value. Monero is a cryptocurrency that has private accounts, robust security against bad actors, a mining system that is more accessible for people wanting to contribute, and many other advantageous features. For more information on Monero, check out this book.

Conclusion

Leveraging blockchain technology, in many cases, is just reorienting your mindset on how your data and assets are handled — are they centralized or decentralized? How does the data synchronize between these systems? Is the system you built actually tolerant to people disrupting the network connections?

Supporting specific blockchain technologies or cryptocurrencies often involves understanding the economic dynamics and what properties those systems value. Which ones line up with your world view?

I encourage everyone to think through all of these avenues to understand how business in this new era will operate, which ones you should be a part of, and how you can continually make them, and yourselves, better in the process.

Blockchain for Business and Product – Part 1: Mental Model

5 Quick Tips for Managing Teams Remotely

Awhile back, I spoke with Billy Griffin, the Product Manager for GitHub Desktop, who builds products for distributed teams and who, himself, works on an incredibly distributed and remote team.

We discussed his thoughts on making distributed teams work, ensuring mission alignment in a distributed team, organizing the work, and keeping track of progress.

This is Billy’s advice for keeping a team running well while operating remotely:

  1. Over-communicate on mission and goals: Sync on the team’s mission and goals several times a week over video conferencing. Vary who is leading the meeting, based on what the team needs (e.g. focus on product, focus on engineering, etc). Have dedicated chat channels for teams working together to stay on top of things.
  2. Stay focused and deliver: Team members should focus as much as possible on one project at a time, to deliver successfully on that project while navigating all the remote work and communication overhead. Sometimes a team member may have a 10–20% project, but probably only because that person is the only person at the company with the expertise to do it.
  3. Enable asynchronous work: Leverage project management tools that allow your team to submit a lot of bugs and feature requests, so your team can quickly and asynchronously contribute to making your code, product, or processes better.
  4. Keep remote work organized: Organize all of the team contributions by finding overlaps in issues, synthesizing requests, and following up with specific team members for clarification. Consolidate issues into larger targeted issues and rally people towards designing solutions.
  5. Create channels for contribution: Have a central team that is focused on the core work and mission, but allow for other team members to contribute ideas and or solutions. Have a separate chat for other interested colleagues that want to contribute to the mission. For this non-central team, provide context for where the project is going, and also provide avenues of contribution with smaller self-contained problems.
5 Quick Tips for Managing Teams Remotely

Build Products for People

Design for User Journeys through life, not just software

Building Products are about finding pathways and solutions for people to achieve something meaningful.

I find the most compelling products are those that build solutions for people to achieve something meaningful in life. Users exist in a current state of being, desire to be in a different state, and face problems in achieving this. Products are solutions to making this transition successful, and then if part of that solution is a piece of software, there is a user journey through that software component of the solution. Essentially, you are encapsulating your personal ability to help someone transition through life, then automating and scaling what you know is successful.

Product Example: Opendoor

An example of a compelling product like this is Opendoor, which focuses on helping people that want to go from owning a house to having it be sold fairly and moving on with their life. The solution Opendoor has created for their users encapsulates and automates the role of a real estate agent (and many of the other services) that are required for the user to go from one state to the next, and provides this as an incredibly fast transition.

Product Example: Insight Artificial Intelligence Program

Another example product is Insight, and the AI program which focuses on helping Software Engineers and Researchers go from their current role to a new cutting edge career that leverages machine learning engineering. These individuals exist in a current state, desire to be in a different state, and face obstacles to being successful. The aim is then to provide education and mentorship to these people to make a successful role or life transition. The solution for this is to provide ways for these people to work on real company data, use appropriate machine learning techniques, and build models or tools that have value for a company or business.

Modeling Humans for Product Design

I tend to mentally model these scenarios, and finding solutions to them, in the same way that I would approach modeling artificial agents (similar to POMDPs, but with my own modifications).

Such a system looks like the following:

  • States: There are many possible states of the world. Which ones are your users in and which ones do they want to be in? The state users are in also constrains what inputs and outputs are actually possible.
  • Sensory input: Given the state of the world, what aspects of the world do they have access to?
  • Input perception: Given the informational input they have, what is their perception of it? e.g. what tinted glasses do they wear when they see the world?
  • Output perception: What internal understanding do they have on what actions they can perform in the world?
  • Motor output: What actions do they actually have available in the world given the state it is in?
  • Motivation/Reward: Given the state of the world, which also constrains inputs and outputs, AND the perception of both of these, how rewarding do they find this vs other states?
  • Strategy/Policy: Based on what they care about, what they know they can do and what they sense about the world, what’s the way in which they actually interact with the world to seek reward? This process could be active (the agent interacting with the world is aware of their own policy) or passive (they interact with the world but are unaware of their policy, although others could reverse engineer it from their observations)

Using Framework to design products for people

Translating this computational agent-based view into a system for analyzing and creating solutions for people moving within the real world then takes the following form below. I’ve also indicated some potential solutions for how to add value when solving this problem, highlighting where data, sales, and marketing come into play.

  • States: What real world scenarios exist for our users? Solution(s): Make more potential states of the world which changes the game being played.
  • Sensory input: What information do our users have access to? Solution(s): Provide more access to information. Create new sources of input that didn’t exist before. Build systems to aggregate data and give access.
  • Input perception: How do our users interpret all of the information they have, or how do they interpret the data when it’s completely messy and mostly patternless? Solution(s): Help users reinterpret the data they do get. Change sales and marketing, provide data stories to augment how users interpret the available data.
  • Output perception: How do users interpret what they can do in the world to move around in it? Solution(s): Help users reinterpret what they can do in the world and don’t realize it, or provide information/situations where they can gain this capacity. Provide documentation and guides for doing things. Provide additional sales and marketing to inform users. Provide data and stories and use cases to make potential actions visible.
  • Motor output: What can they actually do to act on the world? Solution(s): Provide more access to all systems that currently exist. Create new ways of taking action that didn’t exist before. Create systems that can automate the actions you want to take.
  • Motivation/Reward: What do they actually care about? Solution(s): Provide ways for people to understand what they value or influence them to value certain things. Increase marketing to show what’s desirable. Provide more data to people about what others value. Show data on what is actually more valuable based on certain frameworks, e.g. financial benefits.
  • Strategy/Policy: How are they going about their interaction with the world? What is their actual method they are doing now? Are they aware of it? Solution(s): Make transparent the ways people are interacting in the world and what other potential ways exist. Provide ways for people to understand their sensations, perceptions, actions, and motivations to see what are better ways of doing what they are trying to do.

Applying this to Opendoor

  • States: What real world scenarios exist for our users? e.g. people can own or not own houses and can move between these states.
  • Sensory input: What information do they have access to? e.g. people might only see the property values around them or have access to some of this information online. Or they have access to information about the houses themselves.
  • Input perception: How do they interpret all of the information they have, or how do they interpret the data when it’s completely messy and mostly patternless? e.g. certain aspects of houses are emphasized more than others, property values seem affected by certain things, etc.
  • Output perception: How do they interpret what they can do in the world to move around in it? e.g. probably have some knowledge about realtors and systems, but also how good it bad they are, what they think they can do to speed up parts of the process, etc.
  • Motor output: What can they actually do to act? e.g. only certain realtors exist in an area, only certain processes can be followed, with potentially unalterable timelines. There only exist a certain number of people looking to buy a particular house in the market.
  • Motivation/Reward: What do they actually care about? e.g. they want to not own a house anymore, they want to move states quickly, they want to not deal with realtors, etc.
  • Strategy/Policy: How are they going about their interaction with the world? What is their actual method they are doing now? Are they aware of it? e.g. they could be going through the motions of selling a house through standard ways because it’s only what they know, or have access to, or what they have time for. It they could have their whole process mapped out in detail with lots of pathways, scenarios, action plans.

Ultimately, Opendoor would want to work along all angles, but the largest pain point for people, at least in the beginning, was likely altering the actual actions people could take in the world — building the method by which to sell the house. Other aspects were also very important for making the sale happen, such as having all the right data for accurately pricing houses and to provide that information to people. The solving of the problem, however, focused on making a way to sell the house quickly with an automated efficient system.

Applying this to Insight

I find that most mentorship and guidance of software engineers or researchers in their professional development involves reframing their goals as transition processes from one state to the next. The aspects of mentoring and training, though, are focused on changing or augmenting part of this agent model.

Translating this computational agent-based view into a system for providing mentorship and education for these individuals takes the following form below. I’ve also indicated some potential solutions for how to add value when giving this advice and training.

  • States: What real world scenarios exist for people moving careers? Solution(s): Identify and communicate the landscape of new roles, responsibilities, management structures, or experiences people can have.
  • Sensory input: What information do these engineers have access to? Solution(s): Help engineers join meetings with others internally or externally, encourage them to interact with others they don’t typically engage with, help them see new offices, have them trial new roles.
  • Input perception: How do engineers interpret all of the information they have, or how do they interpret the data when it’s completely messy and mostly patternless? Solution(s): Guide people through how to interpret data in different ways, give your high level interpretations of messages or situations, point out salient opportunities that exist in the ongoing activity that’s happening at the company or externally in the field.
  • Output perception: How do your direct reports interpret what they can do in the world to move around in it? Solution(s): Guide people to learn different type of actions they can take in a particular setting, extra intuition on how different types of nudges and communications can succeed or fail, different styles for working effectively with different people.
  • Motor output: What can they actually do to act on the world? Solution(s): Provide situations where engineers can take the lead and influence parts of their company or external groups. Advocate for them to be considered for roles where they can do the things for which they have been preparing.
  • Motivation/Reward: What do they actually care about? Solution(s): Sit down with engineers and help them determine their personal and professional goals, help them reassess these to align them more throughout the company to be successful.
  • Strategy/Policy: How are they going about their interaction with the world? What is their actual method they are doing now? Are they aware of it? Solution(s): Provide examples of how their current workflows will result in suboptimal performance, help them self identify what things are doing well and not well, help them proactively plan by building roadmaps towards.

Next Steps: Providing the long-term sustainable business solution

Solving problems for users in the long-term involves looking at all your options for solutions, evaluating their potential for value, estimating how much value they provided, and determining how to monetize them. The business side of the process is then to set up the self-sustaining solution such that the money that’s captured from the provided service (revenue) is greater than the the effort to provide it (costs), thus making it a sustaining solution for long term impact.

Common Pitfall: People optimize for consumption

A common issue that happens in the above product design is that people want to optimize for consumption (sensory input), even though this is counter-productive to their true goals and underlies a failing strategy.

Users ask for content

When building product for users, especially when focusing on a risk-averse population, feedback you receive from users is that they want to know information because that is how they are going to be able to solve the challenges they are facing in life. Users prescribe that the solution is to focus in on the sensory input aspects — they want more raw data to consume. This is often due to the fact that they already have strong convictions that they know what they want in life (rewards), can interpret the data for themselves (input perception), and already feel like they would make the best decisions (strategy) given what they know how to do (output perception).

Users seeking career change ask for education materials

When mentoring and training people to take their lives and careers forward in a meaningful way, the ever exhausting mindset is the statement that people just want to be exposed to more information and learn as much as they can. One example I consistently encounter is the software engineer who wants to add more and more time to learn machine learning. The “need for educational material” keeps being presented as a critical piece to their development, and then they try to solve the problem by consuming more and more machine learning educational content.

What is often needed in this scenario is for several aspects to be altered to build a real solution to this problem:

  • First, help identify the real goal in life — if the aim is to do machine learning on a real problem for a real company and make a difference, then they need to re-organize their mental reward structure.
  • Second, obtain real access to problems and data at their company where they can actually work on a real problem (motor output), even if they don’t have 100% of the training.
  • Third, given them the intuition for how to actual identify real opportunities for leveraging ML, where ML is critical (input perception).
  • Fourth, provide them the ways to consistently be biased towards action and build more and more relevant ML projects instead of spending time watching videos (change their strategy).

The above is another reason you see a very large proliferation of educational products on the market that are just, at their core, content media companies where people are paying to consume ML material. It does not solve the actual problem of helping people do ML in their lives and in their careers.

I hope this provides another avenue by which to understand users, build solutions for them, and determine how to keep that solution sustainable for the long term. I’d love to hear from you all — Who is your product/company helping? How are they helping them? Is this solution sustainable?

Build Products for People

How to vote for secure and stable cryptocurrency infrastructure

Your friendly guide for voting in the ongoing election to secure the future of ICON’s on-chain governance. We’ll take you step-by-step through converting your fiat currency (dollars, euros, etc) into ICX tokens and staked votes for any P-Rep candidate.

There are many pathways for putting your money where your mouth is by converting fiat currency into votes for cryptocurrency infrastructure. The path in this article moves money through Square, Binance, and ICONex.

 

Voting Process from scratch

Participating in the upcoming vote for the future of ICON’s infrastructure is easy and can be done in the following 6 steps:

  1. Convert dollars (USD) to bitcoin (BTC) at a fiat-to-crypto exchange
  2. Move BTC to an crypto-to-crypto exchange
  3. Trade BTC for the ICON token (ICX)
  4. Create ICON Wallet
  5. Move ICX from exchange to ICON wallet
  6. Stake and Vote

Below I’ll go through each step with visuals and descriptions.

1. Create an account to convert USD to major cryptocurrency

Buying Bitcoin using Square Cash (connected to bank account)

There are several ways to move fiat currency (here US Dollars) to cryptocurrency. Some major fiat-to-crypto on-ramps include SquareCoinbase, and Binance.

For this post, I will use Square Cash for its ease of use and ability to quickly transfer things on mobile. In the past I’ve used Coinbase and found it very user friendly, so I’d recommend it as well.

For each of these systems, in order to buy/sell crypto and transfer it to an exchange, you also typically have to provide a picture of yourself and a form of physical ID (e.g. driver’s license). This isn’t shown in the picture above, but you will likely either be prompted or find the section where it’s needed.

To actually buy Bitcoin in Square Cash, navigate to your profile, click on the Bitcoin section, click on “Buy”, choose an amount, and confirm.

2. Move funds to a cryptocurrency exchange

There are many cryptocurrency exchanges, but one of the largest ones, and the one I’m focusing on here also because of its ease of use on mobile is Binance. Another that’s widely available in the US is Kraken.

After creating an account, you can navigate to the tab that shows your funds (if this is your first time using Binance, it should be empty). If you click on the deposit button, it will take you to a screen that shows all the cryptocurrencies Binance supports. Navigate to BTC, where Binance will provide you with an address to receive BTC.

Since Step 1 above gave us Bitcoin (BTC) in a wallet managed by Square, we need to transfer this to Binance for conversion to ICX. You will to “withdraw” your BTC from Square and send to the “deposit” address provided by Binance.

If you are using the Square Cash app, initiating this transfer pops open a screen that requests an address of where to send the BTC. Use the copied Binance address here and then enter it again to confirm. Triple check that you copied the correct address in its entirety.

Disclaimer: There will be two waiting periods now: First, it may take a moment for Square Cash to broadcast your transaction to the Bitcoin blockchain. Once miners have included your transaction, Binance will wait for a few blocks (~20 minutes) to consider the transactions confirmed/settled. Congrats, you have now just experienced one of the pain points of older cryptocurrency systems and can make judgements about newer faster systems.

 

3. Trade bitcoin to get ICX tokens

Look at the market of trades between BTC and ICX to see when is a good time to buy more ICX.

On Binance, you can navigate to the Markets tab and search for ICX to get the trading information for ICX/BTC. The graph shown is a candlestick graph, where each of the bars shows the opening and closing prices as well as the highs and lows of a certain period.

On the top left of the chart, you can choose the length of time for the candlesticks. For example, if it is set for 1D, then you see the trading information at the scale of a day, while if it is set at 1H, then you see the information at the scale of an hour. Depending on how often you are trading, you can change the graph to compensate. A period of upward greens means there is more buying of ICX and people are bullish, while a period of downward reds means there is more selling of ICX and people are bearish. There are whole industries of people that investigate these patterns visually or algorithmically for trading, but take it all with a grain of salt.

Buy low and sell high — if you see there has been some dropping in red and you think there will be a shift to more greens, that’s a good time to shift your BTC to ICX for a better exchange rate.

You can also check out the Depth, which shows you the orders that are open for people who are buying and selling this cryptocurrency pair. The left hand side in green shows people who are asking to buy certain amounts of ICX at certain BTC prices. Similarly, the right hand side in red shows people who are willing to sell certain amounts of ICX at certain BTC prices. The right hand side will show you whether the price you want might be possible given the people who are currently selling.

Try to buy as much ICX at the lowest price you can.

For more information on other aspects of the Binance platform, using the desktop graphics, check out this link.

4. Create ICON wallet

Visit ICON’s website and then go to create a Wallet in the upper menu. ICON also has a mobile app but it doesn’t look like it currently supports voting, so for now we’ll use the desktop version.

5. Transfer funds to wallet

Once the wallet is created, it’s only a matter of finding the address so that you can send the ICX from Binance to the ICONex wallet.

Click on the ICON section to get to an address for ICX deposits:

On the Funds tab of Binance, choose to withdraw ICX. Then choose the amount — here I’ve chosen 100.02 ICX (to cover 0.02 fee), which is roughly $20 at the time of writing.

After submitting the transfer, once complete, the balance will show up in your ICONex wallet:

6. Stake and Vote

Now that you have ICX available, you are able to stake and vote for the P-Rep Nodes that you find the most meaningful for keeping the ecosystem secure and stable. Check out our guide about how to decide which P-Rep to vote for. Nodes have several crucial responsibilities, and can be evaluated based on:

  • Track record for maintaining secure & stable infrastructure
  • Team with a solid background
  • Community contributions: code, education, organization

For this article, I will demonstrate how to vote for Insight-ICON, who have built a lot of the core infrastructure for P-Rep nodes, have a growing team of blockchain engineers and DevOps engineers for continual support, and give educational support back to the community on topics like infrastructure.

The first step is to navigate to the Voting tab, then click on My Status, then choose your wallet, then click Adjust under the Stake section.

On the pop-up window, choose the amount you wish to stake. If you wish to stake everything, you still must leave 3 ICX in case you want to un-stake locked tokens (the wallet will automatically ensure this).

After completing the staking, you can see the amount you have staked and can choose to vote:

From the list of P-Rep nodes listed, you can click the + button on the left hand side to add it to your list of nodes that you want to support. As mentioned above, I will be voting for Insight-ICON.

The nodes you select get added above, and after clicking on their name, you can use the scroll-bar to select how many votes you’d like to assign to each team.

Final Word

And that’s it — you’ve turned US Dollars into ICON, become part of the community, and voted for a more stable and secure infrastructure.

 

(this post was originally hosted on Medium)

How to vote for secure and stable cryptocurrency infrastructure

Transitioning from Academic Machine Learning to AI in Industry

by Jeremy Karnowski and Emmanuel Ameisen

Beyond Implementing Papers

It requires more than just taking online courses or being able to implement papers to get a job in the modern AI industry. After speaking with over 50 top Applied AI teams all over the Bay Area and New York, who hire Applied AI practitioners, we have distilled our conversations into a set of actionable items outlined below. If you want to make yourself competitive and break into AI, not only do you have to understand the fundamentals of ML and statistics, but you must push yourself to restructure your ML workflow and leverage best software engineering practices. This means you need to be comfortable with system design, ML module implementation, software testing, integration with data infrastructure, and model serving.

Why do people implement papers?

Frequent advice for people trying to break into ML or deep learning roles is to pick up the required skills by taking online courses which provide some of the basic elements (e.g. Google’s Deep Learning courseFei-Fei Li’s Computer Vision courseRichard Socher’s NLP course). Many of these courses teach participants in the same way as students learn — through lectures and structured coursework.

While these core concepts of machine learning and deep learning are essential for Applied AI roles in industry, the experience of grappling with a real, messy problem is a critical piece required for someone seeking an industry role in this space. Because of this, Andrew Ng recommends that people to prepare for this transition by implementing research papers. This forces one to work through some of the same issues that Applied AI professionals must face when moving research to production. Through this process, newcomers to the field also learn the many tips and tricks that allows researchers to debug algorithmic issues and iterate more rapidly for better performance.

However, through our many conversations with 50+ teams across industry, we consistently hear that just learning concepts or implementing papers is not enough.

Top 5 Skills you need to acquire before transitioning to Applied AI

1. System Design

When machine learning and deep learning is employed to solve business problems, you must design systems that consider the overall business operations. The system’s components should be architected in a modular way, operate under a solid logic, and have extensive documentation for others.

Questions to ask for each project:

  • How do you efficiently train your model without impacting day to day production?
  • Where do you store and backup models?
  • How do you run quick inference?
  • What are concrete metrics you can relate to your model?
  • If needed, how do you integrate a human feedback loop?
  • Do you need deep learning to solve the problem, and if so, why?

 

2. Structured ML Modules

Jupyter notebooks, while wildly popular for rapidly prototyping deep learning models, are not meant to be deployed in production. For this reason, academics should push themselves to build structured ML modules that both use best practices and demonstrate you can build solutions that others can use.

Action Items:

  • Take a look at this GitHub repo (and related blog) from an Insight AI Fellow that, in addition to having some exploratory notebooks, converts these ideas into a well structured repo that can be called from the command line.
  • Read up on Tensor2Tensor (repo) and work to expose your model’s training and inference through an elegant API.

 

3. Software Testing

Academics often run code to find and eliminate errors in an ad hoc manner, but building AI products requires a shift towards using a testing framework to systematically check if systems are functioning correctly. Using services like Travis CI or Jenkins for automatic code testing is a great first step to showing you can work in a company’s production environment.

Action Items:

  • Check out a good starter blog post on testing by Alex Gude.
  • Read Thoughtful Machine Learning, which goes more in depth on how to test machine learning systems.
  • Read this paper on the tests and monitoring that companies care about for production-ready ML
  • Work through how you would test machine learning algorithms. For example, design tests that ensure a piece of your ML system is modifying data in the way you assumed (e.g. correctly preprocessing image data by making it the correct size for the model to use).
  • Check out testing options in Python.
  • Read this article on the differences between different continuous integration services. We recommend trying out Travis CI as a quick intro into this industry-standard practice.

 

4. Integrating with data infrastructure

No matter what company you join, you will have to access their often large data stores to provide the training and testing data you need for your experiments and model building. To show that you would be able to contribute on day one, demonstrate that you are able to interface with structured data records.

Academics typically experience a world where all the data they use can be stored locally, which is often atypical in industry. Similarly, many competitions and research problems are structured in a way that academics only need to use a folder of images.

To demonstrate industry know-how, academics should show that they can (1) query from large datasets and (2) construct more efficient datasets for deep learning training.

Action Items:

 

5. Model Serving

It’s one thing to have built a solid ML or deep learning model that has excellent accuracy. It’s another thing to turn that model into a package that can be incorporated into products and services. While many academics using ML are very familiar with model metrics (e.g. accuracy, precision, recall, F1 scores, etc), they need to become familiar with metrics that companies care about when it comes to fast, reliable, and robust ML services.

Action Items:

 

Accelerate your transition

Iterating rapidly on modeling and deployment, and learning from those experiences, is the best way to quickly get up to speed. Because of this, individuals looking to make the transition to applied AI roles need to take advantage of GPU compute to accelerate their progress. There are a wide range of options available for experimenting with GPUs.

 

Keeping up to date

AI is an exciting, ever-changing field. The demand for Machine Learning Engineers is strong, and it is easy to get overwhelmed with the amount of news surrounding the topic. We recommend following a few serious sources and newsletters, to be able to separate PR and abstract research from innovations that are immediately relevant to the field. Here are some sources to help out:

  • Hacker News: Hacker News is a social news website focusing on computer science, data science, and entrepreneurship. It is run by Y Combinator, a well-known startup incubator. Don’t be thrown off by the name! The original usage of the term “hacker” has nothing to do with cyber criminals, but rather someone who comes up with clever solutions to problems through their programming skills.
  • Import AI: Great newsletter by Jack Clark of OpenAI, that stays on top of most important advances in the field.
  • Insight Blog: They maintain a pretty active pace. Some posts in their AI blog talk about different past projects, and can serve as good inspiration for interesting problems to tackle. They also regularly send AI content to their mailing list, sign up here.
Transitioning from Academic Machine Learning to AI in Industry

Preparing for the Transition to Applied Artificial Intelligence

by Jeremy Karnowski and Emmanuel Ameisen

Applied AI roles involve a combination of software engineering and machine learning and are arguably some of the most difficult roles to break into. These roles, focusing on advanced algorithms and leveraging new research results for sophisticated products, are a core component in many organizations, from large corporations to early-stage startups.

While at Insight, we worked with top AI teams in the Bay Area and New York to help Fellows make the transition to Applied AI. Fellows from our first AI session joined teams like Salesforce R&D, Microsoft AI Research, Google, Quora ML, and Arterys (who has the first FDA-approved deep learning medical intervention).

Because of our unique position in this space, we want to share with a wider audience some industry insights, perspectives on how companies are building their teams, and skills to prepare for the transition, whether you are coming from academia or industry.

The Industry Perspective

After speaking with 50+ Applied AI teams in industry, including those building new products using advanced NLP, architecting deep learning infrastructure, and developing autonomous vehicles, the one thing we consistently see is that there is a spectrum for Applied AI practitioners — ranging from research to production.

  • Research: On one end of the spectrum, teams are developing new ideas, doing R&D, developing prototypes, and primarily looking to produce papers.
  • Production-level ML: On the other end of the spectrum, teams are taking current ideas and producing fast, efficient, and robust systems that can be embedded in products.

While there are roles in R&D labs and in teams doing deep learning research, the majority of roles exist in the middle of this spectrum, on teams that aim to simultaneously stay current with research and embed the best advances into products. Often teams have a mix of members working to achieve this, but you’ll be the most competitive if you can position yourself to add value in both areas — be able to read and digest current research and then implement in production.

Our Approach

Building a pipeline from research to production requires companies to structure their teams in a way that blends the benefits of both worlds — academic research and software engineering. Accordingly, the Insight AI program was structured in a similar fashion, bringing together academics doing ML and deep learning research and software engineers with experience in ML.

While all the AI Fellows have strong coding abilities and experience with deep learning, academics and software engineers have different strengths, so our advice for how to succeed for these two groups is different. In addition to Insight’s resources on getting prepared for Data Science, we’ve gathered additional resources that target the transition to Applied AI.

These two guides are a distillation of many conversations we’ve had with top teams in the Bay Area and in New York, who hire AI practitioners poised to tackle their technical challenges and accelerate their expansion into Applied AI.

 

(this post was originally hosted on Medium)

Preparing for the Transition to Applied Artificial Intelligence

How AI Careers Fit into the Data Landscape

AI vs. Data Science vs. Data Engineering

Jeremy Karnowski & Ross Fadely

The landscape of technical professions is constantly changing, and the resurgence of work in Artificial Intelligence has opened up new opportunities that differ from traditional Data Engineering and Data Science positions. Data Engineers build data pipelines and infrastructure to ensure a constant availability of transformed data. Data Scientists analyze and build models from these data to develop new product features or drive the bottom line of the business. The goal of newly-formed AI teams is to build intelligent systems, focused on quite specific tasks, that can be integrated into the scalable data transformations of Data Engineering work and the data products and business decisions of Data Science work.

The differences between Artificial Intelligence, Data Science, and Data Engineering can vary considerably among companies and teams. We previously posted on the differences between Data Science and Data Engineering roles, and because these new AI roles differ from both, here we outline the roles for contrast.

AI Professionals

Artificial Intelligence, or AI, focuses on understanding core human abilities such as vision, speech, language, decision making, and other complex tasks, and designing machines and software to emulate these processes. AI has a long and rich history, and while many of the tools and techniques have been around for decades (i.e. multi-layer perceptrons, convolutional neural networks, reinforcement learning), recent advances in high performance computing, the development of distributed methods, and the availability of large labeled datasets have accelerated its adoption in industry. Due to this accelerated growth and success, there is an unprecedented need for AI practitioners across a range of industries.

The types of AI roles vary from company to company and industry to industry. While AI professionals come with many titles (e.g. Deep Learning Engineer, Computer Vision Researcher, Machine Learning Engineer, and NLP Scientist), they all share the same focus: building complex, state-of-the-art models that tackle specific problems.

Building these systems requires strong knowledge of engineering and machine learning principles, and depending on the team or product, some roles may weigh heavier on specific skills. For instance, some AI roles are more research focused and concentrate on finding the right model to solve the task, while others are more focused on training, monitoring, and deploying AI systems in production. Projects often center around questions like: How can we encapsulate subject matter expertise in order to augment or replace complex time-consuming decision making tasks? How can we make our automated customer interactions more natural and human-like? How can we uncover subtle patterns and make decisions that involve complicated new types of streaming data?

While there is a spectrum of AI focused work, almost all practitioners regularly prototype new AI system architectures, including building end-to-end pipelines. This means they need to stay current with the latest (often academic) advancements in AI. They actively monitor the performance and training of systems, help scale them up for production, and iterate on systems given shifts in data and/or model performance. AI Professionals typically have a good working knowledge of the python Data Science stack (e.g., NumPy, SciPy, pandas, scikit-learn, Statsmodels, etc), employ one or more deep learning frameworks (e.g., TensorFlow, Theano, Torch, Deeplearning4j, etc), and sometimes leverage distributed data tools (e.g., Hadoop, Spark, Flink, etc).

Data Scientists

Roles of Data Scientists in industry vary considerably. Organizationally, Data Scientists are often interfacing with internal (and sometime external) teams to help direct decisions which drive business. This involves answering questions like: How do we better understand and serve our customers? What ways can we optimize our operations and product? Why should we roll-out a new feature or product?

Frequently, Data Scientists are also directly involved in building data products. These products are everywhere, integrated into the websites and apps we use. Classic examples include Facebook’s custom user-based news feed and LinkedIn’s “People you may know” feature.

The day-to-day for data scientists may involve cleaning and manipulating lots of data, scoping and testing out high ROI projects, building out customized algorithms, and communicating results to the team and company clients. Data Scientists typically use Python or R, make heavy use of SQL queries, do analyses in Jupyter notebooks, and often have some data visualization experience in one or more frameworks.

Data Engineers

The amount of data businesses are ingesting and serving is trending in one direction: UP! In order to enable the functionality of data teams and products, engineers must design robust and scalable data architectures. Engineers who construct these systems have to think carefully about the current and future demands the business will need. What compromises need to be made for different ingestion/serve rates? Do we need to provide real-time streams to customers? How do we efficiently query the data? How do we keep track of vital metrics?

Along with these increasingly demanding needs is a landscape of data tools which is constantly and rapidly evolving. Deciding between tools like Spark, Flink, Kafka, Cassandra, Redshift, and ElasticSearch is a difficult and challenging task. Skilled Data Engineers not only know the pros and cons of using one tool over another, but also know how to implement them in production systems.

As a result, the main daily activities of Data Engineers involve building out data systems to solve new project challenges, improving and maintaining existing architectures, integrating systems with new/better tools, and syncing with team members to ensure quality work and product flow.

Industry roles in Data Science, Data Engineering, and Artificial Intelligence typically have different objectives. While each role can benefit from all the skills above, some roles emphasize some skills more than others. And at the heart of every role is the availability of data and an emphasis on being data driven.

Overlap

Distinguishing between specific instances of the roles is often not clear cut. Many Data Science roles often need to know modern Data Engineering tools to get the data they need, while more and more Data Engineering roles are performing significant analyses and incorporating machine learning in their pipelines. There is also a significant overlap between the work AI professionals do and that of Data Scientists and Engineers. The core ideas and knowledge that drive the analyses of Data Scientists underpin the skills needed to build AI models. These models typically require very large datasets, so while efficient manipulation and use of large amounts of data is a fundamental aspect of Data Engineering work, it is crucial for state-of-the-art AI systems.

In our view, the fundamental difference between AI and Data Science/Engineering is in the nature of AI’s primary goal: to build intelligent systems that generate their own features and knowledge of a domain, and deliver performance on tasks which is near, at, or above human expert level. This aim naturally requires a different and/or additional set of skills, focused on models and techniques which marry the cutting edge of AI research and practice.

(This post was originally hosted on Medium)

How AI Careers Fit into the Data Landscape

From Cognitive Science to Data Science

by Rose Hendricks (originally found here)

While finishing his dissertation, Jeremy became an Insight Data Science Fellow, participating in an intensive post-doctoral program to prepare academics for careers in data science. Because he was such an all-star during the program, Jeremy is now a Program Director and Data Scientist for Insight Data Science. In this podcast, I talk to him about his experiences at Insight Data Science. He shares some of the features of his PhD training that have helped him in his data science quest and other skills and modes of thinking he’s had to develop since beginning to work in industry.

Enjoy!

Podcast available here (transcript below)

— — — — –

Rose: Hello! And welcome to UCSD Cog Sci’s very first podcast. I’m Rose Hendricks, and I’m here today with Jeremy Karnowski, who is finishing up his PhD in our department, and is here to talk to us about some of the things he’s been doing in the recent past with Insight Data Fellows, and the path he’s taken from PhD student into the working world. Jeremy, thanks so much for joining us!

Jeremy: Thanks for having me.

Rose: First, I’m hoping you can tell us: You completed a program called Insight Data Fellowship. The one sentence I got about that from their website is that it’s an intensive, seven-week post-doctoral training fellowship that bridges the gap between academia and a career in data science. Can you explain to us a little bit about that?

Jeremy: Yeah. As you mentioned it’s a seven-week program. People that are finishing up their PhDs or post-docs and have been doing a lot of quantitative work in physics, or bio-statistics, or computational social sciences, it’s a way for them to make that last little leap into industry. The idea is they’ve already being doing data science in academia, but they’re trying to find roles doing the same thing for companies, either in the Bay area, New York, or Boston.

Rose: Cool. I feel like “data science” is one of those phrases we all toss around, and of course we’re all doing science of some form and dealing with data of some form, but what do people really mean when they talk about data science?

Jeremy: Data science could be a couple different forms. This is some of the problem with people that are coming from academia and trying to transition into industry because the field is so broad that data science could mean many different things. Especially, say, in the Bay area. You could have things that are more from a business intelligence standpoint, or you could have people that do analytics where they’re trying to understand some of the insights that are in data at a company or doing some data mining, some people focus on machine learning, some people really focus around building data products, where you’re making some product for consumers or someone inside of a business, but does a lot of data in the back end that’s being useful for that. One really simple example would be “people you might know” on LinkedIn — there’s a lot of interesting graph relationships that are going on, it’s very data-driven, but then there’s a product on the front end that people can just use. They come to it, they find some way to connect with someone, and it’s something that’s real, but there’s data in the back end.

Rose: Sure. So if you project yourself back one year, you were in San Diego, working on your PhD. Maybe it wasn’t just one year ago, but what got you interested in data science in the first place? What was your path to finding Insight Data Fellowship?

Jeremy: I was in one lab in the cognitive science department, and it was very computational. And I switched and I was still doing something computational, but I was shifting my focus. I joined a lab that really had a large amount of audio and video data that no one was diving into. At that time, I was getting the sense that trends were going toward large data and machine learning, lots of different ways of dealing with massive amounts of data. I was like, well, this is probably going to be not only great for studying something in the department, but also building up skills for entering a different sort of work force. I would say — remind me again, what was the second part?

Rose: Just thinking about your transition, or, it seems like your back and forth with one foot in academia. How did you start? Certainly you needed new skills, I’m guessing.

Jeremy: You’d be surprised! Just — a lot of people that come out of PhDs or post-docs that go into Insight Data Science, they have already been doing data science, usually large-scale data analysis, in their PhD, so that sort of fits the bill. Often times they might not be using the exact toolkit that is in industry. Some people that come from physics are using a variant of C++ that does different things and a lot of physics packages are built into that. A lot of people, as you know, in neuroscience and computational social science use Matlab, so that’s not really industry standard, so making sure you’re up to speed with Python or R, and using the toolkits in those packages, is always a big plus. And I think other things that I jumped on board with… I really wasn’t clear about data science when I started my journey. I was thinking that I should probably go into software engineering or something, so it was really unclear. And those interviews were very different, and I was learning a lot about algorithms and data structures and doing coding problems. I went to a couple different interviews and it just didn’t seem right. It actually was really fortuitous because I talked with a friend. It was basically a friend of a friend. I talked with him and he had done a math PhD and looked into software engineering jobs, and then also had explored the data science space. And he was chatting with me about the role I was looking for and what I wanted to do in industry, and he was like, you should definitely check out data science, that’s where it’s at. And immediately as I started looking at those jobs, those were the sort of businesses that called me back and were interested because that’s the skill-set you have when you’re doing quantitative social science.

Rose: That leads into my next question, which is about some of the skills you developed during your PhD. Maybe not even tangible ones, maybe soft skills, that have helped you make this transition now into data science.

Jeremy: So I think, one of the things that’s very different from industry in academia is the time scale of things in academia could be months or years, and it’s really about perfecting something in a very small niche. And you’re spending a lot of effort to get there. And in industry, the timeline’s very different. Everyone’s working on several-week timelines to push something out. Or maybe you need this analysis in the next few days to make something happen. It doesn’t have to be 100% correct. Often times you really need to get 80 or 90 percent of the way there really quickly just so you can get a sense of how do you move a business in one way or another. That’s a very different skill than how academics do things. I think another thing that’s really important is trying to speak to the consumers or anyone using the product or different people in the organization. Academics are very used to talking with other academics. There’s lots of lectures and lots of talks and everything’s at a high level. It’s really important to be able to speak about really complicated topics at a high level and explain them to different parts of the company. I always found the cognitive science department really good for that because we have a lot of interesting and very in-depth research, say, neuroscience or psychology, or more computer science labs, and they all have to explain their research to each other, and having that skill is very important. And thirdly, I think another important thing is a lot of the data in data science organizations, they are fundamentally about people. There are people using the products. There are people interacting in the businesses. And a lot of the things you want to capture about how your product is being used is about human behavior. I think that is something that’s also a very different skill to learn because even though you’re doing the same sort of analysis, like say you might be doing something in bioinformatics or physics, you start thinking about the data in a different way.

Rose: That’s really interesting. It sounds like you’re saying maybe there are some ways of thinking that are valued in academia, but aren’t in the same way in industry, and at the same time, so many of those skills you cultivated over the course of your PhD are still really meaningful. Is that sort of along the lines…?

Jeremy: Yeah. There are definitely differences. The kinds of data you deal with could be very instrumental to… Say if you’re doing quantitative social science, or something where you’re studying people. That could be very helpful. If you’re doing things with — Even people who are studying say, for instance, EEG signals: you’re collecting data from lots of different small devices and trying to analyze that signal for some reason, and that’s still very data-science-like. But that data’s very different from the data you’d be collecting in industry. So sometimes you need to change up how you think about the data, sometimes you don’t. Thinking about the data might lend itself in different ways to what you might do down the line. I think the skills that are always really important for doing things in PhDs — You learn really quickly you hit your head against problems that are really frustrating for a long amount of time. You’re coming up with the right kinds of questions to ask, you’re testing it, you’re really driving home on things week after week. I think that is something that’s really hard to get if you’re trying to dive into data science and you haven’t had the experience of doing something like this for many years. So that’s a general PhD-level skill that I think is very transferrable. A lot of the very academic things, staying really in the details or taking a really long time to explain something or using a lot of jargon doesn’t work very well when you’re talking with someone, say, from the marketing department. Or maybe you’re doing some data science for marketing purposes and you have to explain to whole teams why what you’re doing matters and how it’s going to change the business. You can’t just use technical terms all the time.

Rose: So you did this seven-week program with Insight Data Science and you’re still at that company, is that correct?

Jeremy: Yeah.

Rose: So can you tell us a bit about what you do now? Maybe at both the high level and the more detailed aspect?

Jeremy: Yeah, sure. So at Insight, after the fellows go through the Insight Data Fellows program, they get call-backs from different companies about places they might want to be placed. And we work really hard to make sure every fellow is getting a job, so we’re with them until the end. And I think I had a lot of call-backs from different places, but at the same time I had sort of had a really great experience with them. And they invited me onto the team. So this was not standard, but it very much fit in line with my career goals. A lot of the things we do at Insight as program directors and data scientists is what you would expect from someone who’s doing a more senior data science role or a head of data science role. So that was really appealing to me. In my role, there are a couple different things. There’s work that’s going on on the back side that’s more about the data that we have and doing more technical work, but really a lot of my job is working with the fellows who come through the program, providing technical guidance, helping them think through their problems. So it’s a mixture of making sure they can get their projects done on time, talking with companies in the Bay area, and also helping provide — Making sure that no one is blocked on anything, that fellows can move forward in their ambitions and projects.

Rose: Wow, so you’re almost paying it forward and getting paid to do so, it sounds like.

Jeremy: Yes, it’s a great job. I think, I like the idea of being in academia, I like the idea of being in industry. I get to be a little bit of both. I get to be in data science and help people push their careers forward as well.

Rose: That’s cool. So I’m wondering now, I asked you earlier to project yourself backward one year, but if you go back even a few more, to maybe when you were like in your second, third, fourth year at UCSD, are there any things you wish you could go back and tell yourself?

Jeremy: Yeah! I think one thing that I would imagine is really trying to understand the landscape of different tools and technologies to tackle a problem. It’s very easy to start from scratch and have an adviser or other grad students tell you these are the ways to do these different things, but then really trying to sample all the stuff that’s out there to understand, if I get this sort of problem, what are all the tools that I could bring to bear to tackle that problem? I don’t know if everyone does that enough. I think another thing that I would suggest, I really wish I would have taken this data mining course that was in the computer science department. At that point I didn’t have to take any more classes and I think that it would have been a really great class to take because that’s really fundamental in a lot of the analytics and things that are going on in the Bay area or in data science in general. I think just taking more courses where you do projects and you’re really trying to get deep into, “What can I do with this data to get to a goal?” I think would be important. Other than things I wish I had done, I actually did get a lot of really great advice. I was in my third year and I was talking with Seana Coulson and Marta Kutas, and I had been transitioning labs. I was going from modeling human decision making and I was switching into modeling multi-agent decision making. So lots of artificial agents making decisions with each other on some sort of task, so distributed artificial intelligence. The advice I got was, this is great, and it’s modeling, and there’s these scenarios that you’re creating, but it would be better if you were able to actually study real-world systems and understand what is actually going on in the real world with systems and agents interacting with each other. And that’s actually how I jumped on the project that did have a large amount of audio and video data because it was all about dolphins interacting with each other and trying to understand their activity. And that was like a real-world system. And I think that was really fundamental in how I started shifting from one career to the next, because it made it much more relevant. And I think if people are in the clouds too much, trying to focus in on real phenomena and understanding them and explaining them is a really important thing to learn.

Rose: I have one more question for you before we finish up because I’ve asked you to project yourself back a few times. So now, naturally, I’d like to go the other way. I’m curious, what are some of the things on your mind for the future? Whether it’s short term, you can tell me what you’re going to do this weekend, or longer term, like things you’re excited about, either in your own life or the whole world. Tell me everything.

Jeremy: I have been really excited about the trends of development. Everyone’s releasing open toolkits for deep learning or artificial intelligence. That’s definitely something I’ve been exploring and trying to get more of a grasp on. Companies have a very large amount of data, and so they’re comfortable with releasing the tools to deal with that because the data is the gold that they’re using. So I’ve been really interested in exploring that space. Another goal I had being out here in the Bay area is I really wanted to see how companies run, see how companies start and form, so that’s interesting as well. And also, getting to the point where trying to lead a team of data scientists at a company and move a business forward. One thing that always surprised me at Insight is that, this was sort of my five-year goal. And I would meet a lot of alumni that would do Insight Data Science, and they were like, “Oh, I did Insight two years ago, and now I’m the head of this data science team, or I lead the data science team at this company.” And I was like, that’s two years! I was expecting it to be five years. So I think anything I say is probably going to happen much quicker than I expect. That’s just how industry works compared to academia. Things are moving so quickly and I don’t even quite know what’s going to happen in the next year or two.

Rose: Well, that’s exciting!

Jeremy: I enjoy it. I try to maximize for the largest number of possible options in the cool and interesting areas, and just keeping doing that, that way everything’s on your plate and open to you.

Rose: Is there anything else that you were hoping to share that I haven’t yet asked you about today?

Jeremy: I would say other than, we’ve been talking a little bit about Insight Data Science in Silicon Valley over in the Bay area, but we also have lots of programs in New York, Boston, there’s a remote program. We also have a data engineering program in the Bay area, and New York. And we’ve had a health data science program in Boston and our first health data science program in Silicon Valley is going to start September.

Rose: Wow, so it’s really exploding.

Jeremy: Yeah, it’s pretty great. We have a lot of great companies that we partner with. And there’s lots of very exciting domains that are branching out. It’s a very exciting time.

Rose: So Jeremy, if people want to find you on the internet, do you have a twitter handle we can share?

Jeremy: I do! It’s @mwakanosya, which sounds really strange. It’s M-W-A-K-A-N-O-S-Y-A. And there’s a whole other story to that! Someday I can tell you if they want to hear it.

Rose: Thanks so much for chatting with me. And I’m sure this will be a pleasure for all the listeners.

Jeremy: Yeah, definitely connect with me on Twitter, I’m happy to chat on LinkedIn. I’d love to chat more and help people out in any way I can.

Rose: Thanks Jeremy!

Jeremy: Thanks very much!

From Cognitive Science to Data Science

Inputting Image Data into TensorFlow for Unsupervised Deep Learning

Everyone is looking towards TensorFlow to begin their deep learning journey. One issue that arises for aspiring deep learners is that it is unclear how to use their own datasets. Tutorials go into great detail about network topology and training (rightly so), but most tutorials typically begin with and never stop using the MNIST dataset. Even new models people create with TensorFlow, like this Variational Autoencoder, remain fixated on MNIST. While MNIST is interesting, people new to the field already have their sights set on more interesting problems with more exciting data (e.g. Learning Clothing Styles).

In order to help people more rapidly leverage their own data and the wealth of unsupervised models that are being created with TensorFlow, I developed a solution that (1) translates image datasets into a file structured similarly to the MNIST datasets (github repo) and (2) loads these datasets for use in new models.

To solve the first part, I modified existing solutions that demonstrate how to decode the MNIST binary file into a csv file and allowed for the additional possibility of saving the data as images in a directory (also worked well for testing the decoding and encoding process).

I then reversed the process, making sure to pay attention to how these files were originally constructed (here, at the end) and encoding the information as big endian.

The TensorFlow tutorials allow you to import the MNIST data with a simple function call. I modified the existing input_data function to support the loading of training and testing data that have been created using the above procedure: input_any_data_unsupervised. When using this loading function with previously constructed models, remember that it does not return labels and those lines should be modified (e.g. the call to next_batch in line 5 of this model).

A system for supervised learning would require another encoding function for the labels and a modified input function that uses the gzipped labels.

I hope this can help bridge the gap between starting out with TensorFlow tutorials with MNIST and diving into your own problems with new datasets. Keep deeply learning!

Inputting Image Data into TensorFlow for Unsupervised Deep Learning

Visualizing deaf-friendly businesses

In order to prepare for the Insight Data Science program, I have been spending some time on acquiring/cleaning data, learning to use a database (MySQL) to store that data, and trying to find patterns. It is uncommon in academia to search for patterns in data in order to improve a company’s business, so I thought I should get some practice putting myself in that mindset. I thought an interesting idea would be to visualize the rated organizations from deaffriendly.com on a map of the U.S. to identify patterns and provide some insights for the Deaf community.

This could be useful for a variety of reasons:

  • We could get a sense of where in the U.S. the website is being used.
  • We could identify cities that receive low ratings, either because businesses are unaware of how to improve or because the residents of that city have different rating thresholds. This could help improve the ability to calibrate reviews across the country.
  • We could identify regions in cities that do not receive high reviews to target those areas for outreach.
  • Further work to provide a visual version of the website could allow users to find businesses on the map in order to initiate the review process.

In the above image, I plotted reviews from deaffriendly.com and highlighted some interesting patterns. While qualitatively these statements seem true, the next step would be to do a more in depth study. Also, a future version of this map could look similar to Yelp’s Wordmap or the Health Facility Map which uses TZ Open Data Portal and OpenStreetMap.

Why was this of interest to me?

As a PhD student at UCSD, I am friends with many people who are in the Center for Research in Language and work with Carol Padden studying sign language. I participated as a Fellow in the recent CARTA Symposium on How Language Evolves and was paired with David Perlmutter (PhD advisor to Carol Padden) who presented on sign language. While I have not studied sign language in my research, the Deaf community is one that interests me and I thought I would help out if I could.

In June of this year, I was the chair and organizer for the inter-Science of Learning Conference, an academic conference that brings together graduate students and postdoctoral fellows from the six NSF-Sponsored Science of Learning Centers. One of these centers is VL2 which is associated with Gallaudet University. As part of the conference, I organized interpreter services and used CLIP Interpreting as they were highly recommended by many groups (and VL2 students said they were the best interpreters they had ever had). At the end of the conference CLIP Interpreting told the VL2 students and the iSLC organizers about deaffriendly.com and encouraged us to contribute to the website. This was my chance to pay it forward. I highly recommend using deaffriendly.com and helping them expand their impact.

Visualizing deaf-friendly businesses

Find your Dream Job!

A few months ago Andrej Karpathy wrote an excellent introductory article on recurrent neural networksThe Unreasonable Effectiveness of Recurrent Neural Networks. With this article, he released some code (and larger version) that allows someone to train character-level language models. While RNNs have been around for a long time (Jeff Elman from UCSD Cognitive Science did pioneering work in this field), the current trend is implementing with deep learning techniques organizationally different networks that attain higher performance (Long Short-term memory networks). Andrej demonstrated the model’s ability to learn the writing styles of Paul Graham and Shakespeare. He also demonstrated that this model could learn the structure of documents, allowing the model to learn and then produce Wikipedia articles, LaTeX documents, and Linux Source code.

Others used this tutorial to produce some pretty cool projects, modeling audio and music sequences (Eminem lyricsObama SpeechesIrish Folk Music, and music in ABC notation) as well as learning and producing text that resembles biblical texts (RNN Bible and Learning Holiness).

Tom Brewe’s project to learn and generate cooking recipes, along with Karpathy’s demonstration that the network can learn basic document syntax, inspired me to do the same with job postings. Once we’ve learned a model, we can see what dream jobs come out of its internal workings.

To do this, I performed the following:

  1. Obtain training data from indeed.com:
  • Create a function that takes city, state, and job title and provides indeed.com results
  • Gather the job posting results, scrape the html from each, clean up html
  • Save each simplified html file to disk
  • Gather all the simplified html files and compile one text file

2. Use recurrent neural network to learn the structure of the job postings

3. Use the learned network to generate imaginary job postings

Obtaining Training Data

In order to obtain my training data, I scraped job postings from several major U.S. cities from the popular indeed.com (San Francisco Bay Area, Seattle, New York, and Chicago). The code used to scrape the website came from this great tutorial by Jesse Steinweg-Woods. My modified code, available here, explicitly checked if a website was located on indeed.com (and not another website as the job posting structure was different) and stripped the website down to a bare bones structure. Having this more specific structure I thought would help reduce the training time for the recurrent neural network. Putting these 1001 jobs into one text document gives us a 4.2MB text file, or about 4 million characters.

Training the Recurrent Neural Network

Training the RNN was pretty straight forward. I used Karpathy’s code and the text document generated from all the job postings. I set up the network in the same manner as the network Karpathy outlined for the writings of Shakespeare:

th train.lua -data_dir data/indeed/ -rnn_size 512 -num_layers 3 -dropout 0.5

I trained this network over night on my machine that has a Titan Z GPU (here is more info on acquiring a GPU for academic use).

Imaginary Job Postings

The training procedure produces a set of files that represent checkpoints in training. Let’s take a look at the loss over training:

It looks like the model achieved pretty good results around epoch 19. After this, the performance got worse but then came back down again. Let’s use the checkpoint that had the lowest validation loss (epoch 19) and the last checkpoint (epoch 50) to produce samples from the model. These samples will demonstrate some of the relationships that the model has learned. While none of these jobs actually exist, the model produces valid html code that represents imaginary dream job postings.

Below is one of the jobs that was produced when sampling from the saved model at epoch 19. It’s for a job at Manager Persons Inc. and it’s located in San Francisco, CA. It looks like there is a need for the applicant to be “pizza friendly” and the job requires purchasing and data entry. Not too shabby. Here it is as a web page.

At epoch 50, the model has learned a few more things and the job postings are typically much longer. Here is a job for Facetionteal Agency (as a website). As you can see, more training can be done to improve the language model (“Traininging calls”) but it does a pretty good job of looking like a job posting. Some items are fun to note, like that the job requires an education of Mountain View, CA.

Below is another longer one (and as a website). Turns out the model wants to provide jobs that pay $1.50 an hour. The person needs to be a team player.

Conclusion

This was a pretty fun experiment! We could keep going with this as well. There are several knobs to turn to get different performance and to see what kind of results this model could produce. I encourage you to grab an interesting dataset and see what kind of fun things you can do with recurrent neural networks!

Other RNN links:

Find your Dream Job!

Robust Principal Component Analysis via ADMM in Python

Principal Component Analysis (PCA) is an effective tool for dimensionality reduction, transforming high dimensional data into a representation that has fewer dimensions (although these dimensions are not from the original set of dimensions). This new set of dimensions captures the variation within the high dimensional dataset. How do you find this space? Well, PCA is equivalent to determining the breakdown M = L + E, where L is a matrix that has a small number of linearly independent vectors (our dimensions) and E is a matrix of errors (corruption in the data). The matrix of errors, E, has been minimized. One assumption in this optimization problem, though, is that our corruption, E, is characterized by Gaussian noise [1].

Sparse but large errors affect the recovered low-dimensional space.
From:

Introduction to RPCA

Robust PCA [2] is a way to deal with this problem when the corruption may be arbitrarily large, but the errors are sparse. The idea is to find the breakdown M = L + S + E, where we now have S, a matrix of sparse errors, in addition to L and E. This has been shown to be an effective way for extracting the background of images (the static portion that has a lower dimensionality) from the foreground (the sparse errors). I’ve used this in my own work to extract foreground dolphins from a pool background (I used the ALM method which only provides L and S).

Robust PCA can be solved exactly as a convex optimization problem, but the computational constraints associated with high dimensional data make exact solutions impractical. Instead, there exist fast approximation algorithms. These techniques include the inexact augmented Lagrange multiplier (ALM) method [1] and the alternating direction method of multipliers (ADMM) method [3].

For the most part, these approximation algorithms exist in MATLAB. There have been a few translations of these algorithms into Python. Shriphani Palakodety (code) and Deep Ganguli (code) both translated the Robust Principal Component Pursuit algorithm, Nick Birnie (code) translated the ALM method, and Kyle Kastner (code) translated the Inexact ALM method. There also exists Python bindings for an RPCA implementation in a linear algebra and optimization library called Elemental.

Since the ADMM method is supposed to be faster than the ALM method (here on slide 47), I thought it would be a good idea to translate this code to a working Python version. My translation, Robust Principal Component Analysis via ADMM in Python, implements the MATLAB code found here (along with [a] and [b]). In addition to porting this code to Python, I altered the update equations to use multiple threads to speed up processing.

References

  1. Lin, Chen, Ma (2010). The augmented lagrange multiplier method for exact recovery of corrupted low-rank matrices.
  2. Candès, Li , Ma, and Wright (2011) Robust Principal Component Analysis?
  3. Boyd (2014) ADMM
Robust Principal Component Analysis via ADMM in Python

Low-cost Raspberry Pi robot with computer vision

The ever decreasing costs of hardware and the rise of Maker culture is allowing hobbyists to take advantage of state of the art tools in robotics and computer vision for a fraction of the price. During my informal public talk in San Diego’s Pint of Science event “Machines: Train or be Trained” I talked about this trend and got to show off the results of a side project I had been working on. My aim in the project was to create a robot that was capable of acting autonomously, had computer vision capabilities, and was affordable for researchers and hobbyists.

When I was an undergrad at IU in the Computational Cognitive Neuroscience Laboratory the trend was using Khepera robots for research in Cognitive Science and Robotics. These robots run close to $2800 today. Years later I was fortunate to help teach some high school robotics courses (Andrew’s Leap and SAMS) with David Touretzky (here are videos of course projects) and got to see first-hand the great work that was being done to turn high level cognitive robotics into a more affordable option. In the past few years, I’ve been helping to develop the introductory programming and robotics course (Hands-on Computing: SP13SP14, FA15, SP15) here in the UCSD Cognitive Science department and have really enjoyed using theflexible platform and materials from Parallax (about the course).

For awhile now, my advisor and I wanted to set up a multi-agent system with robots capable of using computer vision. While there exist some camera solutions for Arduino, the setup was not ideal for our aims. My friends had recently used the Raspberry Pi to create an offline version of Khan Academy and it seemed likely that the Raspberry Pi was up to the task.

Parts

I borrowed the chassis of the BOE Bot (includes wheels) and compiled this list of materials (totaling around $250 with the option of going cheaper, especially if you design your own chassis):

Set-up

While I had some issues with setting up wifi (UCSD has a protected network) and configuring an ad-hoc network, I don’t think it’s impossible to do. This was the procedure I followed to get the robot set up:

  1. Install Raspbian on Raspberry Pi: link (and directions for installation)
  2. Configure the Raspberry Pi: link (make sure to enable camera support)
  3. Update the OS: sudo apt-get update && sudo apt-get upgrade
  4. Install necessary software on Raspberry Pi: sudo apt-get install python python-numpy python-scipy python-matplotlib ipython python-opencv openssh-server
  5. Install python packages for RPIO (link)
  6. Setup Raspberry Pi to work with camera: link1 link2
  7. Setup Raspberry Pi to work with wifi: link

Wiring

The battery that powers the Raspberry Pi does not have enough power to run the Raspberry Pi and the servos at the same time. I used the battery pack from the BOE Bot and connected two wires to the servos — one at the point in the battery pack where the power starts and one where it ends, in order to use the batteries in a series. Much of the wiring is based on the diagram found here. The pin numbers for the Raspberry Pi can be found here (also shows how to blink an LED). Here is an updated diagram (while the diagram shows 2 batteries, there were actually 5):

Python

Learning python is awesome and will help with any projects after this one:

Controlling Servos

The control of servos is based on code found here. Use the following to center the servos (with the help of a screwdriver):

Using the Camera

There is excellent documentation for using the picamera module for Python:

Drawing a Circle

The easiest way to draw a circle on an image involves using cv2, the second version of opencv (code modified from here).

Demo

And finally, below is a demo to show off the proof of concept. This awesome (!) article shows how to use the Raspberry Pi Camera with OpenCV and Python (I found the ‘orangest’ object in the frame and had the robot turn towards it) and the above shows how to create circles on the images for display. I don’t recommend using the computer to view the output as this drastically slows down processing. It’s nice for a demo though! I hope you enjoyed this and found this useful!

Low-cost Raspberry Pi robot with computer vision

Cognitive Science to Data Science

I joined the UCSD Cognitive Science PhD program with the aim to investigate multi-agent systems. A few years in I joined a project to investigate the interactions of bottlenose dolphins. The research group had a massive amount of audio and video recordings that was too big to handle without computational techniques. I joined the group to provide the computational support that they needed. During this process, I discovered that working with big data is motivating in its own right and that I wanted to pursue the data scientist path in lieu of academia.

I don’t see this choice as abandoning the traditional academic path (PhDs and Postdocs who leave academia traditionally harbor feelings of regret and worry about being failures). The number of open positions available to PhDs and Postdocs is slim to compared to the number of applicants:

Only 0.45% of STEM graduates in the UK will become professors. [1]

“Across all scientific fields, NSF data suggest that only about 23 percent of Ph.D.s land tenure or tenure-track positions at academic institutions within three to five years of finishing grad school.” [2]

This isn’t the only reason though. While academia has historically tackled interesting and challenging data problems, some of the most important discoveries and insights can now only be tackled by companies that have invested billions of dollars to accumulate the necessary data. I can think of no better place to be than being on the forefront of these endeavors.

These past few years have been filled with insights. I’ve been using data to investigate the lives of a very social mammal species, the bottlenose dolphin. I’m now setting my sights on humans, to find insights that can help us understand our own social world and help guide our individual (and corporate) decisions.

Learning to be a Data Scientist

Early on, I applied to software engineering jobs and even reached the last stage of the interview process at Google (prep material here). After a few interviews with other companies I realized that being a software engineer was not the optimal choice for my background or in line with my interests. I connected with a friend of a friend who was a data science practitioner to learn more about the role and the process. He had a lot of great advice and I recommend reading the article. Since then I have been going through the interview process for several data science positions and have had some successes. Recently, however, I put my job search on hold so that I could attend the Insight Data Science program as a Fellow for the 2015 Fall Silicon Valley session. Adventure awaits!

During this transition phase, I’ve tried to amass a large amount of relevant material for graduate students (particularly my friends in the department) who might want to pursue non-academic routes. While there are a growing number of data science programs across the globe, it is possible to pick up the skills while pursuing other STEM degrees. Most of these items are on my Twitter feed, but here are the highlights:

In addition to the large datasets that you might encounter during your PhD (for example: Neuroscience Data by Ben Cipollini), there are plenty of free large datasets available to those interested:

Data Science Courses at UCSD

The Data Science Student Society at UCSD has put together a great list of courses available at the undergraduate level. Below is a listing of the graduate courses at UCSD that are relevant to Data Science (as of August 2015). I included courses focused on audio and video analysis as they also teach the skills data scientists need to tackle large amounts of noisy data.

As graduate students, you sometimes have the option of taking a free course through UCSD Extension. UCSD Extension offers a Data Mining Certificate from which you can take some of their courses. The Computer Science & Engineering Department and San Diego Super Computer Center now offer a Data Science & Engineering Masters degree.

If you feel I have missed a course, feel free to e-mail me and I’ll add it to the list.

UCSD Courses I took that were relevant to Data Science:

  • CSE 250A. Artificial Intelligence: Search & Reason
  • COGS 202. Foundations: Computational Modeling of Cognition
  • COGS 225. Visual Computing
  • COGS 260. Seminar on Special Topics (Sometimes on AI)
  • COGS 200. Cognitive Science Seminar (I took Cognition under Uncertainty)
  • COGS 220. Information Visualization
  • ECE 272A. Stochastic Processes in Dynamic Systems (Dynamical Systems Under Uncertainty)
  • MATH 285. Stochastic Processes
  • MATH 280A. Probability Theory
  • PSYC 232. Probabilistic Models of Cognition

Other UCSD courses I have not taken but are relevant to Data Science:

  • MATH 280BC. Probability Theory
  • MATH 281ABC. Mathematical Statistics
  • MATH 282AB. Applied Statistics
  • MATH 287A. Time Series Analysis
  • MATH 287B. Multivariate Analysis
  • MATH 287C. Advanced Time Series Analysis
  • MATH 289A. Topics in Probability and Statistics
  • MATH 289B. Further Topics in Probability and Statistics
  • MATH 289C. Data Analysis and Inference
  • PSYC 201ABC. Quantitative Methods
  • PSYC 206. Mathematical Modeling
  • PSYC 231. Data Analysis in Matlab
  • CSE 250B. Principles of Artificial Intelligence: Learning Algorithms
  • CSE 250C. Machine Learning Theory
  • CSE 252AB. Computer Vision
  • CSE 253. Neural Networks/Pattern Recognition
  • CSE 255. Data Mining and Predictive Analytics
  • CSE 256. Statistical Natural Learning Processing
  • CSE 258A. Cognitive Modeling
  • CSE 259. Seminar in Artificial Intelligence
  • CSE 259C. Topics/Seminar in Machine Learning
  • COGS 219. Programming for Behavioral Sciences
  • COGS 230. Topics in Human-Computer Interaction
  • COGS 243. Statistical Inference and Data Analysis
  • ECE 250. Random Processes
  • ECE 251AB. Digital Signal Processing
  • ECE 252B. Speech Recognition
  • ECE 253. Fundamentals of Digital Image Processing
  • ECE 271AB. Statistical Learning

References

  1. Taylor, M., Martin, B., & Wilsdon, J. (2010). The scientific century: securing our future prosperity. The Royal Society.
  2. Schillebeeckx, M., Maricque, B., & Lewis, C. (2013). The missing piece to changing the university culture. Nature biotechnology31(10), 938–941.
Cognitive Science to Data Science

Detection Error Tradeoff (DET) curves

In July 2015, I attended DCLDE 2015 (Detection, Classification, Localization, and Density Estimation), a week-long workshop focusing on methods to improve the state of the art in bioacoustics for marine mammal research.

While I was there, I had a conversation with Tyler Helble about efforts to detect and classify blue whale and fin whale calls recorded off the coast of Southern California. While most researchers use Receiver Operating Characteristic (ROC) curves or Precision Recall (PR) curves to display classifier performance, one metric we discussed was Detection Error Tradeoff (DET) curves [1]. This might be a good metric when you are doing a binary classification problem with two species and you care how it is incorrectly classifying both species. This metric has been used several times in speech processing studies and has been used in the past to look at classification results for marine bioacoustics [2].

I typically program in Python and use the scikit-learn package for machine learning problems. They have an extensive listing of classification metrics, but I noticed the absence of DET curves. I had never created a pull request for a well known python package before, but I thought I would give it a try: DET curve pull request (as of writing this, there still remains some work to be done on the documentation). For those of you who are interested in doing something similar, here is how to contribute to scikit-learn.

The detection_error_tradeoff function, which takes in a list of prediction values and a list of truth values, produces an output containing the false positive rate (FPR) and false negative rate (FNR) for all threshold values. The DET curve, the line showing the tradeoff between FPR and FNR, is typically viewed in a log-log plot. While Python can easily alter its axes, the default graph does not display the typical tick values as shown in standard speech processing DET curves: 0.1, 0.2, 0.5, 1, 2, 5, 10, 20, 50. In order to create a plot like this, I created the function DETCurve below. An obvious improvement would be for the function to automatically determine the lower bounds for the ticks and adjust accordingly. The alterations to the axes are necessary to ensure matplotlib does not try to plot zero on the log plot (which would set it to infinity and cause issues).

Whereas I had to adjust a lot of things manually in matplotlib, the fancier looking Plotly automatically uses the tick marks associated with plots of this kind:

References

  1. Martin, Doddington, Kamm, Ordowski, Przybocki (1997) The DET Curve in Assessment of Detection Task Performance. Available: http://www.itl.nist.gov/iad/mig/publications/storage_paper/det.pdf
  2. Potter, Mellinger, Clark (1994) Marine mammal call discrimination using artificial neural networks. Available: ftp://ftp.pmel.noaa.gov/newport/mellinger/papers/PotterEtAl94-BowheadCallNeuralNet.pd
Detection Error Tradeoff (DET) curves

Batch text file conversion with Python

Attending conferences and presenting research is a frequent event in the life of an academic. Conference organizing committees that plan these events have a lot on their plate. Even small conferences, such as the one I organized in 2015 (iSLC 2015), can be very demanding.

One thing that conference organizers have to consider is how to implement an article and/or abstract submission process that allows attendees, reviewers, and organizers to fluidly access and distribute these documents. Some of these services are free while others are a paid service. Some services provide better and a more adaptive pipeline for this process.

An important feature of these abstract submission sites is allowing the tagging of abstracts so that organizers can appropriately distribute the content to the best reviewers.

I was approached awhile back because some conference organizers were using an abstract submission site that did not have this feature, so how to distribute the submissions was an open question. Furthermore, the submission website had a suboptimal interface that forced the organizers to download each individual abstract separately rather than as a whole. As a final annoyance to the organizers, the submission process was one such that researchers could submit their work in a variety of formats, including .doc, .docx, .odt, and .pdf files and the conference organizers did not have a way to automatically analyze each of these file types.

To tackle these issues, we settled on the following procedure:

  1. Automatically authenticate with website
  2. Scrape the conference abstracts from the conference website, downloading all attachments
  3. Convert each document into plain text using a variety of packages and combine all text documents into a large listing of all abstracts
  4. Use the combined abstract file to extract individual submissions and use text mining packages to categorize the abstracts
  5. Distribute the abstracts to the appropriate reviewers

Here is the code I wrote to perform steps 1–3. The conference organizers did the text mining and distribution. After the automatic extraction, there were still a tiny number of abstracts that were not converted properly, so this was done by hand. In the end, this saved a massive amount of time and allowed the conference preparation to proceed in an efficient manner.

Improvements on this could include creating more modular code, making the authentication process more secure, and creating a function that accepts a file and returns the text from that document. I hope some of this code may be useful in your future tasks!

Batch text file conversion with Python

AlexNet Visualization

I’ve been diving into deep learning methods during the course of my PhD, which focuses on analyzing audio and video data to uncover patterns relevant to the dolphin communication. I obtained a NVIDIA Titan Z through an academic hardware grant and installed Caffe to run jobs on the GPU using Python.

As a first step, I have been utilizing Caffe’s implementation of AlexNet (original paper) to tackle dolphin detection in video using R-CNN (by Ross B. Girshick) and classifying whale calls in audio (work presented at DCLDE 2015).

AlexNet + SVM (layer details and inspiration for configuration)

For the conference presentation and eventually for my dissertation defense, I wanted to make use of a visualization of AlexNet. I was unable to find a satisfying visualization other than the original:

AlexNet from ImageNet 2012 (Implemented on 2 GPUs)

Another visualization of AlexNet is the graphical view (below), which also provides the difference between the original AlexNet and Caffe’s implementation (CaffeNet):

What I was really looking for was a visualization of AlexNet similar to the ones that exist for LeNet:

Here is my current visualization of AlexNet + SVM, a configuration I have been using for my specific classification tasks. I hope this can be useful for other researchers (give me a shout out someday) and I hope to update the image if anyone has helpful comments. Enjoy!

If you use this image in an academic context, please cite it. Thanks!

@MISC{karnowski:alexnet,
author = {Karnowski, Jeremy},
title = {AlexNet + SVM},
year = {2015},
note = {Online; accessed INSERT DATE},
url = {https://jeremykarnowski.files.wordpress.com/2015/07/alexnet2.png}
}

AlexNet Visualization

Google Software Engineer Interview Preparation

A few months ago I interviewed for a Software Engineering role at Google. I have had several friends ask me how I prepared for the interviews so I thought I would share my preparation in the hopes that it will help them and others. First off, the recruiters will give you documents providing an overview of what’s expected. Read them and get up to speed with all that information. But, be warned — once you start the interview process (in order to get that document), the interviews will come very quickly. With that in mind, it’s also good to prepare early. Below are links to things that helped me prepare:

Books

Interview Questions

Coding Challenges

I also searched a lot to find specifically how Python (or other languages) implements certain data structures and algorithms. I also spent time pretending Python did not have certain data structures or algorithms and programmed them from scratch using object oriented principles (you can Google ‘how to implement X in Python’ to find lots of examples). Here are the basics you should know:

  • Linked Lists — insertions, deletions, etc
  • Hash tables — know how hash tables are implemented in theory (i.e. be able to implement one using arrays) as well as how they are implemented in your language of choice.
  • Trees — binary trees, n-ary trees, trie-trees, BFS, DFS, traversals (inorder, postorder, preorder)
  • Graphs — representations (objects & pointers, matrix, adjacency list), BFS. Extra: Dijkstra, A*
  • Dynamic programming — always seems to come up. Some example problems can be found on sites like CodeEval.
  • Sorting — know how to implement quicksort, mergesort (and variations on them) but also be familiar with other sorting algorithms
  • Big-O — know how to analyze run times of algorithms!

Get a friend to do mock interviews with you. It would be better to do it with friends who are also trying to get jobs so you can push each other. Remember the following:

  • Ask clarifying questions to avoid any misunderstanding. In short, restate the question to confirm that you understand the problem being asked of you to solve.
  • Do not use any pseudocode, only full code.
  • Communicate your thought process while solving the problem. Interviewers want to understand how your mind works when approaching a problem. Always keep talking!

Best of luck! And remember — if you don’t make it the first time, keep reapplying!

Google Software Engineer Interview Preparation

Caffe Installation on Ubuntu 14.04

Below is the installation procedure I used to set up my NVIDIA Titan Z and Caffe. You can request a GPU by filling out an Academic Hardware Grant Request Form.

[EDIT: I’ve updated the site to include information about setting up Caffe on Ubuntu 14.04 for laptop (no GPU), on Ubuntu 14.04 that has a GPU, and on Ubuntu 14.04 Server]

Initial Configurations

  1. I started with a fresh install of Ubuntu 14.04 which installed Third-party software (install with internet connection). (on my laptop I did not start with a fresh system)
  2. Install Titan Z in the tower. It requires a lot of power, so needs the power from the motherboard and 2 8-pin PEG connectors. (clearly not needed for non-GPU system)
  3. Install the python suite (a standard list): sudo apt-get install python-numpy python-scipy python-dev python-pip python-nose

Install Caffe pre-requisites (listed on their site)

  1. Download CUDA 6.5 and install (including adding necessary paths to your .bashrc file) — this is not needed if you are not using a GPU
  2. Install OpenBLAS: sudo apt-get install libopenblas-dev
  3. Install OpenCV 2.4.9
    • fossies took 2.4.9 off their server, but you can use this link: http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.9/opencv-2.4.9.zip/download
    • If you are installing opencv to use with a GPU, during step 5 (before ‘make’), you will run into issues. Use this fix to resolve the issue. Specifically, in /path/to/opencv-2.4.9/modules/gpu/src/nvidia/core, remove the ‘{static}’ characters from NCVPixelOperations.hpp that are identified in the code on the fix site. (Alternatively, you can use the code here, which has already removed those characters. Note: I tried this and it seemed to fail.)
    • On Ubuntu 14.04 Server, I had to fix an issue due to an error during the ‘make’ step (Unsupported gpu architecture ‘compute_11’). I used the following fix: http://stackoverflow.com/questions/28010399/build-opencv-with-cuda-support
    • After the above steps, it was impossible to sign into Ubuntu Server until the video was set to the Titan Z. Once that was done, it was possible to continue.

4. Unzip Boost 1.55 in /usr/local/ (or unzip it elsewhere and move it there)

5. More pre-reqs: sudo apt-get install libprotobuf-dev libleveldb-dev libsnappy-dev libopencv-dev libboost-all-dev libhdf5-serial-dev

6. More pre-reqs: sudo apt-get install libgflags-dev libgoogle-glog-dev liblmdb-dev protobuf-compiler git

Download and Compile Caffe

  1. Download Caffe
  2. sudo pip install -r /path/to/caffe/python/requirements.txt
  3. Compile Caffe
  4. On Ubuntu Server I received an error while loading shared libraries. This command solved the problem: sudo ldconfig /usr/local/cuda/lib64 (for 64-bit Ubuntu)
  5. Add python folder to your .bashrc file (from Caffe’s site)

Additional items

Install other necessary packages: sudo pip install pandas sklearn scikit-image

Caffe Installation on Ubuntu 14.04

Visualizing Tanzanian Educational Performance

Scraping NECTA Exam Scores

Getting GPS Data for TZ Schools

Creating TZ Map in D3

Color Coding School Performance

Project Code

Future Directions

Visualizing Tanzanian Educational Performance