Wolfram Language
Paclet Repository
Community-contributed installable additions to the Wolfram Language
Primary Navigation
Categories
Cloud & Deployment
Core Language & Structure
Data Manipulation & Analysis
Engineering Data & Computation
External Interfaces & Connections
Financial Data & Computation
Geographic Data & Computation
Geometry
Graphs & Networks
Higher Mathematical Computation
Images
Knowledge Representation & Natural Language
Machine Learning
Notebook Documents & Presentation
Scientific and Medical Data & Computation
Social, Cultural & Linguistic Data
Strings & Text
Symbolic & Numeric Computation
System Operation & Setup
Time-Related Computation
User Interface Construction
Visualization & Graphics
Random Paclet
Alphabetical List
Using Paclets
Create a Paclet
Get Started
Download Definition Notebook
Learn More about
Wolfram Language
XGBPaclet
Guides
XGBPaclet Guide
Tech Notes
XGBPaclet Functionality
Symbols
XgbModelPredict
XgbMeasurement
XgbMeasurement
XgbTrain
XGBPaclet Functionality
Here are the main functions in XGBPaclet and examples of them in action.
X
g
b
T
r
a
i
n
T
h
e
f
u
n
c
t
i
o
n
t
o
p
e
r
f
o
r
m
X
G
B
o
o
s
t
T
r
a
i
n
i
n
g
X
g
b
M
e
a
s
u
r
e
m
e
n
t
T
h
e
f
u
n
c
t
i
o
n
t
o
l
o
a
d
a
n
d
e
v
a
l
u
a
t
e
t
h
e
X
G
B
o
o
s
t
m
o
d
e
l
o
n
g
i
v
e
n
d
a
t
a
.
More functions will be added or updated in the future versions.
Create a XGBoost Python session
A XGBoost python session is
required
before using XgbTrain[].
The following code shows how to create a XGBoost python session:
I
n
[
1
]
:
=
[
◼
]
R
e
g
i
s
t
e
r
E
n
v
i
r
o
n
m
e
n
t
[
"
x
g
b
"
{
"
x
g
b
o
o
s
t
"
(
*
w
i
t
h
n
u
m
p
y
*
)
,
"
s
c
i
k
i
t
-
l
e
a
r
n
=
=
1
.
5
.
2
"
,
"
m
a
t
p
l
o
t
l
i
b
"
}
]
O
u
t
[
1
]
=
x
g
b
I
n
[
8
]
:
=
s
e
s
s
i
o
n
=
[
◼
]
S
t
a
r
t
E
n
v
i
r
o
n
m
e
n
t
[
"
x
g
b
"
]
;
Prepare dataset for the following examples
Create binary classification training set and validation set for the following examples
I
n
[
1
]
:
=
b
i
n
a
r
y
`
t
r
a
i
n
d
a
t
a
=
R
a
n
d
o
m
R
e
a
l
[
{
-
1
0
,
1
0
}
,
{
1
0
0
,
3
}
]
;
b
i
n
a
r
y
`
t
e
s
t
d
a
t
a
=
R
a
n
d
o
m
R
e
a
l
[
{
-
1
0
,
1
0
}
,
{
1
0
0
,
3
}
]
;
b
i
n
a
r
y
`
t
r
a
i
n
l
a
b
e
l
=
R
a
n
d
o
m
C
h
o
i
c
e
[
{
"
a
"
,
"
b
"
}
,
{
1
0
0
}
]
;
b
i
n
a
r
y
`
t
e
s
t
l
a
b
e
l
=
R
a
n
d
o
m
C
h
o
i
c
e
[
{
"
a
"
,
"
b
"
}
,
{
1
0
0
}
]
;
b
i
n
a
r
y
`
t
r
a
i
n
s
e
t
=
{
b
i
n
a
r
y
`
t
r
a
i
n
d
a
t
a
b
i
n
a
r
y
`
t
r
a
i
n
l
a
b
e
l
}
;
b
i
n
a
r
y
`
t
e
s
t
s
e
t
=
{
b
i
n
a
r
y
`
t
e
s
t
d
a
t
a
b
i
n
a
r
y
`
t
e
s
t
l
a
b
e
l
}
;
How to use XgbTrain[] to train a model
Use
X
g
b
T
r
a
i
n
[
]
to train a model with trainset and XGBoost python session, and store the trained model in the output session:
I
n
[
1
8
]
:
=
X
g
b
T
r
a
i
n
[
s
e
s
s
i
o
n
,
b
i
n
a
r
y
`
t
r
a
i
n
s
e
t
]
;
S
t
a
r
t
i
n
g
t
h
e
P
y
t
h
o
n
P
r
e
d
i
c
t
i
o
n
e
v
a
l
u
a
t
i
o
n
.
.
.
C
l
a
s
s
i
f
i
c
a
t
i
o
n
t
a
s
k
d
e
t
e
c
t
e
d
!
s
h
a
p
i
s
n
o
t
a
v
a
i
l
a
b
l
e
p
a
n
d
a
s
i
s
n
o
t
a
v
a
i
l
a
b
l
e
m
a
t
p
l
o
t
l
i
b
i
s
i
m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