class_docstr: Learning Shapelets algorithm with cross-entropy loss.
  
  Parameters
  ----------
  n_shapelets_per_size : int or float (default = 0.2)
      Number of shapelets per size. If float, it represents
      a fraction of the number of timestamps and the number
      of shapelets per size is equal to
      ``ceil(n_shapelets_per_size * n_timestamps)``.
  
  min_shapelet_length : int or float (default = 0.1)
      Minimum length of the shapelets. If float, it represents
      a fraction of the number of timestamps and the minimum
      length of the shapelets per size is equal to
      ``ceil(min_shapelet_length * n_timestamps)``.
  
  shapelet_scale : int (default = 3)
      The different scales for the lengths of the shapelets.
      The lengths of the shapelets are equal to
      ``min_shapelet_length * np.arange(1, shapelet_scale + 1)``.
      The total number of shapelets (and features)
      is equal to ``n_shapelets_per_size * shapelet_scale``.
  
  penalty : 'l1' or 'l2' (default = 'l2')
      Used to specify the norm used in the penalization.
  
  tol : float (default = 1e-3)
      Relative tolerance for stopping criterion.
  
  C : float (default = 1000)
      Inverse of regularization strength. It must be a positive float.
      Smaller values specify stronger regularization.
  
  learning_rate : float (default = 1.)
      Learning rate for gradient descent optimization. It must be a positive
      float. Note that the learning rate will be automatically decreased
      if the loss function is not decreasing.
  
  max_iter : int (default = 1000)
      Maximum number of iterations for gradient descent algorithm.
  
  alpha : float (default = -100)
      Scaling term in the softmin function. The lower, the more precised
      the soft minimum will be. Default value should be good for
      standardized time series.
  
  fit_intercept : bool (default = True)
      Specifies if a constant (a.k.a. bias or intercept) should be
      added to the decision function.
  
  intercept_scaling : float (default = 1.)
      Scaling of the intercept. Only used if ``fit_intercept=True``.
  
  class_weight : dict, None or 'balanced' (default = None)
      Weights associated with classes in the form ``{class_label: weight}``.
      If not given, all classes are supposed to have unit weight.
      The "balanced" mode uses the values of y to automatically adjust
      weights inversely proportional to class frequencies in the input data
      as ``n_samples / (n_classes * np.bincount(y))``.
  
  verbose : int (default = 0)
      Controls the verbosity. It must be a non-negative integer.
      If positive, loss at each iteration is printed.
  
  random_state : None, int or RandomState instance (default = None)
      The seed of the pseudo random number generator to use when shuffling
      the data. If int, random_state is the seed used by the random number
      generator. If RandomState instance, random_state is the random number
      generator. If None, the random number generator is the RandomState
      instance used by `np.random`.
  
  Attributes
  ----------
  classes_ : array, shape = (n_classes,)
      An array of class labels known to the classifier.
  
  shapelets_ : array, shape = (n_shapelets,)
      Learned shapelets.
  
  coef_ : array, shape = (1, n_shapelets) or (n_classes, n_shapelets)
      Coefficients for each shapelet in the decision function.
  
  intercept_ : array, shape = (1,) or (n_classes,)
      Intercepts (a.k.a. biases) added to the decision function.
      If ``fit_intercept=False``, the intercepts are set to zero.
  
  n_iter_ : int
      Actual number of iterations.
  
  References
  ----------
  .. [1] J. Grabocka, N. Schilling, M. Wistuba and L. Schmidt-Thieme,
         "Learning Time-Series Shapelets". International Conference on Data
         Mining, 14, 392-401 (2014).
