Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
Quantum Support Vector Regression
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
sdlrs
Quantum Support Vector Regression
Commits
c4b5af00
Commit
c4b5af00
authored
Jul 7, 2022
by
Edoardo Pasetto
Browse files
Options
Downloads
Patches
Plain Diff
Upload New File
parent
74266581
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
GRSL/MERIS_dataset_generation/utility.py
+79
-0
79 additions, 0 deletions
GRSL/MERIS_dataset_generation/utility.py
with
79 additions
and
0 deletions
GRSL/MERIS_dataset_generation/utility.py
0 → 100644
+
79
−
0
View file @
c4b5af00
# -*- coding: utf-8 -*-
"""
Created on Wed Mar 23 11:44:13 2022
@author: Utente
"""
import
sympy
as
sp
import
numpy
as
np
bw_500_val
=
0.00288
b1_bw_val
=
0.5
b1_bph_val
=
0.002
b1_bsed_val
=
0.02
ased_p_val
=
0.042
sx_val
=
0.011
sy_val
=
0.014
def
get_aphy
(
A
,
B
,
C
):
a
,
b
,
c
=
sp
.
symbols
(
'
a b c
'
)
exp
=
a
*
(
c
**
(
1
-
b
))
aphy
=
float
(
exp
.
subs
([(
a
,
A
),(
b
,
B
),(
c
,
C
)]))
return
aphy
def
get_ased
(
X_val
,
wl_val
):
X
,
w
,
ased_p
,
sx
=
sp
.
symbols
(
'
X w ased_p sx
'
)
exp
=
X
*
ased_p
*
(
sp
.
exp
(
-
sx
*
(
w
-
440
)))
ased
=
float
(
exp
.
subs
([(
X
,
X_val
),(
w
,
wl_val
),(
ased_p
,
ased_p_val
),(
sx
,
sx_val
)]))
return
ased
def
get_ayel
(
Y_val
,
wl_val
):
Y
,
sy
,
w
=
sp
.
symbols
(
'
Y sy w
'
)
exp
=
Y
*
(
sp
.
exp
(
-
sy
*
(
w
-
440
)))
ayel
=
float
(
exp
.
subs
([(
Y
,
Y_val
),(
sy
,
sy_val
),(
w
,
wl_val
)]))
return
ayel
####################################à
def
get_bbw
(
wl_val
):
b1_bw
,
bw_500
,
w
=
sp
.
symbols
(
'
b1_bw bw_500 w
'
)
exp
=
b1_bw
*
bw_500
*
((
w
/
500
)
**
(
-
1
*
(
4
/
3
)))
#print(exp)
bbw
=
float
(
exp
.
subs
([(
b1_bw
,
b1_bw_val
),(
bw_500
,
bw_500_val
),(
w
,
wl_val
)]))
return
bbw
def
get_bbph
(
C_val
,
wl_val
):
b1_bph
,
C
,
w
=
sp
.
symbols
(
'
b1_bph C w
'
)
exp
=
0.3
*
b1_bph
*
(
C
**
(
0.62
))
*
(
1
+
9
*
(
sp
.
exp
(
-
((
w
-
685
)
**
2
/
(
2
*
100
)))))
bbph
=
float
(
exp
.
subs
([(
b1_bph
,
b1_bph_val
),(
C
,
C_val
),(
w
,
wl_val
)]))
return
bbph
def
get_bbsed
(
X_val
,
wl_val
):
b1_bsed
,
X
,
w
=
sp
.
symbols
(
'
b1_bsed X w
'
)
exp
=
b1_bsed
*
X
*
(((
w
)
/
(
500
))
**
(
-
1
))
bbsed
=
float
(
exp
.
subs
([(
b1_bsed
,
b1_bsed_val
),(
X
,
X_val
),(
w
,
wl_val
)]))
return
bbsed
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment