AI Predicts Timeline for EVs to Capture 50% of US Car Sales

Introduction:

As electric vehicles (EVs) become more popular, experts and enthusiasts alike are trying to determine when they will capture a significant portion of the US automotive market. To shed light on this question, researchers at ApplyingAI.com have employed artificial intelligence (AI) to analyze historical data and predict when EVs will make up 50% of US car sales.

Methodology:

The AI model used for this prediction was trained on a dataset that includes historical EV sales data, government policies, technological advancements, and market trends. By analyzing these factors, the AI was able to identify patterns and correlations that influence EV adoption rates and market penetration.

Results:

Based on the AI’s analysis, EVs are predicted to account for 50% of US car sales by 2035. This projection takes into account the current growth rate of EV sales, as well as anticipated improvements in battery technology, charging infrastructure, and vehicle affordability. Additionally, the AI considered the impact of government policies, such as the recent ambitious EU and US programs – Europe’s Fit for 55 package and the US’s Inflation Reduction Act, which include new proposed EPA emissions rules. These policies are expected to drive significant growth in EV sales over the next decade.

Regional differences:

The AI model also identified regional differences in EV adoption rates across the United States. States with more progressive environmental policies and higher incentives for EV adoption are likely to reach the 50% milestone sooner than states with less supportive policies. Furthermore, urban areas with better charging infrastructure and higher population density are predicted to adopt EVs more quickly than rural areas.

Market implications:

The AI’s prediction of EVs capturing 50% of US car sales by 2035 has significant implications for the automotive industry, the oil industry, and the environment. Automakers will need to adapt their production lines and supply chains to meet the increasing demand for EVs. The oil industry will face a decline in demand, as EVs displace internal combustion engine vehicles, potentially reducing the need for at least 5 million barrels of oil per day by 2030, according to the International Energy Agency (IEA). Lastly, the widespread adoption of EVs will contribute to a reduction in greenhouse gas emissions, helping the US meet its climate change goals.

Conclusion:

The AI-powered prediction provides valuable insights into the future of EV adoption in the United States. While the timeline for reaching 50% of car sales is only an estimate, it underscores the importance of continued investment in EV technology, infrastructure, and policy to accelerate the transition to cleaner and more sustainable transportation.

Unveiling the Untold Story of Tesla’s Q1 2023 Earnings Report: A Deeper Dive into Share Price Implications

Tesla’s Q1 2023 earnings report has captured the attention of investors and market enthusiasts alike, showcasing impressive revenue growth and a solid financial position. However, a closer inspection reveals some underlying concerns that might not be as clear on the surface. In this analysis, I will explore the hidden truths that may impact the company’s future success and share price, while offering a unique perspective on the unfolding situation.

Part 1: Financials and Profitability

The Balancing Act of Tesla’s Profitability: At first glance, Tesla’s Q1 2023 report reveals an 11.4% operating margin and $2.7B in GAAP operating income. However, this figure is down YoY, primarily due to reduced average selling prices (ASPs), higher raw material costs, and increased logistics and warranty expenses. As the company continues to expand production and launch new products, these costs may continue to escalate, potentially putting a strain on profitability.

Share Price Implications: A decline in profitability could dampen investor sentiment and lead to downward pressure on Tesla’s share price. As the electric vehicle (EV) market becomes increasingly competitive, Tesla may need to continue cutting prices to maintain its market share. This price war, along with the rising costs of production, could significantly impact the company’s profit margins and, consequently, its stock valuation.

Part 2: Product Development and Challenges

Navigating the Cybertruck Waters: Tesla’s Cybertruck has generated a significant buzz, and its production is set to begin later this year at Gigafactory Texas. However, the unconventional design and features of the Cybertruck may not resonate with traditional truck buyers. The pickup truck market is fiercely competitive, and Tesla’s entrance into this space comes with a considerable risk that may not be fully reflected in their earnings report.

The Odyssey of 4680 Cell Production: Tesla’s 4680 battery cells are crucial for their future success, as they promise increased energy density, reduced cost, and better performance. However, ramping up production for these cells has proved challenging, contributing to the decrease in operating income. If Tesla encounters additional setbacks, it could significantly delay product launches and hinder their ability to meet the 50% compound annual growth rate (CAGR) target.

Share Price Implications: Tesla’s share price is heavily influenced by investor sentiment and expectations of future growth. If the Cybertruck fails to capture a significant portion of the pickup truck market, or if the 4680 cell production encounters further delays, it could lead to a negative impact on the stock price. Furthermore, as Tesla’s valuation is based on future growth potential, any delays in product development could result in a revaluation of the company’s worth by the market.

Part 3: Energy Storage Expansion and Market Position

Tesla’s Energy Storage Ambitions: Tesla’s energy storage business showed promising growth in Q1, with the company planning to increase production capacity at their Megafactories in Lathrop and Shanghai. Despite the positive outlook, the energy storage market is becoming increasingly crowded, and Tesla may face stiff competition from both new and established players. This competition may put pressure on margins and make it more difficult for Tesla to maintain its position as a market leader.

Share Price Implications: As a significant portion of Tesla’s valuation is tied to its position as a market leader in the EV and energy storage sectors, increased competition could negatively affect investor sentiment and the company’s stock price. The energy storage market is evolving rapidly, and new technologies could emerge that challenge Tesla’s dominance. If Tesla fails to maintain its competitive edge, the market may reevaluate the company’s growth prospects, leading to potential share price

Part 4: Tesla’s Long-Term Growth Strategy and Share Price Implications

The Roadmap to Tesla’s Growth: In the earnings report, Tesla outlines plans to grow production in alignment with their 50% CAGR target, aiming to produce around 1.8 million cars in 2023. However, the automotive industry is known for its unpredictability, and Tesla’s ambitious growth plans may not be feasible in the long run. The company’s aggressive expansion may leave them vulnerable to unforeseen challenges, such as supply chain disruptions, regulatory hurdles, or shifts in consumer preferences.

Share Price Implications: Investors have high expectations for Tesla’s growth, which is reflected in the company’s stock price. Any signs of faltering growth or the inability to meet their ambitious targets may cause a loss of investor confidence and result in a decline in Tesla’s share price. The market is sensitive to changes in growth projections, and if Tesla’s growth falters, even temporarily, it could cause significant volatility in the stock price.

Part 5: Tesla’s Long-Term Plans and Share Price Dynamics

Tesla’s Vision for the Future: Tesla has ambitious long-term plans that focus on rapid growth, expansion of its product lineup, and continuous investment in autonomy and vehicle software. The company’s strategy includes an emphasis on Full Self-Driving (FSD) technology, which could potentially revolutionize the automotive industry and create new revenue streams through ride-sharing and other applications. Tesla’s commitment to innovation and growth is part of what has propelled its share price to around $170 per share.

Cybertruck Manufacturing Optimism: Cybertruck has the potential to disrupt the pickup truck market with its unique design and advanced technology. Tesla’s Gigafactory Texas, where the Cybertruck will be produced, is expected to feature cutting-edge manufacturing techniques and innovations that could help streamline the production process. If Tesla can successfully ramp up Cybertruck production and gain a foothold in the competitive pickup truck market, it could further solidify its position as a leader in the EV industry and create a positive impact on its share price.

Full Self-Driving (FSD) Prospects: Tesla’s FSD technology is one of the key pillars of the company’s long-term strategy. The company has made significant progress in recent years, with multiple iterations of their Autopilot and FSD software being released to customers. However, the path to true autonomous driving is complex, with regulatory and technical challenges still to be overcome. If Tesla can successfully navigate these hurdles and deliver a fully functional FSD system, it could potentially unlock substantial value for the company and its shareholders.

Share Price Implications: The share price of Tesla is closely tied to the company’s long-term plans and its ability to execute them successfully. The introduction of the Cybertruck and advancements in FSD technology could potentially lead to significant upside in Tesla’s share price. However, the market will closely monitor the company’s progress in these areas. Any setbacks or delays in production, FSD development, or regulatory approval could negatively impact investor sentiment and the stock price.

Conclusion: Tesla’s long-term plans, including the Cybertruck production and Full Self-Driving technology, play a crucial role in the company’s current share price of around $170 per share. While there are risks associated with these ambitious plans, a successful execution could propel Tesla to new heights in the automotive industry and lead to potential gains in its stock valuation. As the electric vehicle market continues to evolve, Tesla’s ability to navigate these challenges and capitalize on emerging opportunities will be key to maintaining its dominance and protecting its share price.

Unleashing the Revolutionary Power of AI in Data Entry and Processing: Anticipating Unprecedented Advances Before 2025

Data entry and processing is one of the key areas where Artificial Intelligence (AI) is expected to have a major impact in the coming years. With the increasing amount of data being generated every day, the demand for faster and more efficient data processing has never been higher. Fortunately, AI technology is here to help meet this demand and take data entry and processing to the next level.

One of the main advantages of AI in data processing is its ability to automate manual data entry. This means that instead of relying on human data entry clerks, AI algorithms can process and categorize vast amounts of data much more efficiently and accurately. AI algorithms can also identify patterns and relationships within the data, allowing for more comprehensive data analysis.

Another key area where AI is expected to enhance data entry and processing is in natural language processing (NLP). NLP is a subfield of AI that focuses on the interactions between computers and humans in natural language. With advancements in NLP, AI will soon be able to understand and interpret written and spoken human language, making data entry and processing even more seamless.

Before 2025, we can expect to see significant advancements in AI’s ability to process and analyze unstructured data, such as images, videos, and audio. AI algorithms will be able to automatically identify and categorize information within these types of data, making data entry and processing much easier and more efficient. Additionally, AI will be able to process multiple languages, further expanding its reach and impact on data entry and processing.

Another exciting development in the field of AI and data entry and processing is the use of machine learning. Machine learning is a type of AI that allows algorithms to learn and improve over time through experience. With machine learning, AI algorithms can become more accurate and efficient at processing and analyzing data, reducing the risk of human error and improving the overall accuracy of the data.

In conclusion, the next few years will bring significant advancements in the field of AI and data entry and processing. From automating manual data entry to processing unstructured data and utilizing machine learning, AI has the potential to greatly enhance the accuracy and efficiency of data processing. By embracing these changes, we can look forward to a future where data entry and processing is seamless and accurate, providing valuable insights and helping organizations make better data-driven decisions.

Maximizing Your Earnings with ChatGPT: A Guide for Aspiring AI Experts

Are you interested in making money with AI but not sure where to start? OpenAI’s ChatGPT is a powerful tool that has the potential to provide new opportunities for monetization and help you turn your AI expertise into a profitable venture. In this blog post, we will explore how you can use ChatGPT to earn money online, even if you are new to the field of AI.

  1. Offer ChatGPT-powered Customer Service: One of the easiest ways to get started with earning money using AI is by offering ChatGPT-powered customer service. Customer service is a critical component of any business, and many companies struggle to keep up with the volume of inquiries they receive. That’s where ChatGPT comes in – it can provide quick and personalized responses to customers 24/7, freeing up human customer service representatives to focus on more complex inquiries. By offering ChatGPT-powered customer service to businesses, you can earn a recurring income stream by charging a monthly fee for your services.
  2. Develop AI-powered Chatbots for E-commerce: Another way to earn money with ChatGPT is by developing AI-powered chatbots for e-commerce websites. Chatbots are becoming increasingly popular for online retailers as they provide instant support and recommendations to customers. With ChatGPT, you can create custom chatbots that can help e-commerce websites improve the customer experience. By developing chatbots for e-commerce websites, you can earn a one-time fee for your services and potentially earn recurring revenue through ongoing maintenance and updates.
  3. Create ChatGPT-powered Virtual Assistants: Virtual assistants are becoming more and more common in both personal and professional settings. With ChatGPT, you can create virtual assistants that can perform a range of tasks, such as scheduling appointments, answering frequently asked questions, and even making recommendations. As demand for virtual assistants continues to grow, there is a huge opportunity for aspiring AI experts to develop and sell these systems to businesses and individuals. You can earn money by charging a fee for your virtual assistant services or by selling the software outright.
  4. Offer ChatGPT Training and Consultation Services: Finally, you can monetize your AI expertise by offering ChatGPT training and consultation services to businesses and individuals. As ChatGPT continues to grow in popularity, there will be an increasing demand for experts who can help organizations and individuals understand and effectively utilize this technology. By offering training and consultation services, you can earn a fee for your expertise and help others take advantage of the potential of ChatGPT.

