Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Final dh #5

Open
wants to merge 65 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
65 commits
Select commit Hold shift + click to select a range
f610ed7
Create README.md
sangki930 May 25, 2021
97f4701
add feature
tofulim May 27, 2021
d2521e1
models commit
sangki930 May 28, 2021
b0e15a1
model recommit
sangki930 May 28, 2021
4913de4
[dh] new feature commit
tofulim May 28, 2021
1357646
[dh] k-fold commit
tofulim Jun 2, 2021
4ab9a96
[dh] make time2global feature
tofulim Jun 3, 2021
312c880
commit test
sangki930 Jun 3, 2021
1160816
[sangki930] branch commit
sangki930 Jun 3, 2021
af9892a
[dh] commit to merge
tofulim Jun 4, 2021
e527d8c
Update README.md
sangki930 Jun 4, 2021
23bf831
Merge pull request #2 from bcaitech1/new_branch_01
sangki930 Jun 4, 2021
5a4307a
pplz
tofulim Jun 4, 2021
4831d39
[dh] test
tofulim Jun 4, 2021
0d933bd
[dh] oh yeah
tofulim Jun 4, 2021
7a99180
add master
PrimeOfMine Jun 4, 2021
0f34d9b
dh explane
tofulim Jun 6, 2021
b110420
Merge branch 'comb_main' into sangki930
tofulim Jun 6, 2021
cf7a7e5
Merge pull request #3 from bcaitech1/sangki930
tofulim Jun 6, 2021
85449dd
test_sangki
sangki930 Jun 6, 2021
8cbe13d
sangki commit
sangki930 Jun 6, 2021
401ef43
cm
tofulim Jun 6, 2021
c55eb22
Merge branch 'comb_main' of https://github.com/bcaitech1/p4-dkt-olleh…
tofulim Jun 6, 2021
4f73e48
[dh] cont fix..
tofulim Jun 7, 2021
c813636
cm
tofulim Jun 7, 2021
02ab294
[dh] continuous fix
tofulim Jun 7, 2021
eff3dea
cm
tofulim Jun 7, 2021
088158b
[dh] submit fix, lstmattn fix
tofulim Jun 7, 2021
db91d72
[dh] change setting and split model.py to each architecture
tofulim Jun 9, 2021
03b01a9
[dh] change setting
tofulim Jun 10, 2021
b091795
[dh] make new branch to merge feat
tofulim Jun 10, 2021
324463c
cm
tofulim Jun 10, 2021
975b8f6
[dh] add presicion,recall,f1 metric
tofulim Jun 11, 2021
e68165a
[dh] cont/cate mid check
tofulim Jun 11, 2021
0f8e947
[dh] mid check
tofulim Jun 11, 2021
19428b2
[dh] push for compare
tofulim Jun 12, 2021
40fb49c
[dh] apply on model
tofulim Jun 12, 2021
047c851
fixed untracked files
tofulim Jun 13, 2021
aaab502
[dh] model final fix
tofulim Jun 13, 2021
105a1d3
[dh] final model fix
tofulim Jun 13, 2021
edee0f0
[dh] lgbm change
tofulim Jun 14, 2021
c8a7246
[dh] lgbm change
tofulim Jun 14, 2021
f3d3de8
[dh] cm
tofulim Jun 14, 2021
e701e79
[dh] cm
tofulim Jun 14, 2021
9a1fe4b
edit for k-fold
PrimeOfMine Jun 14, 2021
731b63e
add comments
PrimeOfMine Jun 14, 2021
8c0194c
debugging
PrimeOfMine Jun 14, 2021
c5f44df
[dh] fix & pull
tofulim Jun 14, 2021
0be294a
Merge branch 'final_dh' of https://github.com/bcaitech1/p4-dkt-ollehd…
tofulim Jun 14, 2021
f610a72
[dh] use test file
tofulim Jun 15, 2021
8f39e38
[dh] final push
tofulim Jun 15, 2021
0488c36
[dh] push
tofulim Jun 15, 2021
d6c3d6e
[dh] ffffinal commit
tofulim Jun 15, 2021
552e5ce
Update README.md
tofulim Jun 20, 2021
5eccb79
Update README.md
tofulim Jun 20, 2021
cba42b1
Update README.md
tofulim Jul 20, 2021
12a85d2
Update README.md
tofulim Jul 20, 2021
0a26104
Update README.md
tofulim Jul 24, 2021
0b1e351
Update README.md
tofulim Jul 24, 2021
6bd2e44
Update README.md
tofulim Jul 24, 2021
1512d6d
Update README.md
tofulim Jul 25, 2021
c98b8ae
Update README.md
tofulim Jul 25, 2021
ca4a390
Create README.md
tofulim Jul 25, 2021
e9c5699
Update README.md
tofulim Jul 26, 2021
7b94b5f
Update README.md
tofulim Jul 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
cm
tofulim committed Jun 7, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit c8136368e385646d03c821a1859697e858788ea0
4 changes: 2 additions & 2 deletions conf.yml
Original file line number Diff line number Diff line change
@@ -30,8 +30,8 @@ max_seq_len: 20
num_workers: 1

