-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path0_prepare_data.sh
32 lines (22 loc) · 1.16 KB
/
0_prepare_data.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#!/bin/bash
ROOT_DIR=$1
NUM_FEATURES=$2
mkdir -p output
# generating intermediate data format
python prepare_data/prepare_data_from_svm.py $ROOT_DIR
# computing feature correlation from labels
python feature_relevance/compute_relevance_correlation-measures.py $ROOT_DIR $NUM_FEATURES
# computing feature relevance
python feature_relevance/compute_relevance_lambdamart.py $ROOT_DIR/output/sample_train_features.txt \
$ROOT_DIR/output/sample_validation_features.txt \
$ROOT_DIR/output/sample_test_features.txt \
$NUM_FEATURES \
$ROOT_DIR/output/feature_rank.txt \
$ROOT_DIR
# build blacklist
python prepare_data/build_features_blacklist.py $ROOT_DIR
#or
#cat output/feature_rank.txt | grep nan | cut -f1 | cut -d't' -f2 | grep -v label > output/blacklist.txt
# computing pairwise feature similarity
python feature_similarity/compute_pairwise_feature_similarity_spearman.py $ROOT_DIR
exit 0