Submit
Path:
~
/
/
proc
/
thread-self
/
root
/
opt
/
alt
/
python35
/
lib64
/
python3.5
/
site-packages
/
sklearn
/
cluster
/
__pycache__
/
File Content:
_feature_agglomeration.cpython-35.pyc
��(X� � @ s\ d Z d d l Z d d l m Z d d l m Z d d l m Z Gd d � d e � Z d S) zY Feature agglomeration. Base classes and functions for performing feature agglomeration. � N� )�TransformerMixin)�check_array)�check_is_fittedc @ s7 e Z d Z d Z e j Z d d � Z d d � Z d S)�AgglomerationTransformzG A class for feature agglomeration via the transform interface c C s� t | d � | j } t | � } g } t | j � | j d k rP t d � � xL t j | j � D]8 } | j | | d d � | j | k f d d �� qc Wt j | � j S)a� Transform a new matrix using the built clustering Parameters ---------- X : array-like, shape = [n_samples, n_features] or [n_features] A M by N array of M observations in N dimensions or a length M array of M one-dimensional observations. Returns ------- Y : array, shape = [n_samples, n_clusters] or [n_clusters] The pooled values for each feature cluster. �labels_� z9X has a different number of features than during fitting.NZaxis)r �pooling_funcr �lenr �shape� ValueError�np�unique�append�array�T)�self�Xr ZnX�l� r �/_feature_agglomeration.py� transform s 6z AgglomerationTransform.transformc C s9 t | d � t j | j d d �\ } } | d | f S)a' Inverse the transformation. Return a vector of size nb_features with the values of Xred assigned to each group of features Parameters ---------- Xred : array-like, shape=[n_samples, n_clusters] or [n_clusters,] The values to be assigned to each cluster of samples Returns ------- X : array, shape=[n_samples, n_features] or [n_features] A vector of size n_samples with the values of Xred assigned to each of the cluster of samples. r Zreturn_inverseT.)r r r r )r ZXredZunilZinverser r r �inverse_transform4 s z(AgglomerationTransform.inverse_transformN) �__name__� __module__�__qualname__�__doc__r Zmeanr r r r r r r r s r ) r Znumpyr �baser Zutilsr Zutils.validationr r r r r r �<module> s
Edit
Rename
Chmod
Delete
FILE
FOLDER
Name
Size
Permission
Action
__init__.cpython-35.opt-1.pyc
1160 bytes
0644
__init__.cpython-35.pyc
1160 bytes
0644
_feature_agglomeration.cpython-35.opt-1.pyc
2478 bytes
0644
_feature_agglomeration.cpython-35.pyc
2478 bytes
0644
affinity_propagation_.cpython-35.opt-1.pyc
9332 bytes
0644
affinity_propagation_.cpython-35.pyc
9332 bytes
0644
bicluster.cpython-35.opt-1.pyc
17924 bytes
0644
bicluster.cpython-35.pyc
17924 bytes
0644
birch.cpython-35.opt-1.pyc
17712 bytes
0644
birch.cpython-35.pyc
17712 bytes
0644
dbscan_.cpython-35.opt-1.pyc
11471 bytes
0644
dbscan_.cpython-35.pyc
11471 bytes
0644
hierarchical.cpython-35.opt-1.pyc
26136 bytes
0644
hierarchical.cpython-35.pyc
26172 bytes
0644
k_means_.cpython-35.opt-1.pyc
43828 bytes
0644
k_means_.cpython-35.pyc
43903 bytes
0644
mean_shift_.cpython-35.opt-1.pyc
14364 bytes
0644
mean_shift_.cpython-35.pyc
14364 bytes
0644
setup.cpython-35.opt-1.pyc
1312 bytes
0644
setup.cpython-35.pyc
1312 bytes
0644
spectral.cpython-35.opt-1.pyc
15802 bytes
0644
spectral.cpython-35.pyc
15802 bytes
0644
N4ST4R_ID | Naxtarrr