Skip to content

Commit

Permalink
coefficients table added
Browse files Browse the repository at this point in the history
  • Loading branch information
RichterV committed May 24, 2024
1 parent 1678367 commit 84842a1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions hypsometric_relationship.html
Original file line number Diff line number Diff line change
Expand Up @@ -626,6 +626,7 @@ <h3 id="class-functions">Class Functions</h3>
<div class="highlight"><pre><span></span><code>HypRel.run()
HypRel.metrics()
HypRel.plots(dir,show=bool)
HypRel.get_coef()
</code></pre></div>
<table>
<thead>
Expand All @@ -647,6 +648,10 @@ <h3 id="class-functions">Class Functions</h3>
<td><strong>.plots()</strong></td>
<td>Return the height and residuals plots</td>
</tr>
<tr>
<td><strong>.get_coef()</strong></td>
<td>Return the coefficients for each model</td>
</tr>
</tbody>
</table>
<h3 id="example-usage">Example Usage</h3>
Expand Down
2 changes: 1 addition & 1 deletion search/search_index.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Forest Py ToolsFP Tools features","text":"<p>Process forest management end-to-end, easy as can be.</p> <p>With this library, you'll be able to plan forest inventories and volumetrics as well as process all data stemming from your forest plantation. FP Tools brings together various forestry processing methodologies into a single library, providing ease in model selection and forest performance analysis.</p> <p>This library was created as a master's project by student Vinicius Richter, with the aim of facilitating the processing of forest inventory information.</p>"},{"location":"index.html#inventario-florestal-alocacao-de-parcelas","title":"Invent\u00e1rio Florestal: Aloca\u00e7\u00e3o de parcelas","text":"<p>Essa parte aqui \u00e9 algum esquema pra instala\u00e7\u00e3o de parcelas de diversas formas em um arquivo .tiff, ainda n\u00e3o decidi se vai ser feito um plugin pro qgis ou se vai ser tudo feito por CLI com python.</p> arquivo_exemplo.py<pre><code>def par_ou_impar(numero):\n if numero % 2 == 0:\n return \"Par\"\n else:\n return \"\u00cdmpar\"\n</code></pre>"},{"location":"index.html#forest-inventory-hypsometric-relationship","title":"Forest Inventory : Hypsometric Relationship","text":"<p>In this module, you'll be able to perform the hypsometric relationship of a forest inventory using various equations as well as make use of artificial neural networks.</p>"},{"location":"index.html#cubagem","title":"Cubagem","text":"<p>AQUI VAI TER INFORMA\u00c7\u00d5ES APRESENTANDO O M\u00d3DULO DE CUBAGEM DA BIBLIOTECA</p>"},{"location":"index.html#prognose-de-crescimento-e-producao","title":"Prognose de crescimento e produ\u00e7\u00e3o","text":"<p>AQUI VAI TER INFORMA\u00c7\u00d5ES APRESENTANDO O M\u00d3DULO DE PROGNOSE E PRODU\u00c7\u00c3O FLORESTAL</p>"},{"location":"index.html#estratificacao","title":"Estratifica\u00e7\u00e3o","text":"<p>AQUI VAI TER INFORMA\u00c7\u00d5ES APRESENTANDO O M\u00d3DULO DE ESTRATIFICA\u00c7\u00c3O DA BIBLIOTECA</p>"},{"location":"getting_started.html","title":"Getting Started","text":"<p>To begin processing your forest data, as easily as possible, first install FP Tools.</p> <pre><code>pip install fptools\n</code></pre> <p>Aqui vai ter algumas instru\u00e7\u00f5es ensinando o usu\u00e1rio a fazer a instala\u00e7\u00e3o do pacote e dos recursos necess\u00e1rios</p>"},{"location":"hypsometric_relationship.html","title":"Hypsometric Relationship","text":"<p>Estimate the heights of the missing trees based on the heights measured in the field.</p>"},{"location":"hypsometric_relationship.html#class-parameters","title":"Class Parameters","text":"<pre><code>HypRel(x, y, df, model, iterator)\n</code></pre> Parameters Description x The name of the column that contains the tree diameters. y The name of the column that contains the tree heights. df The DataFrame containing the tree data. model (Optional) A list of models used for estimating tree heights. If none, will use all models avaliable. iterator (Optional) A column name string. Defines wich column will be used as a iterator. Could be a farm name, plot name, code or any unique identification tag."},{"location":"hypsometric_relationship.html#class-functions","title":"Class Functions","text":"<pre><code>HypRel.run()\nHypRel.metrics()\nHypRel.plots(dir,show=bool)\n</code></pre> Parameters Description .run() Fit the models .metrics() Return a table of metrics of each evaluated model .plots() Return the height and residuals plots"},{"location":"hypsometric_relationship.html#example-usage","title":"Example Usage","text":"hyp_rel_example.py<pre><code>#import HypRel class\nfrom fptools.hyp_rel import HypRel\n#import pandas for data manipulation\nimport pandas as pd\n</code></pre> flowchart LR subgraph run runText1[Run all the available models] end subgraph metrics runText2[Evaluate each fitted model] end subgraph plots runText3[Generate plots] end %% Links para os subgr\u00e1ficos: HypRel-Module --&gt; run HypRel-Module --&gt; metrics HypRel-Module --&gt; plots <p>Create a variable for the HypRel Class</p> hyp_rel_example.py<pre><code>#load csv file\ndf = pd.read_csv(r'C:\\Your\\path\\csv_inventory_file.csv')\n#create the variable \"reg\" containing the HypRel class\nreg = HypRel('CAP',\"HT\",df)\n#Run the models and save in the \"results\" variable\nresults = reg.run()\n#Run a evaluation for the fitted models and save on \"metrics\" variable\nmetrics = reg.metrics()\n#Return the plots for the fitted models. \n#If show=True, will print on screen all the heigth and residuals plots. #If a directory is passed, will save all the plots in the directory.\nreg.plots('C:\\Your\\path\\to_save',show=True)\n</code></pre>"},{"location":"hypsometric_relationship.html#avaliable-models","title":"Avaliable models","text":"<pre><code>models = ['curtis', 'parabolic', 'stoffels', 'henriksen','prodan_i', 'prodan_ii', 'ann']\n</code></pre> <p>Where: $$ {Ht=tree \\,height} \\,\\,\\,|\\,\\,\\, {x= diameter} $$</p>"},{"location":"hypsometric_relationship.html#curtis","title":"Curtis","text":"\\[ \\operatorname{Ht} =e^{(\\beta_0+\u03b21*\\frac{1}{x})} \\tag{fonte:arial 12} \\]"},{"location":"hypsometric_relationship.html#parabolic","title":"Parabolic","text":"\\[ \\operatorname{Ht} = \\beta_0 + \\beta_1 * x + \\beta_2 * x^2 \\tag{fonte:arial 12} \\]"},{"location":"hypsometric_relationship.html#stoffels","title":"Stoffels","text":"\\[ \\operatorname{Ht} = e^{(\\beta_0+\\beta_1*\\ln(x))} \\tag{fonte:arial 12} \\]"},{"location":"hypsometric_relationship.html#henriksen","title":"Henriksen","text":"\\[ \\operatorname{Ht} = \\beta_0 + \\beta_1 * \\ln(x) \\tag{fonte:arial 12} \\]"},{"location":"hypsometric_relationship.html#prodan-i","title":"Prodan I","text":"\\[ \\operatorname{Ht} = (\\frac{x^2}{\\beta_0+\\beta_1*x+\\beta_2* x^2}) \\tag{fonte:arial 12} \\]"},{"location":"hypsometric_relationship.html#prodan-ii","title":"Prodan II","text":"\\[ \\operatorname{Ht} =(\\frac{x^2}{\\beta_0+\\beta_1*x+\\beta_2* x^2})+1.3 \\tag{fonte:arial 12} \\]"},{"location":"hypsometric_relationship.html#artificial-neural-network","title":"Artificial Neural Network","text":"<p>When selecting the 'ann' model, 4 different structures of artificial neural networks will be tested. Only the result from 1 model will be returned. The model returned will be selected by the ranking function. --- title: ANN parameters --- classDiagram class MLPRegressor { Epochs: 3000 Activation: logistic Solver Mode: lbfgs Batch size: dynamic Larning rate init: 0.1 Learning rate mode: adaptive } class Model-0 { Hidden layer sizes: (4,5) } class Model_1 { Hidden layer sizes: (4,2) } class Model_2 { Hidden layer sizes: (3,2) } class Model_3 { Hidden layer sizes: (4,4) } MLPRegressor &lt;|-- Model-0 MLPRegressor &lt;|-- Model_1 MLPRegressor &lt;|-- Model_2 MLPRegressor &lt;|-- Model_3</p>"},{"location":"hypsometric_relationship.html#ranking-function","title":"Ranking function","text":"<p>For the 'ann' model, the module sklearn.neural_network.MLPRegressor is used.</p> <p>To select the best-performing models and rank them accordingly, the following metrics are obtained:</p> <ul> <li>Mean Absolute Error (MAE)</li> <li>Mean Absolute Percentage Error (MAPE)</li> <li>Mean Squared Error (MSE)</li> <li>Root Mean Squared Error (RMSE)</li> <li>R Squared</li> <li>Explained Variance</li> <li>Mean Error</li> </ul> <p>After obtaining the metric for each tested model, the values are normalized from 0 to 10. The worst model receives a score of 0, and the best model receives a score of 10.</p>"}]}
{"config":{"lang":["en"],"separator":"[\\s\\-]+","pipeline":["stopWordFilter"]},"docs":[{"location":"index.html","title":"Forest Py ToolsFP Tools features","text":"<p>Process forest management end-to-end, easy as can be.</p> <p>With this library, you'll be able to plan forest inventories and volumetrics as well as process all data stemming from your forest plantation. FP Tools brings together various forestry processing methodologies into a single library, providing ease in model selection and forest performance analysis.</p> <p>This library was created as a master's project by student Vinicius Richter, with the aim of facilitating the processing of forest inventory information.</p>"},{"location":"index.html#inventario-florestal-alocacao-de-parcelas","title":"Invent\u00e1rio Florestal: Aloca\u00e7\u00e3o de parcelas","text":"<p>Essa parte aqui \u00e9 algum esquema pra instala\u00e7\u00e3o de parcelas de diversas formas em um arquivo .tiff, ainda n\u00e3o decidi se vai ser feito um plugin pro qgis ou se vai ser tudo feito por CLI com python.</p> arquivo_exemplo.py<pre><code>def par_ou_impar(numero):\n if numero % 2 == 0:\n return \"Par\"\n else:\n return \"\u00cdmpar\"\n</code></pre>"},{"location":"index.html#forest-inventory-hypsometric-relationship","title":"Forest Inventory : Hypsometric Relationship","text":"<p>In this module, you'll be able to perform the hypsometric relationship of a forest inventory using various equations as well as make use of artificial neural networks.</p>"},{"location":"index.html#cubagem","title":"Cubagem","text":"<p>AQUI VAI TER INFORMA\u00c7\u00d5ES APRESENTANDO O M\u00d3DULO DE CUBAGEM DA BIBLIOTECA</p>"},{"location":"index.html#prognose-de-crescimento-e-producao","title":"Prognose de crescimento e produ\u00e7\u00e3o","text":"<p>AQUI VAI TER INFORMA\u00c7\u00d5ES APRESENTANDO O M\u00d3DULO DE PROGNOSE E PRODU\u00c7\u00c3O FLORESTAL</p>"},{"location":"index.html#estratificacao","title":"Estratifica\u00e7\u00e3o","text":"<p>AQUI VAI TER INFORMA\u00c7\u00d5ES APRESENTANDO O M\u00d3DULO DE ESTRATIFICA\u00c7\u00c3O DA BIBLIOTECA</p>"},{"location":"getting_started.html","title":"Getting Started","text":"<p>To begin processing your forest data, as easily as possible, first install FP Tools.</p> <pre><code>pip install fptools\n</code></pre> <p>Aqui vai ter algumas instru\u00e7\u00f5es ensinando o usu\u00e1rio a fazer a instala\u00e7\u00e3o do pacote e dos recursos necess\u00e1rios</p>"},{"location":"hypsometric_relationship.html","title":"Hypsometric Relationship","text":"<p>Estimate the heights of the missing trees based on the heights measured in the field.</p>"},{"location":"hypsometric_relationship.html#class-parameters","title":"Class Parameters","text":"<pre><code>HypRel(x, y, df, model, iterator)\n</code></pre> Parameters Description x The name of the column that contains the tree diameters. y The name of the column that contains the tree heights. df The DataFrame containing the tree data. model (Optional) A list of models used for estimating tree heights. If none, will use all models avaliable. iterator (Optional) A column name string. Defines wich column will be used as a iterator. Could be a farm name, plot name, code or any unique identification tag."},{"location":"hypsometric_relationship.html#class-functions","title":"Class Functions","text":"<pre><code>HypRel.run()\nHypRel.metrics()\nHypRel.plots(dir,show=bool)\nHypRel.get_coef()\n</code></pre> Parameters Description .run() Fit the models .metrics() Return a table of metrics of each evaluated model .plots() Return the height and residuals plots .get_coef() Return the coefficients for each model"},{"location":"hypsometric_relationship.html#example-usage","title":"Example Usage","text":"hyp_rel_example.py<pre><code>#import HypRel class\nfrom fptools.hyp_rel import HypRel\n#import pandas for data manipulation\nimport pandas as pd\n</code></pre> flowchart LR subgraph run runText1[Run all the available models] end subgraph metrics runText2[Evaluate each fitted model] end subgraph plots runText3[Generate plots] end %% Links para os subgr\u00e1ficos: HypRel-Module --&gt; run HypRel-Module --&gt; metrics HypRel-Module --&gt; plots <p>Create a variable for the HypRel Class</p> hyp_rel_example.py<pre><code>#load csv file\ndf = pd.read_csv(r'C:\\Your\\path\\csv_inventory_file.csv')\n#create the variable \"reg\" containing the HypRel class\nreg = HypRel('CAP',\"HT\",df)\n#Run the models and save in the \"results\" variable\nresults = reg.run()\n#Run a evaluation for the fitted models and save on \"metrics\" variable\nmetrics = reg.metrics()\n#Return the plots for the fitted models. \n#If show=True, will print on screen all the heigth and residuals plots. #If a directory is passed, will save all the plots in the directory.\nreg.plots('C:\\Your\\path\\to_save',show=True)\n</code></pre>"},{"location":"hypsometric_relationship.html#avaliable-models","title":"Avaliable models","text":"<pre><code>models = ['curtis', 'parabolic', 'stoffels', 'henriksen','prodan_i', 'prodan_ii', 'ann']\n</code></pre> <p>Where: $$ {Ht=tree \\,height} \\,\\,\\,|\\,\\,\\, {x= diameter} $$</p>"},{"location":"hypsometric_relationship.html#curtis","title":"Curtis","text":"\\[ \\operatorname{Ht} =e^{(\\beta_0+\u03b21*\\frac{1}{x})} \\tag{fonte:arial 12} \\]"},{"location":"hypsometric_relationship.html#parabolic","title":"Parabolic","text":"\\[ \\operatorname{Ht} = \\beta_0 + \\beta_1 * x + \\beta_2 * x^2 \\tag{fonte:arial 12} \\]"},{"location":"hypsometric_relationship.html#stoffels","title":"Stoffels","text":"\\[ \\operatorname{Ht} = e^{(\\beta_0+\\beta_1*\\ln(x))} \\tag{fonte:arial 12} \\]"},{"location":"hypsometric_relationship.html#henriksen","title":"Henriksen","text":"\\[ \\operatorname{Ht} = \\beta_0 + \\beta_1 * \\ln(x) \\tag{fonte:arial 12} \\]"},{"location":"hypsometric_relationship.html#prodan-i","title":"Prodan I","text":"\\[ \\operatorname{Ht} = (\\frac{x^2}{\\beta_0+\\beta_1*x+\\beta_2* x^2}) \\tag{fonte:arial 12} \\]"},{"location":"hypsometric_relationship.html#prodan-ii","title":"Prodan II","text":"\\[ \\operatorname{Ht} =(\\frac{x^2}{\\beta_0+\\beta_1*x+\\beta_2* x^2})+1.3 \\tag{fonte:arial 12} \\]"},{"location":"hypsometric_relationship.html#artificial-neural-network","title":"Artificial Neural Network","text":"<p>When selecting the 'ann' model, 4 different structures of artificial neural networks will be tested. Only the result from 1 model will be returned. The model returned will be selected by the ranking function. --- title: ANN parameters --- classDiagram class MLPRegressor { Epochs: 3000 Activation: logistic Solver Mode: lbfgs Batch size: dynamic Larning rate init: 0.1 Learning rate mode: adaptive } class Model-0 { Hidden layer sizes: (4,5) } class Model_1 { Hidden layer sizes: (4,2) } class Model_2 { Hidden layer sizes: (3,2) } class Model_3 { Hidden layer sizes: (4,4) } MLPRegressor &lt;|-- Model-0 MLPRegressor &lt;|-- Model_1 MLPRegressor &lt;|-- Model_2 MLPRegressor &lt;|-- Model_3</p>"},{"location":"hypsometric_relationship.html#ranking-function","title":"Ranking function","text":"<p>For the 'ann' model, the module sklearn.neural_network.MLPRegressor is used.</p> <p>To select the best-performing models and rank them accordingly, the following metrics are obtained:</p> <ul> <li>Mean Absolute Error (MAE)</li> <li>Mean Absolute Percentage Error (MAPE)</li> <li>Mean Squared Error (MSE)</li> <li>Root Mean Squared Error (RMSE)</li> <li>R Squared</li> <li>Explained Variance</li> <li>Mean Error</li> </ul> <p>After obtaining the metric for each tested model, the values are normalized from 0 to 10. The worst model receives a score of 0, and the best model receives a score of 10.</p>"}]}
Binary file modified sitemap.xml.gz
Binary file not shown.

0 comments on commit 84842a1

Please sign in to comment.