Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Keisuke ANDO
socceR
Commits
65fb888c
Commit
65fb888c
authored
Jan 05, 2023
by
Takumi Amano
💬
Browse files
[add]行動選択確率用のデータを作成
parent
e2e55a3f
Changes
1
Show whitespace changes
Inline
Side-by-side
R/make_data.R
View file @
65fb888c
...
...
@@ -160,6 +160,16 @@ get_kick <- function(kick_log) {
return
(
output
)
}
get_kick_Allplayer
<-
function
(
players
,
kick
){
kick
<-
kick
%>%
dplyr
::
select
(
step
,
action_unum
=
unum
,
action_team
=
team
,
ball_x
,
ball_y
,
ball_vx
,
ball_vy
,
next_ball_x
,
next_ball_y
,
next_ball_vx
,
next_ball_vy
)
output
<-
players
%>%
dplyr
::
inner_join
(
kick
,
by
=
"step"
)
%>%
dplyr
::
distinct
(
step
,
team
,
unum
,
.keep_all
=
TRUE
)
return
(
output
)
}
get_action_Allplayer
<-
function
(
players
,
action
)
{
action
<-
action
%>%
dplyr
::
select
(
step
,
action_team
=
team
,
ball_x
,
ball_y
,
pass
,
dribble
)
...
...
@@ -210,7 +220,6 @@ get_dribble <- function(kick) {
dplyr
::
filter
(
dribble
==
TRUE
)
%>%
distinct
(
step
,
.keep_all
=
TRUE
)
%>%
dplyr
::
select
(
step
,
team
,
unum
,
px
,
py
,
pvx
,
pvy
,
ball_x
,
ball_y
,
ball_vx
,
ball_vy
,
next_ball_x
,
next_ball_y
,
next_ball_vx
,
next_ball_vy
,
dribble
,
dribble_scc
)
return
(
output
)
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment