I need help to generate BIC values

3 visualizaciones (últimos 30 días)
Victor Wedia Sadongo
Victor Wedia Sadongo el 28 de Nov. de 2022
Comentada: Victor Wedia Sadongo el 1 de Sept. de 2023
I am stuck with wrtiting a code that can generate BIC vrs number of components plot from an excel file. I am wondering if anyone has experience and can share with me the code or any clue.

Respuesta aceptada

Karanjot
Karanjot el 1 de Sept. de 2023
Hi Victor,
I understand that you want to generate Bayesian information criterion values for a given excel file and further plot them with number of components.
Please follow the below steps to do so:
1. Import the file to a table ‘T’ using the “readtable” function.
T = readtable('fileName.xlsx');
2. Calculate the BIC of each estimated model using “aicbic” function. Specify the sample size ‘numObs’, which is required for computing the BIC.
[~,bic] = aicbic(logL,numParam,numObs)
You can refer to the below documentation to know more about the “aicbic” function:
3. Plot the BIC and number of components, you can use the “bar” function to plot them as bar chart.
bar(bic,numComponents)
MATLAB offers various functions for plotting data, you may explore other options
I hope this helps!
Regards,
Karanjot Singh
  1 comentario
Victor Wedia Sadongo
Victor Wedia Sadongo el 1 de Sept. de 2023
thanks, i think it should work but i already figureout using Gaussian Mixture Models function.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Logical en Help Center y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by