npac_detector.machine_learning.ML ================================= .. py:module:: npac_detector.machine_learning.ML Attributes ---------- .. autoapisummary:: npac_detector.machine_learning.ML.chemin npac_detector.machine_learning.ML.folder_path npac_detector.machine_learning.ML.file_paths npac_detector.machine_learning.ML.layer_nb npac_detector.machine_learning.ML.X_events npac_detector.machine_learning.ML.df_event npac_detector.machine_learning.ML.images npac_detector.machine_learning.ML.images npac_detector.machine_learning.ML.input_shape npac_detector.machine_learning.ML.latent_dim npac_detector.machine_learning.ML.images npac_detector.machine_learning.ML.images npac_detector.machine_learning.ML.batch_size npac_detector.machine_learning.ML.epochs npac_detector.machine_learning.ML.autoencoder npac_detector.machine_learning.ML.image_input npac_detector.machine_learning.ML.image_input npac_detector.machine_learning.ML.reconstructed npac_detector.machine_learning.ML.reconstructed npac_detector.machine_learning.ML.im1 npac_detector.machine_learning.ML.cbar1 npac_detector.machine_learning.ML.im2 npac_detector.machine_learning.ML.cbar2 Functions --------- .. autoapisummary:: npac_detector.machine_learning.ML.event_hits_to_image npac_detector.machine_learning.ML.build_autoencoder Module Contents --------------- .. py:data:: chemin .. py:data:: folder_path :value: '/data/pion_1Gev_noShower/' .. py:data:: file_paths .. py:function:: event_hits_to_image(df: pandas.DataFrame, n_layers=7, x_size=400, y_size=400) -> numpy.array Converts the hits of a dataframe into a 3D numpy array :param df: Input dataframe :param n_layers: Number of layers in the detector :param x_size: Number of pixels along x :param y_size: Number of pixel along y :type n_layers: int :type x_size: int :type y_size: int :return: Array of dimension (n_layers,x_size,y_size) with take the energy as the value .. py:data:: layer_nb :value: 0 .. py:data:: X_events :value: [] .. py:data:: df_event :value: None .. py:data:: images .. py:data:: images .. py:data:: input_shape .. py:data:: latent_dim :value: 64 .. py:function:: build_autoencoder(dim: int) This functions builds an autoencoder with a convulution network :param dim: latent dimension of the encoder :return: Autencoder .. py:data:: images .. py:data:: images .. py:data:: batch_size :value: 32 .. py:data:: epochs :value: 100 .. py:data:: autoencoder .. py:data:: image_input .. py:data:: image_input .. py:data:: reconstructed .. py:data:: reconstructed .. py:data:: im1 .. py:data:: cbar1 .. py:data:: im2 .. py:data:: cbar2