discrimintools.summaryMDA#
- discrimintools.summaryMDA(obj, digits=4, detailed=False, to_markdown=False, tablefmt='github', **kwargs)[source]#
-
Printing summaries of Mixed Discriminant Analysis model.
- Parameters:
-
digits (int, default = 4) – The number of decimal printed.
detailed (bool, default = False) – To print detailed summaries.
to_markdown (bool, default = False) – To print summaries in markdown-friendly format. Requires the tabulate. package.
tablefmt (str, default = “github”) – The table format.
**kwargs – additionals parameters. These parameters will be passed to tabulate.
- Return type:
-
NoneType
See also
summaryCANDISC-
Printing summaries of Canonical Discriminant Analysis model.
summaryCPLS-
Printing summaries of Partial Least Squares for Classification model.
summaryDA-
Printing summaries of Discriminant Analysis model.
summaryDiCA-
Printing summaries of Discriminant Correspondence Analysis model.
summaryDISCRIM-
Printing summaries of Discriminant Analysis (linear and quadratic) model.
summaryGFALDA-
Printing summaries of General Factor Analysis Linear Discriminant Analysis model.
summaryPLSDA-
Printing summaries of Partial Least Squares Discriminant Analysis model.
summaryPLSLDA-
Printing summaries of Partial Least Squares Linear Discriminant Analysis model.
summarySTEPDISC-
Printing summaries of Stepwise Discriminant Analysis model.
Examples
>>> from discrimintools.datasets import load_heart >>> from discrimintools import MDA, summaryMDA >>> D = load_heart("subset") # load training data >>> y, X = D["disease"], D.drop(columns=["disease"]) # split into X and y >>> clf = MDA(n_components=5) >>> clf.fit(X,y) MDA(n_components=5) >>> summaryMDA(clf) Mixed Discriminant Analysis - Results Importance of components: Eigenvalue Difference Proportion (%) Cumulative (%) Can1 3.5040 1.4985 25.0288 25.0288 Can2 2.0055 0.1059 14.3249 39.3536 Can3 1.8996 0.5750 13.5684 52.9220 Can4 1.3246 0.1522 9.4616 62.3837 Can5 1.1724 0.0681 8.3743 70.7580 Raw Canonical Coefficients: Can1 Can2 Can3 Can4 Can5 Constant -0.0059 0.2104 0.2151 -0.8402 -5.4678 age -0.0333 0.0137 0.0030 0.0189 0.0549 restbpress -0.0109 0.0047 0.0056 -0.0012 0.0297 max_hrate 0.0150 0.0020 0.0027 0.0007 -0.0121 asympt -0.7662 -0.3278 -0.4341 -0.0563 -0.5999 ... left_vent_hyper 0.1982 0.5016 1.7704 1.4714 -1.7099 normal 0.4200 0.4352 -1.7807 -0.1179 0.2904 st_t_wave_abnormality -0.5140 -0.5888 1.6832 -0.1457 -0.0045 no 0.9448 0.1881 0.2183 0.1125 0.1830 yes -0.9448 -0.1881 -0.2183 -0.1125 -0.1830 Projection functions coefficients: Can1 Can2 Can3 Can4 Can5 age -0.0892 0.0366 0.0081 0.0507 0.1472 restbpress -0.0634 0.0270 0.0322 -0.0067 0.1723 max_hrate 0.1190 0.0162 0.0218 0.0054 -0.0965 asympt -0.0957 -0.0410 -0.0542 -0.0070 -0.0750 atyp_angina 0.0676 0.0221 0.0450 -0.1487 0.0679 ... left_vent_hyper 0.0076 0.0192 0.0676 0.0562 -0.0653 normal 0.0392 0.0406 -0.1662 -0.0110 0.0271 st_t_wave_abnormality -0.0451 -0.0516 0.1475 -0.0128 -0.0004 no 0.1122 0.0224 0.0259 0.0134 0.0217 yes -0.1122 -0.0224 -0.0259 -0.0134 -0.0217