FastStructure

156 views
Skip to first unread message

Olivia Marcuzzi

unread,
Jun 8, 2023, 10:58:44 AM6/8/23
to structure-software
Hi,
I'm trying to use the chooseK.py algorithm. I have alredy runned the structure.py with K ranged from 2 to 10. Then, when I run chooseK the result is:

File "/home/olivia/fastStructure-master/chooseK.py", line 111, in <module>
    print "Model complexity that maximizes marginal likelihood = %d"%Ks[np.argmax(marginal_likelihoods)]
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 1103, in argmax
    return _wrapfunc(a, 'argmax', axis=axis, out=out)
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 66, in _wrapfunc
    return _wrapit(obj, method, *args, **kwds)
  File "/usr/local/lib/python2.7/dist-packages/numpy/core/fromnumeric.py", line 46, in _wrapit
    result = getattr(asarray(obj), method)(*args, **kwds)
ValueError: attempt to get argmax of an empty sequence

If you could help me, I don't know how to fix this error.


Thank you in advance,

Olivia

Vikram Chhatre

unread,
Jun 8, 2023, 10:59:41 AM6/8/23
to structure...@googlegroups.com
Show us your command and a listing of all the files you are calling from that command.

--
You received this message because you are subscribed to the Google Groups "structure-software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to structure-softw...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/structure-software/2ae3353a-953d-417d-9f95-d92354e2b3ebn%40googlegroups.com.

Olivia Marcuzzi

unread,
Jun 8, 2023, 11:29:36 AM6/8/23
to structure-software
I'm sorry, while I was searching the files I realized I made a mistake in the command.
I runned the chooseK again and got this results:
 - Model complexity that maximizes marginal likelihood = 10
 - Model components used to explain structure in data = 1
Does this result make sense? Since I have 13 populations (breeds) that are different even according to results in a PCA analysis and tree phylogeny.

Thank you for your quick response!!

Vikram Chhatre

unread,
Jun 8, 2023, 11:38:07 AM6/8/23
to structure...@googlegroups.com
Interpretation of results is dependent upon many factors. Output from chooseK being just one factor.

V

Reply all
Reply to author
Forward
0 new messages