<commit_before>#!/bin/python
import sys;
import os;
path  = os.path.split(os.path.realpath(__file__))[0];
sys.path.append(path + "/utils/Python_Utils");
sys.path.append(path + "../utils/Python_Utils");

from latent_factor import *;
from io            import *;
import Logger;
import numpy as np;



def printUsages():
    print "Usage: train.py [options] x_file y_file m_file";
    print "options";
    print "-ins_lambda, the instance regularization coefficient (default 0.001)";
    print "-label_lambda, the label regularization coefficient (default 0.001)"; 
    print "-sizes, the architecture: [num_node_layer1,num_node_layer2,...] (default [])";
    print "-batch, the number of instances in a batch (default 100)";
    print "-niter, the number of iterations (default 20)";

def parseParameter(argv):
    if len(argv) < 4: #at least 4 paramters: train.py x_file y_file m_file
        printUsages();
        exit(1);
<commit_msg>Atempt to use the mat format instead of the arff format. There are two reasons. 1) the arff-reading softwares have different problems now. For example, the liac-arff can't parse '@attribute 0 {0,1}'. 2) the existing multi-label data sets in the arff format use different ways to indicates which attributes are labels. For example, in the tmc dataset, the 'class1','class2',.. attributes are labels. However, in the delicious dataset, the 'Tag_xxx' attributes are the labels.<commit_after>#!/bin/python
import sys;
import os;
path  = os.path.split(os.path.realpath(__file__))[0];
sys.path.append(path + "/utils/Python_Utils");
sys.path.append(path + "../utils/Python_Utils");

from latent_factor import *;
from io            import *;
import Logger;
import numpy as np;

def printUsages():
    print "Usage: train.py [options] x_file y_file m_file";
    print "options";
    print "-ins_lambda, the instance regularization coefficient (default 0.001)";
    print "-label_lambda, the label regularization coefficient (default 0.001)"; 
    print "-sizes, the architecture: [num_node_layer1,num_node_layer2,...] (default [])";
    print "-batch, the number of instances in a batch (default 100)";
    print "-niter, the number of iterations (default 20)";

def parseParameter(argv):
    if len(argv) < 4: #at least 4 paramters: train.py x_file y_file m_file
        printUsages();
        exit(1);

{'fraction_non_alphanumeric': 0.12183612183612183, 'fraction_numerical': 0.019305019305019305, 'mean_word_length': 4.01505376344086, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3412516', 'n_tokens_mistral': 749, 'n_tokens_neox': 697, 'n_words': 252}