Connect with us

Artificial Intelligence

#420: Cannabis and Machine Learning, a Joint Venture

Updated on

Cannabis growers and sellers are rolling in and cashing out on machine learning

Regardless of scale, cannabis growers and sellers are doing business in a notably challenging environment. While they are dealing with ever-changing regulatory measures, they also need to navigate complex labor compliance issues and banking restrictions. On top of the typical business and supply chain operations, this emerging market is still unsettled legally, economically, and facing increasingly severe weather.  As a result, cannabis product companies and the agriculture industry at large, are looking to machine learning's ability to predict, optimize, and analyze as they embrace the future of agricultural technology.

Challenges in the AgTech and cannabis industry

Cannabis-based producers must tackle complex agricultural issues:


  • Manage pests and disease
  • Design efficient nutritional plans
  • Ensure ideal environmental conditions 
  • Optimize output while minimizing overhead
  • Legal regulatory compliance


  • Understand and organize complex distribution processes
  • Coordinate manufacturers, farmers, brands, and customer demand
  • Make decisions for future growth and expansion
  • Multi-state tax structures and regulations

For dealing with the operational side of growing, as well as for tackling the marketing side of selling, cannabis-based product companies can now leverage powerful data. This data fuels machine-learning-capable software that can predict the future by way of modern algorithms and data-processing architectures.

The following characteristics of cloud-based ecosystems are powering machine learning solutions:

  • Sensors and hardware for extracting information are cheaper

    • The increased popularity and success of IoT solutions make it possible to deploy, connect, and establish vast networks of smart devices. This localized streaming data is a crucial component for the accuracy of predictive data models.
  • Computing and storage resources are increasingly affordable

    • Competition among cloud vendors invites innovation and development at a low cost. Anyone can build and deploy ML solutions in the cloud, given that they have access to enough data. Furthermore, all cloud providers use a pay-as-you-go model allowing customers to only pay for what they use and require.
  • Algorithms and data processing frameworks are widely available

    • Many data processing tasks (all the way from collection to analysis) can easily be updated and automated with cloud-based tools. Similarly, pre-trained ML models and neural network architectures can be repurposed using old knowledge on new problems.

Such a rich ecosystem of tools, frameworks, and cheap data collecting devices have turned ML in agriculture into a viable, cost-efficient solution for the toughest challenges. No wonder that data-powered optimization is currently reshaping the entire agriculture sector, well beyond cannabis farming.

Below are a few brief ways predictive modeling solutions are being applied by both cannabis growers and sellers.

For Growers: Predictive models for operational improvements


Accurately understanding the chemical makeup of the cannabis plant is a crucial necessity for respecting regulatory measures. Predictive models can incorporate spectroscopy, x-ray imaging techniques, and machine learning to accurately identify cannabinoids and thus label cannabis varieties. Even in cases when the available data was insufficient, researchers were still able to cluster cannabis strains into distinct categories (medicinal, recreational, combined, industrial) based on their chemical properties. Not only do such models enable a better understanding of cannabis potency at all stages of the supply chain, but they represent a safeguard of quality and health for the end consumers. 

Yield Prediction

Collecting localized, real-time data from crops (humidity, temperature, light) is the first step in understanding both artificial and natural growing environments. However, knowing what to plant and what actions to take during growing may not be enough. Incorporating a variety of data sources and building complex models that account for hundreds of features (from soil type and rainfall to leaf-level healthiness measures) improves the accuracy of predictive models. The models then output numeric yield estimates that provide farmers with optimized solutions for the best return on investment.

Threat Prediction

Historical crop performance is not a reliable indicator for upcoming threats and diseases. Instead, automated prediction models can be used to keep crops under constant monitoring in both natural and artificial environments. Threat prediction models rely on a variety of techniques, ranging from image recognition to analysis of weather time-series data. Thereby enabling the system to forecast upcoming threats, detect anomalies, and help farmers recognize early signs. Taking action before it is too late empowers them to minimize loss and maximize crop quality.

For Sellers: Leverage historical customer data for marketing & supply chain optimization

Customer Lifetime Value

Customer Lifetime Value (CLTV) is one of the crucial measures that influence sales and marketing efforts. Modern predictive algorithms are already able to predict future relationships between individuals and businesses. These algorithms can either classify customers (e.g. low spending, high spending, medium spending) into different clusters or even predict quantifiable estimates of their future spendings. Such a fine-grained understanding of customers and their spending habits provides sellers a way to easily identify and nurture high-value customers. 

Customer Segmentation

Segmentation lies at the foundation of well-targeted marketing efforts. Both pre-built solutions, as well as custom-made algorithms, are able to distinguish between hundreds of relevant customer features. These features can be engineered from all kinds of internal and external data sources: web activity data, past purchase history, even social media activity. This data results in customers being grouped according to a set of characteristics that they share. This allows not only micro-targeting of marketing efforts but also improves the efficiency of distribution channels.

Is the joint venture between cannabis and machine learning blowing smoke? 

Like any agricultural endeavor, growing and selling a crop like cannabis comes with a variety of challenges.  Machine learning is removing the barriers to efficient production and distribution.  Companies are looking beyond manual analysis to analyze the constraints and parameters involved in operational performance. They are switching to machine learning to optimize their efforts.  At the same time, the marketing side of selling cannabis is becoming increasingly complex and digital, another call to bring in the power of big data. As consumers' tastes get progressively sophisticated, the variety of products and competition get more fierce. Removing future uncertainty in all these areas with the capabilities of prediction, anomaly detection, multi-variable optimization, and more through machine learning is helping cannabis companies roll in huge profits. 

We live in a world where data is leading a revolution in all industries: the public sector, health, manufacturing, and the supply chain. Developments in the agricultural sector are no exception: data-powered solutions are driving innovation by assisting farmers with their most challenging decisions. Predictive tools are used to leverage local data collected in real-time, thus removing the fear of uncertainty from operational processes. Digital, data-powered agricultural optimization is already reshaping the entire cannabis industry.

Josh Miramant is the CEO and founder of Blue Orange Digital, a top-ranked data science and machine learning agency with offices in New York City and Washington DC. Miramant is a popular speaker, futurist, and a strategic business & technology advisor to enterprise companies and startups. He helps organizations optimize and automate their businesses, implement data-driven analytic techniques, and understand the implications of new technologies such as artificial intelligence, big data, and the Internet of Things.