pandas_ml.skaccessors package

Submodules

class pandas_ml.skaccessors.base.Bunch

Bases: object

class pandas_ml.skaccessors.cluster.ClusterMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.cluster.

affinity_propagation(*args, **kwargs)

Call sklearn.cluster.affinity_propagation using automatic mapping.

  • S: ModelFrame.data
bicluster

Property to access sklearn.cluster.bicluster

dbscan(*args, **kwargs)

Call sklearn.cluster.dbscan using automatic mapping.

  • X: ModelFrame.data
k_means(n_clusters, *args, **kwargs)

Call sklearn.cluster.k_means using automatic mapping.

  • X: ModelFrame.data
mean_shift(*args, **kwargs)

Call sklearn.cluster.mean_shift using automatic mapping.

  • X: ModelFrame.data
spectral_clustering(*args, **kwargs)

Call sklearn.cluster.spectral_clustering using automatic mapping.

  • affinity: ModelFrame.data
class pandas_ml.skaccessors.covariance.CovarianceMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.covariance.

empirical_covariance(*args, **kwargs)

Call sklearn.covariance.empirical_covariance using automatic mapping.

  • X: ModelFrame.data
ledoit_wolf(*args, **kwargs)

Call sklearn.covariance.ledoit_wolf using automatic mapping.

  • X: ModelFrame.data
oas(*args, **kwargs)

Call sklearn.covariance.oas using automatic mapping.

  • X: ModelFrame.data
class pandas_ml.skaccessors.cross_decomposition.CrossDecompositionMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.cross_decomposition.

class pandas_ml.skaccessors.cross_validation.CrossValidationMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Deprecated. Accessor to sklearn.cross_validation.

StratifiedShuffleSplit(*args, **kwargs)

Instanciate sklearn.cross_validation.StratifiedShuffleSplit using automatic mapping.

  • y: ModelFrame.target
check_cv(cv, *args, **kwargs)

Call sklearn.cross_validation.check_cv using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
cross_val_score(estimator, *args, **kwargs)

Call sklearn.cross_validation.cross_val_score using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
iterate(cv, reset_index=False)

Generate ModelFrame using iterators for cross validation

Parameters:

cv : cross validation iterator

reset_index : bool

logical value whether to reset index, default False

Returns:

generated : generator of ModelFrame

permutation_test_score(estimator, *args, **kwargs)

Call sklearn.cross_validation.permutation_test_score using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
train_test_split(reset_index=False, *args, **kwargs)

Call sklearn.cross_validation.train_test_split using automatic mapping.

Parameters:

reset_index : bool

logical value whether to reset index, default False

kwargs : keywords passed to cross_validation.train_test_split

Returns:

train, test : tuple of ModelFrame

class pandas_ml.skaccessors.decomposition.DecompositionMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.decomposition.

dict_learning(n_components, alpha, *args, **kwargs)

Call sklearn.decomposition.dict_learning using automatic mapping.

  • X: ModelFrame.data
dict_learning_online(*args, **kwargs)

Call sklearn.decomposition.dict_learning_online using automatic mapping.

  • X: ModelFrame.data
fastica(*args, **kwargs)

Call sklearn.decomposition.fastica using automatic mapping.

  • X: ModelFrame.data
sparse_encode(dictionary, *args, **kwargs)

Call sklearn.decomposition.sparce_encode using automatic mapping.

  • X: ModelFrame.data
class pandas_ml.skaccessors.ensemble.EnsembleMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.ensemble.

partial_dependence

Property to access sklearn.ensemble.partial_dependence

class pandas_ml.skaccessors.ensemble.PartialDependenceMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

partial_dependence(gbrt, target_variables, **kwargs)

Call sklearn.ensemble.partial_dependence using automatic mapping.

  • X: ModelFrame.data
plot_partial_dependence(gbrt, features, **kwargs)

Call sklearn.ensemble.plot_partial_dependence using automatic mapping.

  • X: ModelFrame.data
class pandas_ml.skaccessors.feature_extraction.FeatureExtractionMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.feature_extraction.

image

Property to access sklearn.feature_extraction.image

text

Property to access sklearn.feature_extraction.text

class pandas_ml.skaccessors.feature_selection.FeatureSelectionMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.feature_selection.

class pandas_ml.skaccessors.gaussian_process.GaussianProcessMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.gaussian_process.

correlation_models

Property to access sklearn.gaussian_process.correlation_models

regression_models

Property to access sklearn.gaussian_process.regression_models

class pandas_ml.skaccessors.gaussian_process.RegressionModelsMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

class pandas_ml.skaccessors.grid_search.GridSearchMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Deprecated. Accessor to sklearn.grid_search.

describe(estimator)

Describe grid search results

Parameters:estimator : fitted grid search estimator
Returns:described : ModelFrame
class pandas_ml.skaccessors.isotonic.IsotonicMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.isotonic.

IsotonicRegression

sklearn.isotonic.IsotonicRegression

check_increasing(*args, **kwargs)

Call sklearn.isotonic.check_increasing using automatic mapping.

  • x: ModelFrame.index
  • y: ModelFrame.target
isotonic_regression(*args, **kwargs)

Call sklearn.isotonic.isotonic_regression using automatic mapping.

  • y: ModelFrame.target
class pandas_ml.skaccessors.learning_curve.LearningCurveMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Deprecated. Accessor to sklearn.learning_curve.

learning_curve(estimator, *args, **kwargs)

Call sklearn.lerning_curve.learning_curve using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
validation_curve(estimator, param_name, param_range, *args, **kwargs)

Call sklearn.learning_curve.validation_curve using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
class pandas_ml.skaccessors.linear_model.LinearModelMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.linear_model.

enet_path(*args, **kwargs)

Call sklearn.linear_model.enet_path using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
lars_path(*args, **kwargs)

Call sklearn.linear_model.lars_path using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
lasso_path(*args, **kwargs)

Call sklearn.linear_model.lasso_path using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
lasso_stability_path(*args, **kwargs)

Call sklearn.linear_model.lasso_stability_path using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
orthogonal_mp_gram(*args, **kwargs)

Call sklearn.linear_model.orthogonal_mp_gram using automatic mapping.

  • Gram: ModelFrame.data.T.dot(ModelFrame.data)
  • Xy: ModelFrame.data.T.dot(ModelFrame.target)
class pandas_ml.skaccessors.manifold.ManifoldMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.manifold.

locally_linear_embedding(n_neighbors, n_components, *args, **kwargs)

Call sklearn.manifold.locally_linear_embedding using automatic mapping.

  • X: ModelFrame.data
spectral_embedding(*args, **kwargs)

Call sklearn.manifold.spectral_embedding using automatic mapping.

  • adjacency: ModelFrame.data
class pandas_ml.skaccessors.metrics.MetricsMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.metrics.

auc(kind='roc', reorder=False, **kwargs)

Calcurate AUC of ROC curve or precision recall curve

Parameters:kind : {‘roc’, ‘precision_recall_curve’}
Returns:float : AUC
average_precision_score(*args, **kwargs)

Call sklearn.metrics.average_precision_score using automatic mapping.

  • y_true: ModelFrame.target
  • y_score: ModelFrame.decision
confusion_matrix(*args, **kwargs)

Call sklearn.metrics.confusion_matrix using automatic mapping.

  • y_true: ModelFrame.target
  • y_pred: ModelFrame.predicted
consensus_score(*args, **kwargs)

Not implemented

f1_score(*args, **kwargs)

Call sklearn.metrics.f1_score using automatic mapping.

  • y_true: ModelFrame.target
  • y_pred: ModelFrame.predicted
fbeta_score(beta, *args, **kwargs)

Call sklearn.metrics.fbeta_score using automatic mapping.

  • y_true: ModelFrame.target
  • y_pred: ModelFrame.predicted
hinge_loss(*args, **kwargs)

Call sklearn.metrics.hinge_loss using automatic mapping.

  • y_true: ModelFrame.target
  • y_pred_decision: ModelFrame.decision
log_loss(*args, **kwargs)

Call sklearn.metrics.log_loss using automatic mapping.

  • y_true: ModelFrame.target
  • y_pred: ModelFrame.proba
pairwise

Not implemented

precision_recall_curve(*args, **kwargs)

Call sklearn.metrics.precision_recall_curve using automatic mapping.

  • y_true: ModelFrame.target
  • y_probas_pred: ModelFrame.decision
precision_recall_fscore_support(*args, **kwargs)

Call sklearn.metrics.precision_recall_fscore_support using automatic mapping.

  • y_true: ModelFrame.target
  • y_pred: ModelFrame.predicted
precision_score(*args, **kwargs)

Call sklearn.metrics.precision_score using automatic mapping.

  • y_true: ModelFrame.target
  • y_pred: ModelFrame.predicted
recall_score(*args, **kwargs)

Call sklearn.metrics.recall_score using automatic mapping.

  • y_true: ModelFrame.target
  • y_true: ModelFrame.predicted
roc_auc_score(*args, **kwargs)

Call sklearn.metrics.roc_auc_score using automatic mapping.

  • y_true: ModelFrame.target
  • y_score: ModelFrame.decision
roc_curve(*args, **kwargs)

Call sklearn.metrics.roc_curve using automatic mapping.

  • y_true: ModelFrame.target
  • y_score: ModelFrame.decision
silhouette_samples(*args, **kwargs)

Call sklearn.metrics.silhouette_samples using automatic mapping.

  • X: ModelFrame.data
  • labels: ModelFrame.predicted
silhouette_score(*args, **kwargs)

Call sklearn.metrics.silhouette_score using automatic mapping.

  • X: ModelFrame.data
  • labels: ModelFrame.predicted
class pandas_ml.skaccessors.model_selection.ModelSelectionMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.model_selection.

StratifiedShuffleSplit(*args, **kwargs)

Instanciate sklearn.cross_validation.StratifiedShuffleSplit using automatic mapping.

  • y: ModelFrame.target
check_cv(cv, *args, **kwargs)

Call sklearn.cross_validation.check_cv using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
cross_val_score(estimator, *args, **kwargs)

Call sklearn.cross_validation.cross_val_score using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
describe(estimator)

Describe grid search results

Parameters:estimator : fitted grid search estimator
Returns:described : ModelFrame
iterate(cv, reset_index=False)

deprecated. Use .split

learning_curve(estimator, *args, **kwargs)

Call sklearn.lerning_curve.learning_curve using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
permutation_test_score(estimator, *args, **kwargs)

Call sklearn.cross_validation.permutation_test_score using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
split(cv, reset_index=False)

Generate ModelFrame using iterators for cross validation

Parameters:

cv : cross validation iterator

reset_index : bool

logical value whether to reset index, default False

Returns:

generated : generator of ModelFrame

train_test_split(reset_index=False, *args, **kwargs)

Call sklearn.cross_validation.train_test_split using automatic mapping.

Parameters:

reset_index : bool

logical value whether to reset index, default False

kwargs : keywords passed to cross_validation.train_test_split

Returns:

train, test : tuple of ModelFrame

validation_curve(estimator, param_name, param_range, *args, **kwargs)

Call sklearn.learning_curve.validation_curve using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
class pandas_ml.skaccessors.neighbors.NeighborsMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.neighbors.

class pandas_ml.skaccessors.pipeline.PipelineMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.pipeline.

make_pipeline

sklearn.pipeline.make_pipeline

make_union

sklearn.pipeline.make_union

class pandas_ml.skaccessors.preprocessing.PreprocessingMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.preprocessing.

add_dummy_feature(value=1.0)

Call sklearn.preprocessing.add_dummy_feature using automatic mapping.

  • X: ModelFrame.data
class pandas_ml.skaccessors.svm.SVMMethods(df, module_name=None, attrs=None)

Bases: pandas_ml.core.accessor._AccessorMethods

Accessor to sklearn.svm.

l1_min_c(*args, **kwargs)

Call sklearn.svm.l1_min_c using automatic mapping.

  • X: ModelFrame.data
  • y: ModelFrame.target
liblinear

Not implemented

libsvm

Not implemented

libsvm_sparse

Not implemented

Module contents