##K-fold params
use_kfold : True #n개의 fold를 이용하여 k-fold를 진행한다.
use_stratify : True
use_kfold : False #n개의 fold를 이용하여 k-fold를 진행한다.
use_stratify : False
n_fold : 5
split_by_user : False #k-fold를 수행할 dataset을 user 기준으로 split

2 changes: 1 addition & 1 deletion dkt/dataloader.py
Original file line number Diff line number Diff line change
@@ -267,7 +267,7 @@ def __getitem__(self,index):
seq_len = len(row[0])
print(f'row 값 : {len(row)}')

# test, question, tag, correct, test_level_diff, tag_mean, tag_sum, ans_rate
# test, question, tag, correct, solve_time
cate_cols = [row[i] for i in range(len(row))]


15 changes: 8 additions & 7 deletions dkt/model.py
Original file line number Diff line number Diff line change
@@ -1306,7 +1306,7 @@ def __init__(self, args):

self.hidden_dim = self.args.hidden_dim
self.n_layers = self.args.n_layers
self.cont_cols=self.args.cont_cols
self.cont_cols=1

# Embedding
# interaction은 현재 correct로 구성되어있다. correct(1, 2) + padding(0)
@@ -1348,28 +1348,29 @@ def init_hidden(self, batch_size):

def forward(self, input):

test, question, tag, _, mask, interaction, solve_time,_ = input

test, question, tag, _, mask,interaction,solve_time, _ = input
batch_size = interaction.size(0)

# Embedding

solve_time=solve_time.unsqueeze(-1).type(torch.FloatTensor).to(self.device)
embed_interaction = self.embedding_interaction(interaction)
embed_test = self.embedding_test(test)
embed_question = self.embedding_question(question)
embed_tag = self.embedding_tag(tag)

embed_cont=self.cont_proj(solve_time)

# print(embed_cont.shape)
# print("-"*80)
embed = torch.cat([embed_interaction,
embed_test,
embed_question,
embed_tag,], 2)

X = self.comb_proj(embed)
print(X.shape,embed_cont.shape)
print("범주형과 연속형의 shape: ",X.shape,embed_cont.shape)
X=torch.cat([X, embed_cont], 2)

# print("둘은 concat한 shape: ",X.shape)
hidden = self.init_hidden(batch_size)
out, hidden = self.lstm(X, hidden)
out = out.contiguous().view(batch_size, -1, self.hidden_dim)
3 changes: 1 addition & 2 deletions dkt/trainer.py
Original file line number Diff line number Diff line change
@@ -448,10 +448,9 @@ def get_model(args):
# 배치 전처리 일반화
def process_batch_v2(batch, args):
# batch : load_data_from 에서 return 시킬 feature(컬럼)
# test, question,tag,correct, test_level_diff, tag_mean,tag_sum,ans_rate,mask = batch
# test, question,tag,correct, mask = batch
# 규칙 : mask는 항상 맨 뒤임
# print(type(batch))
# print(batch)
test = batch[0]
question = batch[1]
tag = batch[2]