Skip to content

Commit 0f20bb3

Browse files
author
Pascual Martinez-Gomez
committed
Added one copyright and license notice in randomforest_all as example
1 parent ac966c8 commit 0f20bb3

File tree

2 files changed

+24
-6
lines changed

2 files changed

+24
-6
lines changed

en/emnlp2017exp.sh

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,18 @@ fi
4040
# sub(/\.$/,"",$3);
4141
# premise=$2;
4242
# conclusion=$3;
43-
# if($4 == "CONTRADICTION"){
43+
# score=$4;
44+
# if($5 == "CONTRADICTION"){
4445
# judgement="no";
45-
# } else if ($4 == "ENTAILMENT") {
46+
# } else if ($5 == "ENTAILMENT") {
4647
# judgement="yes";
47-
# } else if ($4 == "NEUTRAL") {
48+
# } else if ($5 == "NEUTRAL") {
4849
# judgement="unknown";
4950
# }
5051
# set=$12;
51-
# printf "%s.\n%s.\n", premise, conclusion > "en_plain/sick_"tolower(set)"_"pair_id".txt";
52-
# printf "%s\n", judgement > "en_plain/sick_"tolower(set)"_"pair_id".answer";
52+
# printf "%s.\n%s.\n", premise, conclusion > "plain/sick_"tolower(set)"_"pair_id".txt";
53+
# printf "%s\n", judgement > "plain/sick_"tolower(set)"_"pair_id".answer";
54+
# printf "%s\n", score > "plain2/sick_"tolower(set)"_"pair_id".answer";
5355
# }'
5456

5557
# Create files that list all filenames of training, testing and trial.

scripts/randomforest_all.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,20 @@
11
#!/usr/bin/python
2+
# -*- coding: utf-8 -*-
3+
#
4+
# Copyright 2017 Hitomi Yanaka
5+
#
6+
# Licensed under the Apache License, Version 2.0 (the "License");
7+
# you may not use this file except in compliance with the License.
8+
# You may obtain a copy of the License at
9+
#
10+
# http://www.apache.org/licenses/LICENSE-2.0
11+
#
12+
# Unless required by applicable law or agreed to in writing, software
13+
# distributed under the License is distributed on an "AS IS" BASIS,
14+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
# See the License for the specific language governing permissions and
16+
# limitations under the License.
17+
218

319
import os
420
import numpy as np
@@ -31,7 +47,7 @@ def regression(X_train, y_train, X_test, y_test):
3147
parameters = {
3248
'n_estimators' : [10, 50, 100, 200, 300],
3349
'random_state' : [0],
34-
'n_jobs' : [1],
50+
'n_jobs' : [200],
3551
'max_features' : ['auto', 'log2', 'sqrt', None],
3652
'criterion' : ['mse'],
3753
'max_depth' : [3, 5, 10, 20, 30, 40, 50, 100]

0 commit comments

Comments
 (0)