Skip to content

Clutter Forecast


Warning

This library is under development, none of the presented solutions are available for download.

Use continuous forest inventory databases to predict forest growth and production. Utilize traditional method Clutter model. With this module, you will be able to estimate volume and basal area.


Class Parameters

Clutter Trainer

ClutterTrainer(df, age1, age2, ba1, ba2, site, vol, iterator=None)
Parameters Description
df The dataframe containing the continous processed forest inventory data.
age1 Name of the column containing the age of the previously sampled plot.
age2 Name of the column containing the age of the subsequently sampled plot.
ba1 Name of the column containing the basal area of the previously sampled plot.
ba2 Name of the column containing the basal area of the subsequently sampled plot.
site Name of the column containing the site index of the stand.
vol Name of the column containing the volume of the subsequently sampled plot.
iterator (Optional) Name of an iterator that will be used to group the data. Example of an iterator: Genetic material, Stratum.
Example of clutter input
Iterator Plot age1 age2 ba1 ba2 site vol
GM 1 1 2.5 3.5 7.57 8.42 7.83 44.04
GM 1 1 3.5 4.5 8.42 14 8.73 51.42
GM 1 2 2.1 3.1 4.94 5.51 6.98 38.06
GM 1 2 3.1 4.33 5.51 6.45 7.45 39.26
GM 2 1 2 3 7.3 8.25 11.37 74.63
GM 2 1 3 4 8.25 9.13 11.69 68.27
GM 2 1 4 5 9.13 12.79 12.83 72.76
GM 2 1 5 6 12.79 15.63 14 73.87

Class Functions

functions and parameters
  ClutterTrainer.fit_model(save_dir=None)

Parameters Description
.fit_model() Adjust the models for predicting basal area and volume.

Clutter Models

  • Basal area prediction
  • lnG2=lnG1(t1t2)+α0(1t1t2)+α1(1t1t2)S

  • Volume prediction
  • lnV2=β0+β11t2+β2S+β3lnG2
    Notation
    • G1: Initial basal area (at age t1) in m²·ha⁻¹
    • G2: Final basal area (at age t2) in m²·ha⁻¹
    • t1: Initial age in months or years
    • t2: Final age in months or years
    • S: Site index, dimensionless, f(site age,ti)
    • α0,α1: Coefficients to be estimated
    • V2: Final volume (at age t2) in m³·ha⁻¹
    • βi: Coefficients to be estimated

    Class Parameters

    Clutter Predictor

    ClutterPredictor(coefs_file, age1, site, ba1, iterator=None)
    
    Parameters Description
    coefs_file Directory of the json file containing the coefficients and parameters of the fitted models.
    age1 Name of the column containing the age of the previously sampled plot.
    ba1 Name of the column containing the basal area of the previously sampled plot.
    site Name of the column containing the site index of the stand.
    iterator (Optional) Name of an iterator that will be used for predictions.
    Class Functions

    functions and parameters
      ClutterTrainer.get_coefs()
      ClutterTrainer.predict(age2)
      ClutterTrainer.predict_range(age_range=(2, 10),show_plots=False)
    

    Example Usage

    clutter_forecast_example.py
    fptools.forecast import ClutterTrainer, ClutterPredictor
    import pandas as pd
    

    clutter_forecast_example.py
    df = pd.read_csv(r'C:\Your\path\clutter_data.csv')
    
    c_train = ClutterTrainer(df,"age-column1","age-column2", "basal-area1",
                             "basal-area1","site-column","volume-target",
                             iterator="Genetic Material")
    
    c_train_metrics = c_train.fit_model(save_dir = r"C:\Your\path\output")
    
    c_predictor = ClutterPredictor(r"C:\Your\path\output\all_coefficients.json",
                                 2.35,9.27,9.13, iterator="type-x")
    
    ba_vol_predicted = c_predictor.predict(4)
    
    coef = predictor.get_coefs()
    
    ba_vol_range_predicted = predictor.predict_range((2,12), show_plots=True)
    

    Example of output prediction plot

    0246810120510152025
    Confidence IntervalPredicted basal area (m²)Sampled train rangePredicted Basal Area by Age (iterator: 'type-x')AgeBasal Area (m²) R²: 0.8493, MAPE: 13.58% for a training with 232 plots with ages from 1.76 to 6.13 years.
    024681012050100150
    Confidence IntervalPredicted Volume (m³)Sampled train rangePredicted Volume by Age (iterator: 'type-x')AgeVolume (m³)R²: 0.8493, MAPE: 13.58% for a training with 232 plots with ages from 1.76 to 6.13 years.

    References

    CLUTTER, J. L.; FORTSON, J. C.; PIENAAR, L. V.; BRISTER, G. H.; BAILEY, R. L. (1983). Timber management: a quantitative approach. New York: John Wiley & Sons, 333p.

    ARCE, JULIO EDUARDO; DOBNER JR., MARIO. (2024). Manejo e planejamento de florestas plantadas: com ênfase nos gêneros Pinus e Eucalyptus. Curitiba, PR: Ed. dos Autores, 419p.