Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
KerasROOTClassification
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
Container Registry
Model registry
Operate
Environments
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
Eric.Schanet
KerasROOTClassification
Commits
a0c31bdc
Commit
a0c31bdc
authored
6 years ago
by
Nikolai.Hartmann
Browse files
Options
Downloads
Patches
Plain Diff
adding README
parent
1d453dc1
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
README.md
+49
-0
49 additions, 0 deletions
README.md
with
49 additions
and
0 deletions
README.md
0 → 100644
+
49
−
0
View file @
a0c31bdc
# KerasROOTClassification
This is an attempt to simplify the training of Keras models from ROOT TTree input.
The recommended usage is to put this module in your python path and
create run scripts to define and train your model.
For example:
```
python
import
numpy
as
np
import
logging
from
KerasROOTClassification
import
ClassificationProject
logging
.
basicConfig
()
logging
.
getLogger
(
"
KerasROOTClassification
"
).
setLevel
(
logging
.
INFO
)
c
=
ClassificationProject
(
"
my_project
"
,
# this will also be the name of the project directory
signal_trees
=
[(
filename1
,
treename1
)],
bkg_trees
=
[(
filename2
,
treename2
),
(
filename3
,
treename3
),
],
optimizer
=
"
Adam
"
,
selection
=
"
some-selection-expression
"
,
branches
=
[
"
var1
"
,
"
var2
"
,
"
var3
"
],
weight_expr
=
"
some-weight-expression
"
,
identifiers
=
[
"
var4
"
,
"
var5
"
],
# variables that identify which events were used for training
step_bkg
=
10
,
# take every 10th bkg event for training
step_sig
=
2
,
# take every second sig event for training
)
c
.
train
(
epochs
=
20
)
```
Previously created projects can be inspected in iypthon like
```
ipython -i -m KerasROOTClassification.browse <project-dir>
```
# Conda setup
An example for a mini conda setup that contains the nescessary packages:
```
sh
conda
install
keras pandas matplotlib scikit-learn pydot graphviz jupyter
pip
install
root_numpy
```
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