In conclusion, there are many ways for aspiring AI experts to use ChatGPT to earn money online. Whether you are interested in offering customer service, developing chatbots, creating virtual assistants, or offering training and consultation services, the potential for monetization is significant. Keep in mind that the key to success is staying up-to-date with the latest advancements in AI technology and marketing your services effectively. Don’t be intimidated by the fact that you are new to AI – with the right tools and resources, you can quickly become an expert and start earning money with ChatGPT.

AI Everything

These days it seems like businesses are trying to use AI to do everything. At least for startups, that isn’t far off. Anywhere there is a dataset remotely large enough and an answer that is vaguely definable, companies are putting together a business model to use machine learning to solve the problem. With some incredible successes in areas like image classification and defeating humans at video games, its hard not to be impressed.

One of the best channels for following recent breakthroughs in AI is the 2 Minute Papers YouTube Channel, started by Károly Zsolnai-Fehér, a professor at the Vienna University of Technology in Austria. Károly’s videos combine interesting clips of the programs in action with well-delivered summaries of recent papers illustrating advances in artificial intelligence.

In one of his latest videos, he covers an AI that not only can copy the most successful actions that humans take in video games but can actually improve on those actions to be better than the best human players. So does that mean that AI will be displacing office workers once it learns how to do their jobs better than them? Probably, yes. But maybe not quite how you think it might.

As much of a ‘black-box‘ as AI has been in the past, modern systems are becoming better and better at explaining how they arrived at an answer. This gives human operators predictive capabilities that we didn’t have with systems of the past that could spit out an answer but gave us no indication of how that answer was formulated.

This Forbes article on Human-Centric AI provides some examples of how modern AI systems can be implemented to train employees to do their jobs better and even enjoy their jobs more while doing it! If that doesn’t sound incredible to you, you may be a machine who is only reading this page to improve your search algorithm.

So what does this all mean? A lot of research is showing that AI is actually creating many more jobs than it destroys. So, as long as you’re willing to try and understand the systems that will one day be our overlords, you should be able to upgrade your career and stay employed.

Whether you still want the job that remains is another question entirely.

How Data Will Be Used To Decide Your Future

Welcome to 2019! Let’s start the year off by discussing how your ability to exercise your free will could be directly impacted by who you follow on social media, or who you pass by on the street.

In the dystopian Netflix series Black Mirror, there is an episode called Nosedive where a person’s ability to ride a plane, work at their job or even be served food at a restaurant is decided by a crowd-sourced rating system. Much like you rate your Uber driver at the end of your trip (and your Uber driver rates you), in this episode, every social interaction is followed by both parties giving each other a star-rating with an app on their phone. Everyone’s rating is public and it seems like you can downvote someone at any time. People with higher overall scores have more influence on the scores of people that they interact with. Inevitably, the episode’s main character encounters a string of bad luck and unfortunate encounters that lead to her score tumbling to almost nothing. She ends up losing her job, her home and her ability to travel in a matter of days based on nothing more than a few left swipes from some strangers and a co-worker.

Image result for black mirror rating episode

Everyone has bad days, so it really hits home when you see the protagonist lose her life over a few social mishaps. She doesn’t actually die, but she is locked in a plastic box because of her low social score.

How far are we from experiencing this kind of scenario in our lives?

The Chinese government has announced plans to implement a Social Credit Score for its citizens, that tracks all online and in-person activity, including who your friends are, who you talk to and who your acquaintances talk to. This score will decide if you can get a loan on a house, similar to a credit score in the United States or Canada, but it will also decide what schools you can go to, what businesses you can shop at and even whether or not you can leave the country. Going live in 2020, literally next year, all 1.6 billion Chinese residents will be subject to this Social Credit System; a system that is eerily similar to the one described in the Black Mirror episode.

