sergeyk / vislab

Set of modules and datasets for visual recognition.
http://sergeykarayev.com/vislab/
Other
124 stars 67 forks source link

run_DARTS fails on predict stage #17

Closed taras-sereda closed 9 years ago

taras-sereda commented 9 years ago

Hi, Sergey.

I have one question regarding this part of code in run_DARTS.m:

[~, ~, val_dec_values] = predict(val_labels, val_data.betas, model, '-b 0', 'col');

while executing predict it fails with:

predict(val_labels, val_data.betas, model, '-b 0', 'col'); Error using predict (line 84) Systems of double class cannot be used with the "predict" command. Convert the system to an identified model first, such as by using the "idss" command.

model has the following structure

>> model

model = 

    Parameters: 2
      nr_class: 57
    nr_feature: 100000
          bias: -1
         Label: [57x1 double]
             w: [57x100000 double]

>> numel(val_labels)

ans =

        2850
>> numel(val_data.betas)

ans =

   285000000

What exactly should be done to avoid this issue?

Thanks in advance. Regards. Taras.

taras-sereda commented 9 years ago

issue resolved. Thanks for attention.

hizhangp commented 9 years ago

Hi, Taras I also meet this problem, how did you solve this problem? Thanks a lot.

taras-sereda commented 9 years ago

Hi @hizhangp . Frankly I don't remember how I fixed this issue.... I haven't touched matlab version of DARTS for a long time so I can't provide you quick help. But if you are interested in Python implementation take a look at my repo: https://github.com/taras-sereda/DARTS It works fine. But you need to make a set of preprocessing steps to convert some matlab data structures as prepared input for run DARTS in Python. If you are interested, let me know, I'll add detailed readme how to run the code.

ChenQianPing commented 8 years ago

Hi, Taras I also meet this problem, how did you solve this problem? Thanks a lot.

ChenQianPing commented 8 years ago

Hello Taras,

I'm using Matlab R2013a and was able to train a regression tree using RegressionTree.fit(). However, when I used "predict(rtree, test_data)," I got the following error message:

Error using predict (line 85) Systems of classreg.learning.partition.RegressionPartitionedModel class cannot be used with the "predict" command. Convert the system to an identified model first, such as by using the "idss" command.

I believe using "predict" method confused a dynamic model estimation. Can you please tell me what was wrong?

NhutHuynh3107 commented 8 years ago

add line: addpath(......your liblinear here......); for example: addpath('C:\CS406\lib\liblinear-1.96\matlab');
it works for me