class_docstr_tok: ["Learning","Shapelets","algorithm","with","cross-entropy","loss",".","Parameters","--","--","--","--","--","n_shapelets_per_size",":","int","or","float","(","default","=","0.2",")","Number","of","shapelets","per","size",".","If","float",",","it","represents","a","fraction","of","the","number","of","timestamps","and","the","number","of","shapelets","per","size","is","equal","to","``","ceil","(","n_shapelets_per_size","*","n_timestamps",")","``",".","min_shapelet_length",":","int","or","float","(","default","=","0.1",")","Minimum","length","of","the","shapelets",".","If","float",",","it","represents","a","fraction","of","the","number","of","timestamps","and","the","minimum","length","of","the","shapelets","per","size","is","equal","to","``","ceil","(","min_shapelet_length","*","n_timestamps",")","``",".","shapelet_scale",":","int","(","default","=","3",")","The","different","scales","for","the","lengths","of","the","shapelets",".","The","lengths","of","the","shapelets","are","equal","to","``","min_shapelet_length","*","np.arange","(","1",",","shapelet_scale","+","1",")","``",".","The","total","number","of","shapelets","(","and","features",")","is","equal","to","``","n_shapelets_per_size","*","shapelet_scale","``",".","penalty",":","'l1","'","or","'l2","'","(","default","=","'l2","'",")","Used","to","specify","the","norm","used","in","the","penalization",".","tol",":","float","(","default","=","1e-3",")","Relative","tolerance","for","stopping","criterion",".","C",":","float","(","default","=","1000",")","Inverse","of","regularization","strength",".","It","must","be","a","positive","float",".","Smaller","values","specify","stronger","regularization",".","learning_rate",":","float","(","default","=","1",".",")","Learning","rate","for","gradient","descent","optimization",".","It","must","be","a","positive","float",".","Note","that","the","learning","rate","will","be","automatically","decreased","if","the","loss","function","is","not","decreasing",".","max_iter",":","int","(","default","=","1000",")","Maximum","number","of","iterations","for","gradient","descent","algorithm",".","alpha",":","float","(","default","=","-100",")","Scaling","term","in","the","softmin","function",".","The","lower",",","the","more","precised","the","soft","minimum","will","be",".","Default","value","should","be","good","for","standardized","time","series",".","fit_intercept",":","bool","(","default","=","True",")","Specifies","if","a","constant","(","a.k.a",".","bias","or","intercept",")","should","be","added","to","the","decision","function",".","intercept_scaling",":","float","(","default","=","1",".",")","Scaling","of","the","intercept",".","Only","used","if","``","fit_intercept=True","``",".","class_weight",":","dict",",","None","or","'balanced","'","(","default","=","None",")","Weights","associated","with","classes","in","the","form","``","{","class_label",":","weight","}","``",".","If","not","given",",","all","classes","are","supposed","to","have","unit","weight",".","The","``","balanced","''","mode","uses","the","values","of","y","to","automatically","adjust","weights","inversely","proportional","to","class","frequencies","in","the","input","data","as","``","n_samples","\/","(","n_classes","*","np.bincount","(","y",")",")","``",".","verbose",":","int","(","default","=","0",")","Controls","the","verbosity",".","It","must","be","a","non-negative","integer",".","If","positive",",","loss","at","each","iteration","is","printed",".","random_state",":","None",",","int","or","RandomState","instance","(","default","=","None",")","The","seed","of","the","pseudo","random","number","generator","to","use","when","shuffling","the","data",".","If","int",",","random_state","is","the","seed","used","by","the","random","number","generator",".","If","RandomState","instance",",","random_state","is","the","random","number","generator",".","If","None",",","the","random","number","generator","is","the","RandomState","instance","used","by","`","np.random","`",".","Attributes","--","--","--","--","--","classes_",":","array",",","shape","=","(","n_classes",",",")","An","array","of","class","labels","known","to","the","classifier",".","shapelets_",":","array",",","shape","=","(","n_shapelets",",",")","Learned","shapelets",".","coef_",":","array",",","shape","=","(","1",",","n_shapelets",")","or","(","n_classes",",","n_shapelets",")","Coefficients","for","each","shapelet","in","the","decision","function",".","intercept_",":","array",",","shape","=","(","1",",",")","or","(","n_classes",",",")","Intercepts","(","a.k.a",".","biases",")","added","to","the","decision","function",".","If","``","fit_intercept=False","``",",","the","intercepts","are","set","to","zero",".","n_iter_",":","int","Actual","number","of","iterations",".","References","--","--","--","--","--","..","[","1","]","J.","Grabocka",",","N.","Schilling",",","M.","Wistuba","and","L.","Schmidt-Thieme",",","``","Learning","Time-Series","Shapelets","''",".","International","Conference","on","Data","Mining",",","14",",","392-401","(","2014",")","."]
docstr: Probability estimates.
  
  Parameters
  ----------
  X : array-like of shape (n_samples, n_timestamps)
      Test samples.
  
  Returns
  -------
  T : array-like of shape (n_samples, n_classes)
      Probability of the samples for each class in the model,
      where classes are ordered as they are in ``self.classes_``.
docstr_tok: ["Probability","estimates",".","Parameters","--","--","--","--","--","X",":","array-like","of","shape","(","n_samples",",","n_timestamps",")","Test","samples",".","Returns","--","--","--","-","T",":","array-like","of","shape","(","n_samples",",","n_classes",")","Probability","of","the","samples","for","each","class","in","the","model",",","where","classes","are","ordered","as","they","are","in","``","self.classes_","``","."]
code: def predict_proba(self, X):
      """Probability estimates.
  
      Parameters
      ----------
      X : array-like of shape (n_samples, n_timestamps)
          Test samples.
  
      Returns
      -------
      T : array-like of shape (n_samples, n_classes)
          Probability of the samples for each class in the model,
          where classes are ordered as they are in ``self.classes_``.
  
      """
      X_new = self.decision_function(X)
      n_samples = X_new.shape[0]
      if len(self.classes_) == 2:
          proba = _expit(X_new)
          X_proba = np.c_[1 - proba, proba]
      else:
          X_proba = _softmax(X_new, n_samples, len(self.classes_))
      return X_proba
  
imports: from itertools import chain
  from math import ceil
  from numba import njit, prange
  import numpy
  from sklearn.base import BaseEstimator
  from sklearn.cluster import KMeans
  from sklearn.exceptions import ConvergenceWarning
  from sklearn.multiclass import OneVsOneClassifier, OneVsRestClassifier
  from sklearn.multiclass import _ovr_decision_function
  from sklearn.preprocessing import LabelBinarizer, LabelEncoder
  from sklearn.utils import compute_class_weight, check_array
  from sklearn.utils.validation import check_is_fitted, check_random_state, check_X_y, _check_sample_weight
  from sklearn.utils.multiclass import check_classification_targets
  import warnings
  from ..utils.utils import _windowed_view
  from ..base import UnivariateClassifierMixin
label_desc: Use image node_id 4 for calling the CrossEntropyLearningShapelets obj's underlying member method code with example usage: obj.predict_proba(X) and returns: X_proba