I live in North America. Calgary, Alberta, Canada, specifically, so this won’t affect me, right?

All around the world, people have free and easy access to instant global communication networks, the wealth of human knowledge at their fingertips, up-to-the-minute information from across the earth, and unlimited usage of the most remarkable software and technology, built by private companies, paid for by adverts. That was the deal that we made. Free technology in return for your data and the ability to use it to influence and profit from you. The best and worst of capitalism in one simple swap. We might decide we’re happy with that deal. And that’s perfectly fine. But if we do, it’s important to be aware of the dangers of collecting this data in the first place. We need to consider where these datasets could lead – even beyond the issues of privacy and the potential to undermine democracy (as if they weren’t bad enough). There is another twist in this dystopian tale. An application for these rich, interconnected datasets that belongs in the popular Netflix show Black Mirror, but exists in reality. It’s known as Sesame Credit, a citizen scoring system used by the Chinese government. Imagine every piece of information that a data broker might have on you collapsed down into a single score. Everything goes into it. Your credit history, your mobile phone number, your address – the usual stuff. But all your day-to-day behaviour, too. Your social media posts, the data from your ride-hailing app, even records from your online matchmaking service. The result is a single number between 350 and 950 points. Sesame Credit doesn’t disclose the details of its ‘complex’ scoring algorithm. But Li Yingyun, the company’s technology director, did share some examples of what might be inferred from its results in an interview with the Beijing-based Caixin Media. ‘Someone who plays video games for ten hours a day, for example, would be considered an idle person. Someone who frequently buys diapers would be considered as probably a parent, who on balance is more likely to have a sense of responsibility.’ If you’re Chinese, these scores matter. If your rating is over 600 points, you can take out a special credit card. Above 666 and you’ll be rewarded with a higher credit limit. Those with scores above 650 can hire a car without a deposit and use a VIP lane at Beijing airport. Anyone over 750 can apply for a fast-tracked visa to Europe. It’s all fun and games now while the scheme is voluntary. But when the citizen scoring system becomes mandatory in 2020, people with low scores stand to feel the repercussions in every aspect of their lives. The government’s own document on the system outlines examples of punishments that could be meted out to anyone deemed disobedient: ‘Restrictions on leaving the borders, restrictions on the purchase of . . . property, travelling on aircraft, on tourism and holidays or staying in star-ranked hotels.’ It also warns that in the case of ‘gravely trust breaking subjects’ it will ‘guide commercial banks . . . to limit their provision of loans, sales insurance and other such services’. Loyalty is praised. Breaking trust is punished.

Fry, Hannah. Hello World: Being Human in the Age of Algorithms (pp. 44-46). W. W. Norton & Company. Kindle Edition.

Science fiction mirrors reality and reality reflects science fiction. While this type of system is only going live in China, it is unclear how long we have before something similar arrives in the West.

How Afraid Should You Be of AI?

A friend sent me a video today. It started off rather innocuously, with a program called EarWorm, designed to search for Copyrighted content and erase it from memory online. As many of these stories do, it escalated quickly. Within three days of being activated by some careless engineers with no backzground in AI ethics, it had wiped out all memory of the last 100 years. Not only digitally, but even in the brains of the people who remembered it. Its programmers had instructed it to do so with as little disruption to human lives as possible, so it kept everyone alive. It might have been easier to just wipe humanity off the map. Problem solved. No more Copyrighted content being shared, anywhere. At least that didn’t happen. Right?

This story is set in the year 2028, only ten years from now. These engineers and programmers had created the world’s first Artificial General Intelligence (AGI) and it rapidly became smarter than all of humanity, with the computing power and storage capacity surpassing what had been available previously though all of human history. Assigned a singular mission, the newly formed AGI sets out to complete its task with remorseless efficiency. It quickly invents and enlists an army of nanoscopic robots that can alter human minds and wipe computer memory. By creating a mesh network of these bots that can self-replicate, the AI quickly spreads its influence around the world. It knows that humans will be determined to stop it from accomplishing its mission, so it uses the nanobots to slightly alter the personalities of anyone intelligent enough to pose a threat to its mission. Within days it accomplishes its task. It manipulates the brains of its targets just enough to achieve the task while minimizing disruption. It does this by simply reducing the desire of the world’s best minds in AI to act. It creates apathy for the takeover that is happening right in front of them. By pacifying those among us intelligent enough to act against it, its mission can proceed, unencumbered by pesky humans.

Because it was instructed to accomplish its task with ‘as little disruption as possible’ the outcome isn’t the total destruction of humanity and all life in the universe, as is commonly the case in these sorts of AI doomsday scenarios. Instead, EarWorm did as it was programmed to do, minimizing disruption and keeping humans alive, but simultaneously robbing us of our ability to defend ourselves by altering our minds so that we posed no threat to its mission. In a matter of days, AI drops from one of the most researched and invested-in fields to being completely forgotten by all of humanity.

This story paints a chilling picture (though not as chilling as many ‘grey-goo’ scenarios, which see self-replicating, AI-powered nanobots turning the earth, and eventually the entire universe, into an amorphous cloud of grey goo). It is a terrifying prospect that a simple program built by some engineers in a basement could suddenly develop general intelligence and wipe an entire century of knowledge and information from existence without a whimper from humanity.

How likely is it? Do we need to worry about it? and What can we do about it? are some of the questions that sprang to mind as I watched the well-produced six-minute clip.  It is a scenario much more terrifying and unfortunately, more plausible than those of popular TV and films like Terminator and even Westworld. There are a lot of smart people out there today who warn that AI, unchecked, could be the greatest existential threat faced by humanity. It’s a sobering thought to realize that this could happen to us and we wouldn’t even see it coming or know it ever happened.

Then, the real question that the video was posing dawned on me: Has this already happened?

We could already be living in a world where AI has already removed our ability to understand it or to act against it in any way…

I hope not, because that means we’ve already lost.

Here’s the video if you’re interested

On AI and Investment Management

Index funds are the most highly traded equity investment vehicles, with some funds like ones created by Vanguard Group cumulatively being valued at over $4 Trillion USD. Index funds have democratized investing by allowing access to passive investments for millions of people. But what are they?

An index fund is a market-capitalization weighted basket of securities. Index funds allow retail investors to invest in a portfolio made up of companies representative of the entire market without having to create that portfolio themselves. Compared to actively managed funds like mutual funds and hedge funds, index funds tend to have much lower fees because the only balancing that happens occurs based on an algorithm to keep the securities in the fund proportional to their market cap (market capitalization, or market cap, is the number of shares that a company has on the market multiplied by the share price).

Starting in the 1970s, the first ‘index funds’ were created by companies that tried to create equally weighted portfolios of stocks. This early form of the index fund was abandoned after a few months. It quickly became apparent that it would be an operational nightmare to be constantly rebalancing these portfolios to keep them equally weighted. Soon companies settled on the market capitalization weighting because a portfolio weighted by market cap will remain that way without constant rebalancing.

With the incredible advancement of AI and extraordinarily powerful computers, shouldn’t it be possible to create new types of ‘passively managed’ funds that rely on an algorithm to trade? What that could mean is that index funds might not have to be market cap weighted any longer. This push is actually happening right now and the first non-market cap weighted index funds to appear in over 40 years could be available to retail investors soon.

But this means that we need to redefine the index fund. The new definition has three criteria that must be met for a fund to meet:

  1. It must be transparent – Anyone should be able to know exactly how it is constructed and be able to replicate it themselves by buying on the open market.
  2. It must be investable – If you put a certain amount of money in the fund, you will get EXACTLY the return that the investment shows in the newspapers (or more likely your iPhone’s Stocks app).
  3. It must be systematic – The vehicle must be entirely algorithmic, meaning it doesn’t require any human intervention to rebalance or create.

So, what can we do with this new type of index fund?

“Sound Mixer” board for investments with a high-risk, actively traded fund (hedge fund) on the top and lower risk, passively traded fund (index fund) on the bottom.

