BioDev & Data Curation | Research methods

Public platform under continuous technical and curatorial review

Machine learning for Cannabis data

How can data help estimate outcomes, and what are the limits of a prediction? This guide introduces machine learning: methods that learn patterns from examples to estimate outcomes in new cases.

The main example is laboratory propagation of Cannabis plants. Follow the steps for framing a question, checking data, and evaluating predictions. This is an educational guide: the page does not train models or provide cultivation recommendations.

Formulations
122
Mineral salts
14
Experimental records
492
Study status
preprint

Learning path

From question to evaluation: four steps

Before choosing a method, define the problem and what would count as a useful answer. A model can recognize a pattern without explaining its cause.

Preparation: study data types, measurement scales, and formats.

  1. 01

    Define the question

    What should be estimated? Shoot length, for example. Also define the unit observed: a plant, a culture vessel, or another experimental unit.

  2. 02

    Check the records

    Where did the data come from? Check identification, measurement methods, units, and missing values. Record whether each value was measured or estimated.

  3. 03

    Separate learning and evaluation

    Use one part of the data to fit the model, another to choose its settings, and a reserved part to evaluate it. This avoids giving the evaluation an unfair advantage through prior access to the answers.

  4. 04

    Document for verification

    Keep the source, data and code versions, settings, and results. Explain the errors and the conditions needed to repeat the analysis.

Ways of learning

Let the question guide the method

Supervised, unsupervised, and reinforcement learning describe learning approaches. Deep learning describes neural-network architectures and may be used within more than one approach.

01Supervised learningLearn from examples with known answers

The model learns from inputs and known outcomes. Regression estimates a quantity, such as shoot length. Classification assigns a category, such as a chemical group. It is then evaluated on records not used for fitting.

02Unsupervised learningExplore without a predefined answer

The method looks for similarities or summarizes variation among records. It may group samples with similar profiles; grouping alone does not prove a shared origin or biological cause.

03Deep learningNeural networks with multiple layers

A neural network transforms its inputs through successive stages to learn data representations. Image analysis is one possible use. Appropriate data and evaluation are essential; more layers do not guarantee better results.

04Reinforcement learningLearn through actions and rewards

A system chooses actions and receives feedback about their outcomes. This is a possible research direction for control or optimization, not a cultivation capability validated by the studies presented here.

Optimization and prediction are different tasks. An optimization algorithm searches for a combination of conditions; a predictive model estimates the outcome under those conditions. Suggested combinations still need testing.

Case study

Estimating responses of laboratory-grown plants

The study illustrates model comparison for a specific question: how does culture-medium composition relate to growth? Its results refer to the materials and conditions studied.

The research question

Micropropagation multiplies plants from small tissue pieces grown under controlled laboratory conditions. Responses to nutrients may differ among cultivars, plant materials selected for cultivation.

Pepe, Hesami, and Jones studied 122 culture-medium formulations built from 14 mineral salts. They used 492 records to model shoot length, node count — points on the stem where leaves attach — and canopy area.

These records belong to the authors' experiment. They should not automatically be interpreted as 492 biologically independent plants or as validation for every cultivation condition.

122 media formulations
492 observations
3 prediction targets
14 mineral salts

Check the data

What should be known before modeling?

Identify what was measured and under which conditions. Regression estimates a numeric variable; classification predicts a category. Both require an evaluation design that reflects the intended use.

Data

Compare compatible measurements

Check plant organ, identification, unit, and method. Differences between laboratories or measurement dates may look like biological differences.

Evaluation

Test beyond the fitting examples

A result obtained with particular materials and conditions may not repeat in another cultivar, location, or period. Evaluation should reflect the intended use.

Interpretation

Separate patterns from explanations

Finding two associated characteristics does not show that one causes the other. Predictive models, exploratory analyses, and association tests answer different questions.

Candidate methods to investigate 7 methods · potential uses by analysis type
  • Classification

    Logistic regression

    Interpretable binary classification for compliance or a condition.

  • Similarity-based classification

    KNN: nearest neighbors

    Similarity-based classification of spectra, chemical profiles, or botanical materials.

  • Text classification

    Naive Bayes

    Initial classification of documents, evidence records, or technical texts.

  • Clustering

    K-means

    Exploratory grouping of chemical, genomic, environmental, or market data.

  • Association rules

    Apriori

    Association rules between cultivation conditions, compounds, practices, and outcomes.

  • Document analysis

    LSA: latent semantic analysis

    Semantic indexing and thematic discovery across the scientific collection.

  • Image analysis

    CNN: convolutional neural networks

    Potential analysis of foliar disease, seeds, trichomes, plant architecture, and hyperspectral imagery.

How to evaluate

Learning from data is not the same as passing a test

Data leakage occurs when information reserved for evaluation influences model fitting. It is like studying with access to the exam answers: performance may appear better than it will be on new cases.

01

Algorithm

The procedure used to learn or search for a solution. Its choice determines how the data will be analyzed.

02

Trained model

The result of fitting to data. It can estimate an outcome for a new record, within the limits of its evaluation.

03

Combining models

