Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Z
ZfitWrapper
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Alexander Heidelbach
ZfitWrapper
Commits
c578c8bd
Commit
c578c8bd
authored
8 months ago
by
Alexander Heidelbach
Browse files
Options
Downloads
Patches
Plain Diff
Make zfit requirement flexible
parent
691e873f
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
pyproject.toml
+1
-1
1 addition, 1 deletion
pyproject.toml
src/zfitwrapper/Fitter.py
+8
-18
8 additions, 18 deletions
src/zfitwrapper/Fitter.py
with
9 additions
and
19 deletions
pyproject.toml
+
1
−
1
View file @
c578c8bd
...
...
@@ -18,7 +18,7 @@ classifiers = [
dependencies
=
[
"numpy>
=
1.16
",
"pandas"
,
"zfit
=
=
0.21
.
0
",
"zfit
>
0.21.0"
,
"tensorflow"
,
"tensorflow-probability"
,
"keras"
,
...
...
This diff is collapsed.
Click to expand it.
src/zfitwrapper/Fitter.py
+
8
−
18
View file @
c578c8bd
...
...
@@ -31,7 +31,8 @@ class Fitter(BaseFitter):
@property
def
lossfunction
(
self
)
->
Type
[
zfit
.
core
.
loss
.
BaseLoss
]:
if
self
.
ext_loss
:
assert
self
.
model
.
model
is
not
None
if
self
.
model
.
model
.
is_extended
:
lossfunction
=
zfit
.
loss
.
ExtendedUnbinnedNLL
else
:
lossfunction
=
zfit
.
loss
.
UnbinnedNLL
...
...
@@ -42,14 +43,8 @@ class Fitter(BaseFitter):
def
eval_model
(
self
,
)
->
Union
[
zfit
.
core
.
basepdf
.
BasePDF
,
zfit
.
core
.
interfaces
.
ZfitPDF
]:
if
self
.
ext_loss
:
eval_model
=
self
.
model
.
ext_model
assert
isinstance
(
eval_model
,
zfit
.
core
.
interfaces
.
ZfitPDF
)
else
:
eval_model
=
self
.
model
.
model
assert
eval_model
is
not
None
return
eval_model
assert
self
.
model
.
model
is
not
None
return
self
.
model
.
model
@property
def
gof
(
self
)
->
float
:
...
...
@@ -102,7 +97,8 @@ class HistFitter(BaseFitter):
@property
def
lossfunction
(
self
)
->
Type
[
zfit
.
core
.
loss
.
BaseLoss
]:
if
self
.
ext_loss
:
assert
self
.
model
.
model
is
not
None
if
self
.
model
.
model
.
is_extended
:
lossfunction
=
zfit
.
loss
.
ExtendedBinnedNLL
else
:
lossfunction
=
zfit
.
loss
.
BinnedNLL
...
...
@@ -113,14 +109,8 @@ class HistFitter(BaseFitter):
def
eval_model
(
self
,
)
->
Union
[
zfit
.
core
.
basepdf
.
BasePDF
,
zfit
.
core
.
interfaces
.
ZfitPDF
]:
if
self
.
ext_loss
:
assert
isinstance
(
self
.
model
.
ext_model
,
zfit
.
core
.
interfaces
.
ZfitPDF
)
eval_model
=
zfit
.
pdf
.
BinnedFromUnbinnedPDF
(
self
.
model
.
ext_model
,
self
.
obs
)
else
:
assert
self
.
model
.
model
is
not
None
eval_model
=
zfit
.
pdf
.
BinnedFromUnbinnedPDF
(
self
.
model
.
model
,
self
.
obs
)
return
eval_model
assert
self
.
model
.
model
is
not
None
return
zfit
.
pdf
.
BinnedFromUnbinnedPDF
(
self
.
model
.
model
,
self
.
obs
)
@property
def
gof
(
self
)
->
float
:
...
...
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