2
$\begingroup$

I'm struggling to get an LDA in Orange 3.28 (GUI).

Using the good'ol iris dataset, loaded from the dataset widget: enter image description here

The data, as you can see, is loaded as it should and has "iris" set as target (is it the same thing as class by the way, I could not find the info ?)

enter image description here

The linear projection widget works for PCA and circular :

enter image description here

... but not for LDA: enter image description here

instead, I get an error to the effect that "y should be a 1d array, got an array of shape (150,0) instead".

What do I do wrong, and how can I get a LDA ?

Bonus question: help says that "This widget displays linear projections of class-labeled data". However I could not find references to "class labeled data" in the manual. The closest I found is the "create class" widget, that creates apparently a new categorical variable based on text. Is this the same as a "target" variable ? The data table widgets refers both to "target with 3 values" (in this case) and allows to "color by instance classes" - is a class same as a target variable, then? If not how is a class defined?

$\endgroup$
4
  • 1
    $\begingroup$ Welcome to DataScienceSE. I don't know Orange much but yes, "class" and "target" are the same thing. More precisely, the target is what one wants to predict in any supervised learning task (it can be either a categorical or numerical value) and the class is the same as target but only categorical (class = target of classification). Another name for "target" is "dependent variable". So "class-labeled data" is any data (like the iris dataset) which has a categorical variable used as target. If there is no target at all, then one can only use unsupervised methods such as clustering. $\endgroup$
    – Erwan
    Commented Mar 24, 2021 at 22:26
  • $\begingroup$ Ok. So, in principle, the LDA widget should work as I thought - did I run into a plain bug then ? $\endgroup$
    – jfmoyen
    Commented Mar 25, 2021 at 8:28
  • $\begingroup$ Well I don't know why it doesn't work, but most of the time when we think there is a bug there's actually another reason that we didn't find yet ;) Hopefully somebody knowledgeable will be able to help. $\endgroup$
    – Erwan
    Commented Mar 25, 2021 at 9:32
  • $\begingroup$ I realize that. Which is why I posted here first, rather than reporting the bug on github. As we all know the bug more often than not is in the chair-keyboard interface :-) $\endgroup$
    – jfmoyen
    Commented Mar 25, 2021 at 9:44

1 Answer 1

0
$\begingroup$

You've got the Iris column as a 'meta' instead of a target. One way to sort this out is to use the select columns widget and move 'iris' from metas to 'class'.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.