{ "info": { "author": "Hadrien Lorenzo", "author_email": "hadrien.lorenzo.2015@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "=====================================\nMulti (& Mono) Data-Driven Sparse PLS\n=====================================\n\n\t*mddspls is the python light package of the data-driven sparse PLS algorithm*\n\nIn the high dimensional settings (large number of variables), one objective is to select the relevant variables and thus to reduce the dimension. That subspace selection is often managed with supervised tools. However, some data can be missing, compromising the validity of the sub-space selection. We propose a PLS, Partial Least Square, based method, called **dd-sPLS** for data-driven-sparse PLS, allowing jointly variable selection and subspace estimation while training and testing missing data imputation through a new algorithm called Koh-Lanta.\n\nIt contains one main class **mddspls** and one associated important method denote **predict** permitting to predict from a new dataset. The function called **perf_mddsPLS** permits to compute cross-validation.\n\nData simulation\n===============\nOne might be interested to simulate data and test the package through **regression** and **classification**. Here a spiked model is used::\n\n\t#!/usr/bin/env python\n\n\timport py_ddspls\n\timport numpy as np\n\timport sklearn.metrics as sklm\n\t\n\tn = 100\n\tR_model = 10\n\tR_X_Y = 2\n\tT = 10\n\tL = np.array(np.random.normal(0,1,n*R_model)).reshape((n,R_model))\n\n\tp_t = 20\n\tq = 5\n\n\tXs = {}\n\n\tfor t in range(T):\n\t\tOmega_1_2 = np.diag(np.random.uniform(0,1,R_model))\n\t\tu,s,vh = np.linalg.svd(np.array(np.random.normal(0,1,p_t*p_t)).reshape((p_t,p_t)))\n\t\tU_mod_T = vh[0:R_model,:]\n\t\tXs[t] = L@Omega_1_2@U_mod_T\n\n\tOmega_y_1_2 = np.diag(np.concatenate((np.ones(R_X_Y),np.zeros(R_model-R_X_Y))))\n\tu,s,vh = np.linalg.svd(np.array(np.random.normal(0,1,R_model*R_model)).reshape((R_model,R_model)))\n\tU_mod_T = vh[:,0:q]\n\tY = L@Omega_y_1_2@U_mod_T\n\n\tk_groups = 2\n\tY_transfor = Y[:,0]\n\tlolo = np.linspace(np.min(Y_transfor),np.max(Y_transfor),k_groups+1)\n\tY_bin = np.zeros(n)\n\tfor ii in range(n):\n\t\tfor k_i in range(k_groups):\n\t\t\tif (Y_transfor[ii]>=lolo[k_i])&(Y_transfor[ii]