We can think of investing like a spectrum, with actively managed funds like hedge funds on one side and passively managed index funds on the other and all the different parameters like alpha, risk control and liquidity as sliders on a ‘mixing board’ like the one in the image above. Currently, if we wanted to control this board, we would have to invest in expensive actively managed funds and we wouldn’t be able to get much granular control over each factor. With an AI-powered index fund, the possibilities of how the board could be arranged are endless. Retail investors could engage in all sorts of investment opportunities in the middle, instead of being forced into one category or another.

An AI-powered index fund could allow an investor to dial in the exact parameters that they desire for their investment. Risk, alpha, turnover, Sharpe ratio, or a myriad of other factors could easily be tuned for by applying these powerful algorithms. 

The implications of a full-spectrum investment fund are incredible. Personalized medicine is a concept that is taking the industry by surprise and could change the way that doctors interact with patients. Companies like Apple are taking advantage of this trend by incorporating new medical devices into consumer products, like with the EKG embedded into the new Apple Watch Series 4.

Personalized investing could be just as powerful. Automated portfolios could take into account factors like age, income level, expenses, and even lifestyle to create a portfolio that is specifically tailored to the individual investor’s circumstances.

So why can’t you go out and purchase one of these new AI managed, customizable index funds?

Well, unfortunately, the algorithms do not exist, yet. The hardware and software exists today to do this but we’re still missing the ability to accurately model actual human behaviour. Economists still rely on some pretty terrible assumptions about people that they then use to build the foundations of entire economic theories. One of these weak assumptions is that humans act rationally. Now, there is a lot of evidence to suggest that many people act in the way that we are programmed to by evolution. The problem is, a lot of what allowed us to evolve over the last 4 billion years of life on earth, is pretty useless for success in 2018-era financial planning and investment.

All hope is not lost, however. New research into the concept of bounded rationality, the idea that rational decision making is limited by the extent of human knowledge and capabilities, could help move this idea forward. One of the founding fathers of artificial intelligence, Herbert Simon,  postulated that AI could be used to help us understand human cognition and better predict the kinds of human behaviours that helped keep us alive 8,000 years ago, but are detrimental for wealth accumulation today. 

By creating heuristic algorithms that can capture these behaviours and learning from big data to understand what actions are occurring, we may soon be able to create software that is able to accentuate the best human behaviours and help us deal with the worst ones. Perhaps the algorithm that describes humanity has already been discovered.

I Built a Neural Net That Knows What Clothes You’re Wearing

Okay, maybe that is a bit of a click-baitey headline. What I really did was program a neural network with Pytorch that is able to distinguish between ten different clothing items that could present in a 28×28 image. To me, that’s still pretty cool.

Here’s an example of one of the images that gets fed into the program:

Yes, this is an image of a shirt.

Can you tell what this is? Looks kind of like a long-sleeve t-shirt to me, but it is so pixelated that I can’t really tell. But that doesn’t matter. What matters is what my trained neural-net thinks it is and if that’s what it actually is.

After training on a subset of images like this (the training set is about 750 images) for about 2 minutes, my model was able to choose the correct classification for any image that I fed in about 84.3% of the time. Not bad for a first go at building a clothing classifying deep neural net.

Below I have included the code that actually generates the network and runs a forward-pass through it:


class Network(nn.Module):
    def __init__(self, input_size, output_size, hidden_layers, drop_p=0.5):
        ''' Builds a feedforward network with arbitrary hidden layers.
       
            Arguments
            ---------
            input_size: integer, size of the input
            output_size: integer, size of the output layer
            hidden_layers: list of integers, the sizes of the hidden layers
            drop_p: float between 0 and 1, dropout probability
        '''
        super().__init__()
        # Add the first layer, input to a hidden layer
        self.hidden_layers = nn.ModuleList([nn.Linear(input_size, hidden_layers[0])])
       
        # Add a variable number of more hidden layers
        layer_sizes = zip(hidden_layers[:-1], hidden_layers[1:])
        self.hidden_layers.extend([nn.Linear(h1, h2) for h1, h2 in layer_sizes])
       
        self.output = nn.Linear(hidden_layers[-1], output_size)
       
        self.dropout = nn.Dropout(p=drop_p)
       
    def forward(self, x):
        ''' Forward pass through the network, returns the output logits '''
       
        # Forward through each layer in `hidden_layers`, with ReLU activation and dropout
        for linear in self.hidden_layers:
            x = F.relu(linear(x))
            x = self.dropout(x)
       
        x = self.output(x)
       
        return F.log_softmax(x, dim=1)

After training the network using a method called backpropagation and gradient descent (code below), the network successfully classified the vast majority of the images that I fed in, in less than half a second. Mind you, these were grayscale images, formatted in a simple way and trained with a large enough dataset to ensure reliability.

If you want a good resource to explain what backpropagation actually does, check out another great video by 3 Blue 1 Brown below:

So, what does this all look like? Is it all sci-fi futuristic and with lots of beeps and boops? Well… not exactly. Here’s the output of the program:

Output of my clothing-classifier neural net. Provides a probability that the photo is one of the 10 items listed.

The software grabs each image in the test set, runs it through a forward pass of the network and ends up spitting out a probability for each image. Above, you can see that the network thinks that this image is likely a coat. I personally can’t distinguish if it is a coat, a pullover or just a long-sleeve shirt, but the software seems about 85% confident that it is, in fact, a coat.

Overall, it’s pretty awesome that after only a few weeks of practice (with most of that time spent learning how to program in python) I can code my very own neural networks and they actually work!

If you’re interested, here’s a video of the neural network training itself and running through a few test images:

If you’d like to test out the code for yourself, here’s a link to my GitHub page where you can download all the files you need to get it running. Search Google if you can’t figure out how to install Python and run a Jupyter Notebook.

That’s all for now! See you soon 🙂

Facebook Made The Best Tool For Creating Neural Networks

It’s called PyTorch. And it’s a tool designed to work perfectly with Python libraries like NumPy and Jupyter Notebooks to create deep neural networks. As it turns out, it is much easier to use and more intuitive than Google’s TensorFlow packages. In fact, I have been trying to get TensorFlow working on my Mac laptop for about a month, each time I run it, I get a new error, and when I fix that error, I encounter another, and another, until I eventually resign myself to never being able to train a neural network on my laptop.

Fortunately, compatibility is not the only thing that PyTorch has going for it. After its release in 2017, it has been adopted by teams around the world in research and in business. It is extremely intuitive to use (for a high-level programming language targeted mostly at people with PhDs in Computer Science and Mathematics, admittedly). But seriously, it is designed with the structure of neural networks in mind, so the syntax and structure of your code can match the logical flow and linear algebra model that a neural network has conceptually.

A neural network with two hidden layers, as shown above, can be coded in PyTorch with less than 10 lines of code. Quite impressive.

All the squishification functions are built in to the PyTorch library, like

  • Sigmoid: S(x) = 1/(1+e^{-x}) ,
  • ReLU: f(x) = max(x,0) , and
  • Softmax: \sigma(z)_j = {e^{Z_j}}/{\sum_{k=1}^K*e^{Z_k}} .

On top of that, you can define a 756 bit input multi-dimensional matrix (AKA ‘Tensor‘) with one line of code.

Here’s the code for the above neural network that I created. It takes a 784-bit image file, pumps it through two hidden layers and then to a 10-bit output where each one of the output nodes represents a digit (0-9). The images that are in the training set are all images of handwritten numbers between zero and nine, so, when trained, this neural network should be able to identify the number that was written automatically.

Jupyter notebook code for a neural network with 784 input bits, two hidden layers and a 10 bit output

This few lines of code, executed on a server (or local host) produces the following output:

The neural network trying to classify a handwritten 5, notice that the probability distribution is fairly even, that’s because we haven’t trained the network yet.

See how cool that is!? Oh… right. The network seems to have no clue which number it is. That’s because all we’ve done so far is a feedforward operation on an untrained neural network with a bunch of random numbers as the weights and zeroes as the biases.

In order to make this neural network do anything useful, we have to train it, and that involves another step, back-propagation. I’ll cover that in my next blog. For now, we’re left with a useless random distribution of numbers and weights and no idea what our output should be, enjoy!