feat: add FastAPI web interface for GIS classification
This commit is contained in:
parent
5a9b8469bd
commit
6815769d2b
5 changed files with 1458 additions and 15 deletions
20
main.py
20
main.py
|
|
@ -29,19 +29,19 @@ OUTPUT_PATH = os.path.join("output", "classified.tif")
|
|||
# Change strategy by uncommenting desired option:
|
||||
|
||||
# Option 1: Random Forest (recommended for GIS)
|
||||
STRATEGY = RandomForestStrategy(
|
||||
n_estimators=100,
|
||||
max_depth=None,
|
||||
random_state=42,
|
||||
)
|
||||
|
||||
# # Option 2: Support Vector Machine
|
||||
# STRATEGY = SVMStrategy(
|
||||
# kernel="linear", # Fast prediction; use 'rbf' for better accuracy but much slower
|
||||
# C=1.0,
|
||||
# STRATEGY = RandomForestStrategy(
|
||||
# n_estimators=100,
|
||||
# max_depth=None,
|
||||
# random_state=42,
|
||||
# )
|
||||
|
||||
# # Option 2: Support Vector Machine
|
||||
STRATEGY = SVMStrategy(
|
||||
kernel="linear", # Fast prediction; use 'rbf' for better accuracy but much slower
|
||||
C=1.0,
|
||||
random_state=42,
|
||||
)
|
||||
|
||||
# Option 3: Logistic Regression
|
||||
# STRATEGY = LogisticRegressionStrategy(
|
||||
# penalty="l2",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue