Commit 6358a214 authored by luroth's avatar luroth
Browse files

use GDD for BBCH30 estimation and not days

parent fed3aace
......@@ -407,9 +407,10 @@ def process_NadirCC_LCCC_LA_BBCH30(path_campaign, GSD):
X = sc_x.transform(X)
# Log delta to weight close-to-zero values higher
y = np.log1p(np.abs(df_training['delta_to_BBCH'])) * np.sign(df_training['delta_to_BBCH'])
#y = np.log1p(np.abs(df_training['delta_to_BBCH'])) * np.sign(df_training['delta_to_BBCH'])
y = df_training['delta_to_BBCH30_GDD']
svm_predictor = svm.SVR(C=32, kernel='rbf', gamma = 0.125, epsilon = 0.1)
svm_predictor = svm.SVR(C=0.25, kernel='rbf', gamma = 0.125, epsilon = 0.1)
svm_predictor.fit(X, y)
print("SVM initialized, support vectors:", len(svm_predictor.support_vectors_))
......@@ -559,7 +560,7 @@ def process_NadirCC_LCCC_LA_BBCH30(path_campaign, GSD):
X = sc_x.transform(X)
value = svm_predictor.predict(X)
value = -(np.expm1(np.abs(value))) * np.sign(value)
#value = -(np.expm1(np.abs(value))) * np.sign(value)
print("Mean BBCH30 delta:", np.mean(value))
df_LA['value'] = value
......
This diff is collapsed.
Supports Markdown
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