Questions tagged [linear-discriminant]

103 questions
0
votes
0 answers

Linear Discriminant Analysis for Multiclass Dimensionality Reduction

I wanted to run LDA for my multiclass data which consist of 3 classes. I read that for multiclass the dimensions are reduced based on the number of classes (C), eg; C-1. But I have no idea how to alter my code. I have this code which I use to run…
0
votes
0 answers

Discriminant Correspondence Analysis - Nominal Data as Input or Integer Data as Input?

Here's where I'm getting the definition of Discriminant Correspondence Analysis from: https://www.semanticscholar.org/paper/Discriminant-Correspondence-Analysis-Abdi/55b6fa9ad5c3fae17cd7123656556abbadf5deb6 I'd like to use Discriminant…
0
votes
1 answer

Output of a function in R with a list (lda model, ggplot, dataframe)

I am struggling on how to get an output of a function in R I am creating with a list of elements. Apparently it is simple, however, I cannot get into that. I checked different questions in SO but no result. This might be an easy question and…
antecessor
  • 2,688
  • 6
  • 29
  • 61
0
votes
0 answers

R: Is it possible to override MASS lda distance function to use Euclidean Distance?

I think the lda function in R's MASS library uses the Mahalanobis distance function. Is it possible to force the lda function to use Euclidean distance and Manhatten distance instead? It would make it much easier for students to visualize / verify…
Bill Qualls
  • 397
  • 1
  • 7
  • 20
0
votes
0 answers

Discriminant analysis, but only determining probability of belonging to one population?

I want to determine if a data point belongs to a population. So discriminant analysis will determine how likely it is between multiple (2+) populations. But if someone asks if their sample is part of the population, I would like to test based on the…
Schatzi121
  • 73
  • 1
  • 7
0
votes
0 answers

Discriminant analysis, but only one population?

So if I have a dataset with many variables (x,y,z for each sample), and then I introduce a new data point, what statistical test in R can I do to check the probability that the new data point belongs to the original population? x <-…
Schatzi121
  • 73
  • 1
  • 7
0
votes
0 answers

Posterior probabilities of belonging to class k in MASS::lda() are different from the ones i am computing. Why?

I want to compute the posterior probabilities within the linear discriminant analysis framework, to choose a class with maximum posterior probability given X. I got the results provided by the function MASS::lda(). Now i want to compute these…
maluicr
  • 37
  • 6
0
votes
0 answers

Discriminant Analysis when your data is not normally distributed

I want to implement the method Discriminant Analysis but none of the variables of my dataset is normally distributed.So, I can not implement LDA or QDA. I have heard that I can implement Discriminant Analysis based on the likelihood of the…
Billy
  • 27
  • 7
0
votes
0 answers

R is changing my order when using lda() and predict()

I'm trying to double check that the Linear Discriminant Analysis function is doing what I think it is, and that the associated model lines up. I create my data frame, run it through lda() and predict() and it changes the order in some way I don't…
0
votes
1 answer

How to make predictions using an LDA (Linear discriminant analysis) model in R

as the title suggests I am trying to make predictions using an LDA model in R. I have two sets of data that I'm working with: the first set is a series of entries associated with 16 predictor variables and 1 outcome variable (the outcome variable…
George96
  • 1
  • 1
0
votes
1 answer

Classification problem error using linear discriminant analysis

Hi am trying to implement the LInear Discriminant Analysis module for a project but am getting stuck here is the git repo : linear discriminant analysis: linear discriminant analysis the code : import numpy as np class lineardiscriminantanalysis…
PX374
  • 33
  • 6
0
votes
1 answer

Why in LDA, n-components doesn't works properly?

I tried to use LDA and find a 3-channel output. But its output has just 2 channels. from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA x = [] y = [] for i in range(len(img)): for j in range(len(img[0])): …
0
votes
0 answers

My data can be approximated with Normal mixture. How can I find the reasons and explain this behaviour?

I use DeLonge method to compare two ROC AUCS. The result of it is Z-score. Both ROC AUCs obtained from LDA (linear discriminant analysis) from sklearn package. The first one uses eigen solver inside LDA and the second one uses svd solver. The dotted…
0
votes
1 answer

Linear discriminant Analysis Sklearn

I’m running LDA on a dataset and the outcome was good across all metrics. However I can’t seem to extract the top features or loadings like I can for PCA. Is anyone familiar with extracting top features / loadings from LDA when using sklearn…
Ed_
  • 69
  • 8
0
votes
1 answer

NotImplementedError: shrinkage not supported

I'm running this code and I got an error witht the fit function from sklearn.discriminant_analysis import LinearDiscriminantAnalysis lda = LinearDiscriminantAnalysis(shrinkage='auto') lda.fit(np.random.rand(3,2),np.random.randint((1,1,1))) Here is…