An ensemble combines predictions from several models. Any improvement must be checked on data that did not guide fitting or selection.

Models and results

What does a performance score actually tell us?

A performance measure summarizes part of a result, but does not replace information about errors and evaluation conditions. Compare models on the same problem using compatible criteria.

Technical comparison of seven models

On narrow screens, scroll the table sideways to read every column.

Method roles and limitations; not a performance ranking
ModelMain ideaInterpretive caution
Random Forest: an ensemble of decision treesCombines rules learned by several trees to estimate quantities or categories.A variable's importance does not show that it causes the outcome.
Decision treeSplits records through successive conditions and produces inspectable rules.It can fit the examples too closely and fail on new records: this is overfitting.
SVR: support vector regressionEstimates a quantity from relationships between inputs and outcomes.Variable scales and model settings must be chosen without consulting test answers.
SVM: support vector machineLearns boundaries separating categories of records.Performance depends on the examples, data representation, and balance among categories.
ANFIS: adaptive neuro-fuzzy inference systemCombines learning with rules allowing degrees of membership rather than only yes or no.Rules and their settings must be documented so the interpretation can be checked.
GRNN: generalized regression neural networkEstimates outcomes using similarity to available examples.Results depend on example coverage and the smoothing setting, which controls how nearby examples influence the estimate.
MLP: multilayer perceptronA neural network that learns input–outcome relationships through successive layers.Requires overfitting controls and evaluation on data separate from those used for learning.

Preparation and evidence

Measuring, organizing, and estimating are different steps

An analysis must preserve where each value came from. Direct measurements, calculated values, and gaps filled by estimation should not be presented as interchangeable.

Further reading: what supporting methods do

The names below identify methods and tools, not services available on this page. Their selection requires suitable data and evaluation.

WGCNA
Groups genes with similar activity patterns into co-expression modules. These suggest relationships to investigate; they do not show that one gene controls another.
Matrix eQTL
Tests variant-expression associations: relationships between genetic variants and gene-expression levels.
GWAS and PLINK
Genome-wide association studies (GWAS) test variant-trait associations between genetic variants and measured traits. PLINK is an analysis tool; ancestry differences and the large number of tests require controls.
Hierarchical cluster analysis (HCA)
Groups samples by similarity to support exploration, not to correct differences between batches.
pyComBat and imputation
pyComBat adjusts documented batch effects in compatible data. Imputation fills missing values using a rule or model; those values remain estimates.
BLAST and MMseqs2
Compare biological sequences and search for similarities. A match needs contextual interpretation; it does not establish function by itself.
MCScanX
Examines conservation of gene order across genomic regions, described as synteny or collinearity.
NLP and text mining
Natural language processing (NLP) helps locate entities and information in documents. Extracted information needs checking against the source.
MapReduce
Organizes distributed processing across computers. It is infrastructure, not a model predicting biological outcomes.

Governance

Keep the path from claim to source

Data governance brings together responsibilities, criteria, and records so decisions can be checked. It is not just storing files: it is knowing what they represent and under which conditions they can be used.

Origin and history

Record the source, version, collection method, and changes. This makes it possible to check where a claim came from.

Field meanings

Distinguish the measured response, the target to predict, and the prediction produced. Explain units, categories, and missing values.

Scope of use

State the population and conditions evaluated. A result valid in that setting may need further evaluation elsewhere.

Future investigations

Research possibilities, not ready-made results

Connecting genetic differences, gene activity, and plant traits can generate new questions. The cited preprint did not demonstrate that integration; it would require compatible, accessible data.

Condition for proceeding

First locate public or licensed sources, check whether samples are comparable, and assess their limitations. Without those data, the proposal remains a research hypothesis, not an available workflow.

Sources and limitations

Where to check the claims

The two studies serve different purposes: one illustrates prediction in tissue culture; the other shows interpretive limits when many measurements are estimated.

  1. Pepe, Hesami & Jones — Introducing PHJ Media (2026), v1. Micropropagation: 122 formulations, 14 salts, 492 records, and Table 1 metrics. Version posted on 15 July 2026 as a preprint, without peer review in that version.
  2. Konuma & Makino (2026) — Evolutionary relationship between organellar DNA inheritance patterns and traits of seed plants. Table 2: trait definitions and units; results and limitations: observed measurements and imputation; Appendix S1: Cannabis entry.
  3. Zhang and colleagues (2003) — PMID 14519776. Cytological reference cited in S1; cellular observation is not equivalent to a direct genetic-transmission test.
  4. scikit-learn — common pitfalls and prevention of data leakage.
  5. scikit-learn — evaluation metrics and coefficient of determination.

Editorial process: bibliographic records and curated passages in the collection help locate evidence; interpretation is checked against the original source. Passages and RAG — retrieval of passages to support an answer — do not replace that check. This page presents a static synthesis, not results generated for each visit.

NEXT · KANNABIUM VIRTUAL LAB

Kannabium Virtual Lab

From data preparation to proposed computational experiments.

Presentation availableLab · execution not yet released; access depends on publication of reproducible code.
Explore Kannabium Virtual Lab →
Back to top