abf37e5b9a3e46d2c9e07e32ee947b4b74e64057,examples/temp_do_not_use_lscp.py,,,#,66

Before Change




// access the timestamp for logging purpose
today = datetime.datetime.now()
timestamp = today.strftime("%Y%m%d_%H%M%S")

// set numpy parameters
np.set_printoptions(suppress=True, precision=4)

After Change



    X, y = loaddata(r"C:\Users\znasrullah001\Documents\project-files\PyOD\LSCP\datasets\cardio")

    random_state = np.random.RandomState(0)

    el = []
    k_list = random_state.randint(5, 200, size=50).tolist()
    for k in k_list:
        el.append(LOF(k))

    // create the model
    lscp = LSCP(el, random_state=random_state, local_region_size=100)

    // split the data into training and testing
    X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.4, random_state=random_state)
    X_train, X_test = standardizer(X_train, X_test)

    // fit and predict
    lscp.fit(X_train)
    scores = lscp.decision_function(X_test)
    print(roc_auc_score(y_test, scores))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: yzhao062/pyod
Commit Name: abf37e5b9a3e46d2c9e07e32ee947b4b74e64057
Time: 2018-12-01
Author: zain.nasrullah@ca.pwc.com
File Name: examples/temp_do_not_use_lscp.py
Class Name:
Method Name:


Project Name: tg12/FAIG
Commit Name: b27d78a17fe77a9e49cfceec3ae01feeecd2652a
Time: 2018-02-20
Author: mjcollier@gmail.com
File Name: faig.py
Class Name:
Method Name:


Project Name: tg12/FAIG
Commit Name: 0b0bf6e989fdad2d12263ca9cbf80bba9dd4fe30
Time: 2018-02-27
Author: tg12@users.noreply.github.com
File Name: faig.py
Class Name:
Method Name: