Skip to content

PridaLab/metast-tree

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

metast-tree

LFP analysis and classification of metastases

Load LFP data

The MATLAB function [trainingData, testData, trainingLines, testLines] = process_data(trainingDataRaw, testDataRaw).

  • Inputs

  • Output

    • trainingLines: name of the animal line of each row of the training sessions
    • testLines: name of the animal line of each row of the test sessions

Decision trees

Already trained decision trees are loaded in decision-trees/decision_trees.mat. They can be used to predict new data into sham, breast, melanoma or lung categories can be achieved with:

prediction = decisionTrees{iModel}.predict(trainingData.X);

Confusion matrix

The MATLAB function confusion_matrix(ytrue, ypred, classNames, <optional>) computes and plots a confusion matrix with predictions of all models.

  • Mandatory Inputs

    • ytrue: N x 1 vector of true classes
    • ypred: N x #models vector of predicted classes. Each column is prediction from a particular model
    • classNames: names of classes (e.g. {sham, breast, melanoma, lung})
  • Optional Inputs

    • title: plot title. None by default
    • cLims: color limits. Non by default
    • plotText: boolean indicating whether to show confusion matrix numbers. True by default
    • saveName: complete path for saving the confusion matrix. images/confusion_matrix.png by default
  • Optional Outputs

    • confMat: #classes x #classes confusion matrix.

Output example

alt text

About

LFP analysis and classification of metastases

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages