direpack.ppdire.ppdire.ppdire

class ppdire(projection_index, pi_arguments={}, n_components=1, trimming=0, alpha=1, optimizer='SLSQP', optimizer_options={'maxiter': 100000}, optimizer_constraints=None, regopt='OLS', center='mean', center_data=True, scale_data=True, whiten_data=False, square_pi=False, compression=False, copy=True, verbose=True, return_scaling_object=True)[source]

PPDIRE Projection Pursuit Dimension Reduction

The class allows for calculation of the projection pursuit optimization either through scipy.optimize or through the grid algorithm, native to this package. The class provides a very flexible way to access optimization of projection indices that can lead to either classical or robust dimension reduction. Optimization through scipy.optimize is much more efficient, yet it will only provide correct results for classical projection indices. The native grid algorithm should be used when the projection index involves order statistics of any kind, such as ranks, trimming, winsorizing, or empirical quantiles. The grid optimization algorithm for projection pursuit implemented here, was outlined in:

Filzmoser, P., Serneels, S., Croux, C. and Van Espen, P.J., Robust multivariate methods: The projection pursuit approach, in: From Data and Information Analysis to Knowledge Engineering, Spiliopoulou, M., Kruse, R., Borgelt, C., Nuernberger, A. and Gaul, W., eds., Springer Verlag, Berlin, Germany, 2006, pages 270–277.

Parameters

projection_index – dicomo and capi supplied in this package can both be used, but user defined projection indices can be processed

Attributes always provided
  • x_weights_: X block PPDIRE weighting vectors (usually denoted W)

  • x_loadings_: X block PPDIRE loading vectors (usually denoted P)

  • x_scores_: X block PPDIRE score vectors (usually denoted T)

  • x_ev_: X block explained variance per component

  • x_Rweights_: X block SIMPLS style weighting vectors (usually denoted R)

  • x_loc_: X block location estimate

  • x_sca_: X block scale estimate

  • crit_values_: vector of evaluated values for the optimization objective.

  • Maxobjf_: vector containing the optimized objective per component.

Attributes created when more than one block of data is provided
  • C_: vector of inner relationship between response and latent variables block

  • coef_: vector of regression coefficients, if second data block provided

  • intercept_: intercept

  • coef_scaled_: vector of scaled regression coefficients (when scaling option used)

  • intercept_scaled_: scaled intercept

  • residuals_: vector of regression residuals

  • y_ev_: y block explained variance

  • fitted_: fitted response

  • y_loc_: y location estimate

  • y_sca_: y scale estimate

Attributes created only when corresponding input flags are `True`
  • whitening_: whitened data matrix (usually denoted K)

  • mixing_: mixing matrix estimate

  • scaling_object_: scaling object from VersatileScaler

__init__(projection_index, pi_arguments={}, n_components=1, trimming=0, alpha=1, optimizer='SLSQP', optimizer_options={'maxiter': 100000}, optimizer_constraints=None, regopt='OLS', center='mean', center_data=True, scale_data=True, whiten_data=False, square_pi=False, compression=False, copy=True, verbose=True, return_scaling_object=True)[source]

Methods

__init__(projection_index[, pi_arguments, ...])

fit(X, *args, **kwargs)

Fit a projection pursuit dimension reduction model.

fit_transform(X[, y])

Fit to data, then transform it.

get_params([deep])

Get parameters for this estimator. :param deep: If True, will return the parameters for this estimator and contained subobjects that are estimators. :type deep: boolean, optional.

predict(Xn)

predicts the response on new data Xn

score(X, y[, sample_weight])

Return the coefficient of determination of the prediction.

set_params(**params)

Set the parameters of this estimator. Copied from ScikitLearn, adapted to avoid calling 'deep=True' :returns: * self * ------ * Copied from ScikitLlearn instead of imported to avoid 'deep=True'.

transform(Xn)

Computes the dimension reduction of the data Xn based on the fitted sudire model.

Attributes