Skip to content

Instantly share code, notes, and snippets.

@getawork
getawork / get_f1_score_from_confusion_matrix.py
Created March 28, 2020 15:15 — forked from leeyt/get_f1_score_from_confusion_matrix.py
Calculate F1 Score from Confusion Matrix
'''
從 Confusion Matrix 計算 F1 Score 分類評量值
'''
def get_f1_score(confusion_matrix, i):
TP = 0
FP = 0
TN = 0
FN = 0
for j in range(len(confusion_matrix)):
@getawork
getawork / ML_test.ipynb
Created November 13, 2019 15:28 — forked from jgomezdans/ML_test.ipynb
Maximum likelihood classifier
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@getawork
getawork / snappy_proc.py
Created August 2, 2019 22:53 — forked from braunfuss/snappy_proc.py
Sentinel-1 processing with snappy (snaps python api) for one swath (https://step.esa.int/main/toolboxes/snap/)
import os
import snappy
from snappy import GPF
from snappy import ProductIO
from snappy import HashMap
from snappy import jpy
import subprocess
from time import *
# documentation: http://step.esa.int/docs/v2.0/apidoc/engine/overview-summary.html