Skip to content

Commit

Permalink
test functions for data process modified
Browse files Browse the repository at this point in the history
  • Loading branch information
Yueningwang committed Feb 27, 2019
1 parent 710e98c commit c3bf978
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion neuralizer/tests/test_data_process.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@
import pandas as pd
import numpy as np
import data_process as dp
from data_process import *

def test_read_file():
X,Y = dp.read_file('test.tsv',["A","B"],"y")
assert (X == [[0,1],[3,2],[4,3]]),"The data of predictors is loaded wrong"
assert (Y == [0,1,5]),"data of Y has problems"

def test_data)info():
data = {"filename":"test.tsv","X_var":["A","B"],"Y_var":"y"}
X,Y,input_dim,output_dim = dp.data_info(data)
assert(input_dim == 2),"Dimension of input layer is not correct"
assert(output_dim == 1), "Dimension of output layer is not correct"

0 comments on commit c3bf978

Please sign in to comment.