Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add some toy test data #4

Closed
magsol opened this issue Nov 16, 2015 · 5 comments
Closed

Add some toy test data #4

magsol opened this issue Nov 16, 2015 · 5 comments
Assignees

Comments

@magsol
Copy link
Member

magsol commented Nov 16, 2015

Need some test data to use as testing input for the prototype.

@MOJTABAFA
Copy link
Contributor

Dear Xiang
Whats the expected random range in following instruction of program ?
unsigned int myseed = (unsigned int) RAND_MAX * rand();

@MOJTABAFA MOJTABAFA reopened this Nov 20, 2015
@XiangLi-Shaun
Copy link

The range is (-1, 1) (note that it's open range). But the instruction:

unsigned int myseed = (unsigned int) RAND_MAX * rand();

is for generating the seed. Thanks.

@MOJTABAFA
Copy link
Contributor

Thanks , since there is no constant in Python for RAND_MAx , I already considered RAND_MAX as a constant value as :
RAND_MAX = 2147483647
and I converted your code as :

def stat_randVCT(vct_input, count_row ):
myseed = RAND_MAX * random.random()
for idx_row in range (count_row):
vct_input = 2*(random.random() / (RAND_MAX + 1.0))-1

@MOJTABAFA
Copy link
Contributor

Dear xiang :
in numpy module of python we can use 2 simple instructions for multiplying a vector on a matrix or multiplying 2 matrices . and we can easily code (op_vctbymtx and Op_mtxbyvct ) as follows :
"v = np.dot(S,u_old)"
"u_new = np.multiply(S,v)" or "u_new = np.dot(S,v)"

but I need to know more about the role of R , idxs_n and op_selectTopR . please explain me more about them,Thus I can convert them immediately after your explanations .

specially please explain me your goal about following instruction :
op_selectTopR( v, P, idxs_n, R )

Thanks again for your all cooperations

@XiangLi-Shaun
Copy link

op_selectTopR( v, P, idxs_n, R ) will select the top R number of elements from the input vector v (sparse vector with length P). The selected indices will be stored in idxs_n.

@magsol magsol closed this as completed Nov 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants