Commit 7cfe19e8 authored by eudesyawog's avatar eudesyawog

minor changes

parent b3b42c64
# lab5
# lab5: Yield estimation using multi-source remote sensing
Yield estimation using multi-source remote sensing
\ No newline at end of file
## Inputs
Radar : VV, VH
Optical : B2, B3, B4, B8, B5, B6, B7, B8A, B11, B12
Indices : NDVI, NDWI, EVI, MSAVI2, GDVI, CIGreen, CIRedEdge
## Millet Yield data
Niakhar 2017 : 35 plots
Niakhar 2018 : 48 plots
Nioro 2018 : 33 plots
## Normalisation
Data were normalised per band subtracting the mean value and dividing by the standard deviation
plots rad opt
niakhar 2017 | 35 | 15 | 14
niakhar 2018 | 48 | 16 | 18
nioro 2018 | 33 | 16 | 16
(niakhar 2017)
opt radar
20170508 20170507
20170518 20170519
20170607 20170531
20170617 20170612
20170727 20170624
20170806 20170706
20170910 20170718
20170930 20170730
20171005 20170811
20171010 20170823
20171015 20170904
20171020 20170916
20171025 20170928
20171030 20171010
20171022
(niakhar 2018)
opt radar
20180503 20180502
20180508 20180514
20180513 20180526
20180523 20180607
20180528 20180619
20180602 20180701
20180612 20180713
20180622 20180725
20180702 20180806
20180722 20180818
20180806 20180830
20180816 20180911
20180915 20180923
20180920 20181005
20181005 20181017
20181010 20181029
20181025
20181030
(nioro 2018)
opt radar
20180505 20180502
20180510 20180514
20180515 20180526
20180520 20180607
20180525 20180619
20180530 20180701
20180604 20180713
20180609 20180725
20180629 20180806
20180714 20180818
20180823 20180830
20180922 20180911
20180927 20180923
20181012 20181005
20181017 20181017
20181022 20181029
\ No newline at end of file
......@@ -2,7 +2,7 @@ import pandas as pd
import numpy as np
import os
def normalize_time_series (radar_file, opt_file, norm="meanstd", radar_bands=["VV","VH"],
def normalize_time_series (radar_file, opt_file, norm="meanstd", radar_bands=["VH","VV"],
opt_bands=["B2","B3","B4","B8","B5","B6","B7","B8A","B11","B12"],
opt_indices = ["NDVI","NDWI","EVI","MSAVI2","GDVI","CIGreen","CIRedEdge"]):
......
......@@ -76,7 +76,7 @@ def ZonalStats (plots_file,lstTS,dates_file,outPath,outPattern,tree_mask=None):
if j == 0:
dic.setdefault('ID',[]).append(row['ID'])
dic.setdefault('Biom_f',[]).append(row['Biomasse_f'])
dic.setdefault('Biom_s',[]).append(row['Biomasse_f'])
dic.setdefault('Biom_s',[]).append(row['Biomasse_s'])
dic.setdefault('Rdt_f',[]).append(row['Rdt_f'])
dic.setdefault('Rdt_s',[]).append(row['Rdt_s'])
......
......@@ -22,11 +22,10 @@ def split_data (radar_seq,opt_seq,indices_seq,yields,n_folds=3,n_random=10) :
idx = np.arange(y.shape[0])
n_samples = int(y.shape[0]/n_folds)
dt = datetime.now()
random.seed(dt.microsecond)
for j in range(n_random) :
dt = datetime.now()
random.seed(dt.microsecond)
for i in range(n_folds):
if i==0:
random.shuffle(idx)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment