class_docstr: Early Classification modelling for time series using the model
  presented in [1]_.
  
  Parameters
  ----------
  n_clusters : int
      Number of clusters to form.
  
  base_classifier : Estimator or None
      Estimator (instance) to be cloned and used for classifications.
      If None, the chosen classifier is a 1NN with Euclidean metric.
  
  min_t : int
      Earliest time at which a classification can be performed on a time
      series
  
  lamb : float
      Value of the hyper parameter lambda used during the computation of the
      cost function to evaluate the probability
      that a time series belongs to a cluster given the time series.
  
  cost_time_parameter : float
      Parameter of the cost function of time. This function is of the form :
      f(time) = time * cost_time_parameter
  
  random_state: int
      Random state of the base estimator
  
  Attributes
  --------------------
  
  classifiers_ : list
      A list containing all the classifiers trained for the model, that is,
      (maximum_time_stamp - min_t) elements.
  
  pyhatyck_ : array like of shape (maximum_time_stamp - min_t, n_cluster, __n_classes, __n_classes)
      Contains the probabilities of being classified as class y_hat given
      class y and cluster ck for a trained classifier. The penultimate
      dimension of the array is associated to the true
      class of the series and the last dimension to the predicted class.
  
  
  pyck_ : array like of shape (__n_classes, n_cluster)
      Contains the probabilities of being of true class y given a cluster ck
  
  X_fit_dims : tuple of the same shape as the training dataset
  
  
  Examples
  --------
  >>> dataset = to_time_series_dataset([[1, 2, 3, 4, 5, 6],
  ...                                   [1, 2, 3, 4, 5, 6],
  ...                                   [1, 2, 3, 4, 5, 6],
  ...                                   [1, 2, 3, 3, 2, 1],
  ...                                   [1, 2, 3, 3, 2, 1],
  ...                                   [1, 2, 3, 3, 2, 1],
  ...                                   [3, 2, 1, 1, 2, 3],
  ...                                   [3, 2, 1, 1, 2, 3]])
  >>> y = [0, 0, 0, 1, 1, 1, 0, 0]
  >>> model = NonMyopicEarlyClassifier(n_clusters=3, lamb=1000.,
  ...                                  cost_time_parameter=.1,
  ...                                  random_state=0)
  >>> model.fit(dataset, y)  # doctest: +ELLIPSIS
  NonMyopicEarlyClassifier(...)
  >>> print(type(model.classifiers_))
  <class 'dict'>
  >>> print(model.pyck_)
  [[0. 1. 1.]
   [1. 0. 0.]]
  >>> preds, pred_times = model.predict_class_and_earliness(dataset)
  >>> preds
  array([0, 0, 0, 1, 1, 1, 0, 0])
  >>> pred_times
  array([4, 4, 4, 4, 4, 4, 1, 1])
  >>> pred_probas, pred_times = model.predict_proba_and_earliness(dataset)
  >>> pred_probas
  array([[1., 0.],
         [1., 0.],
         [1., 0.],
         [0., 1.],
         [0., 1.],
         [0., 1.],
         [1., 0.],
         [1., 0.]])
  >>> pred_times
  array([4, 4, 4, 4, 4, 4, 1, 1])
  
  References
  ----------
  .. [1] A. Dachraoui, A. Bondu & A. Cornuejols. Early classification of time
     series as a non myopic sequential decision making problem.
     ECML/PKDD 2015
class_docstr_tok: ["Early","Classification","modelling","for","time","series","using","the","model","presented","in","[","1","]","_.","Parameters","--","--","--","--","--","n_clusters",":","int","Number","of","clusters","to","form",".","base_classifier",":","Estimator","or","None","Estimator","(","instance",")","to","be","cloned","and","used","for","classifications",".","If","None",",","the","chosen","classifier","is","a","1NN","with","Euclidean","metric",".","min_t",":","int","Earliest","time","at","which","a","classification","can","be","performed","on","a","time","series","lamb",":","float","Value","of","the","hyper","parameter","lambda","used","during","the","computation","of","the","cost","function","to","evaluate","the","probability","that","a","time","series","belongs","to","a","cluster","given","the","time","series",".","cost_time_parameter",":","float","Parameter","of","the","cost","function","of","time",".","This","function","is","of","the","form",":","f","(","time",")","=","time","*","cost_time_parameter","random_state",":","int","Random","state","of","the","base","estimator","Attributes","--","--","--","--","--","--","--","--","--","--","classifiers_",":","list","A","list","containing","all","the","classifiers","trained","for","the","model",",","that","is",",","(","maximum_time_stamp","-","min_t",")","elements",".","pyhatyck_",":","array","like","of","shape","(","maximum_time_stamp","-","min_t",",","n_cluster",",","__n_classes",",","__n_classes",")","Contains","the","probabilities","of","being","classified","as","class","y_hat","given","class","y","and","cluster","ck","for","a","trained","classifier",".","The","penultimate","dimension","of","the","array","is","associated","to","the","true","class","of","the","series","and","the","last","dimension","to","the","predicted","class",".","pyck_",":","array","like","of","shape","(","__n_classes",",","n_cluster",")","Contains","the","probabilities","of","being","of","true","class","y","given","a","cluster","ck","X_fit_dims",":","tuple","of","the","same","shape","as","the","training","dataset","Examples","--","--","--","--",">",">",">","dataset","=","to_time_series_dataset","(","[","[","1",",","2",",","3",",","4",",","5",",","6","]",",","...","[","1",",","2",",","3",",","4",",","5",",","6","]",",","...","[","1",",","2",",","3",",","4",",","5",",","6","]",",","...","[","1",",","2",",","3",",","3",",","2",",","1","]",",","...","[","1",",","2",",","3",",","3",",","2",",","1","]",",","...","[","1",",","2",",","3",",","3",",","2",",","1","]",",","...","[","3",",","2",",","1",",","1",",","2",",","3","]",",","...","[","3",",","2",",","1",",","1",",","2",",","3","]","]",")",">",">",">","y","=","[","0",",","0",",","0",",","1",",","1",",","1",",","0",",","0","]",">",">",">","model","=","NonMyopicEarlyClassifier","(","n_clusters=3",",","lamb=1000.",",","...","cost_time_parameter=.1",",","...","random_state=0",")",">",">",">","model.fit","(","dataset",",","y",")","#","doctest",":","+ELLIPSIS","NonMyopicEarlyClassifier","(","...",")",">",">",">","print","(","type","(","model.classifiers_",")",")","<","class","'dict","'",">",">",">",">","print","(","model.pyck_",")","[","[","0",".","1",".","1",".","]","[","1",".","0",".","0",".","]","]",">",">",">","preds",",","pred_times","=","model.predict_class_and_earliness","(","dataset",")",">",">",">","preds","array","(","[","0",",","0",",","0",",","1",",","1",",","1",",","0",",","0","]",")",">",">",">","pred_times","array","(","[","4",",","4",",","4",",","4",",","4",",","4",",","1",",","1","]",")",">",">",">","pred_probas",",","pred_times","=","model.predict_proba_and_earliness","(","dataset",")",">",">",">","pred_probas","array","(","[","[","1.",",","0",".","]",",","[","1.",",","0",".","]",",","[","1.",",","0",".","]",",","[","0.",",","1",".","]",",","[","0.",",","1",".","]",",","[","0.",",","1",".","]",",","[","1.",",","0",".","]",",","[","1.",",","0",".","]","]",")",">",">",">","pred_times","array","(","[","4",",","4",",","4",",","4",",","4",",","4",",","1",",","1","]",")","References","--","--","--","--","--","..","[","1","]","A.","Dachraoui",",","A.","Bondu","&","A.","Cornuejols",".","Early","classification","of","time","series","as","a","non","myopic","sequential","decision","making","problem",".","ECML\/PKDD","2015"]
docstr: Provide probability estimates as well as prediction timestamps.
  
  Prediction timestamps are timestamps at which a prediction is made in
  early classification setting.
  The returned estimates for all classes are ordered by the
  label of classes.
  
  Parameters
  ----------
  X : array-like of shape (n_series, n_timestamps, n_features)
      Vector to be scored, where `n_series` is the number of time series,
      `n_timestamps` is the number of timestamps in the series
      and `n_features` is the number of features recorded at each
      timestamp.
  
  Returns
  -------
  array-like of shape (n_series, n_classes)
      Probability of the sample for each class in the model,
      where classes are ordered as they are in ``self.classes_``.
  array-like of shape (n_series, )
      Prediction timestamps.
docstr_tok: ["Provide","probability","estimates","as","well","as","prediction","timestamps",".","Prediction","timestamps","are","timestamps","at","which","a","prediction","is","made","in","early","classification","setting",".","The","returned","estimates","for","all","classes","are","ordered","by","the","label","of","classes",".","Parameters","--","--","--","--","--","X",":","array-like","of","shape","(","n_series",",","n_timestamps",",","n_features",")","Vector","to","be","scored",",","where","`","n_series","`","is","the","number","of","time","series",",","`","n_timestamps","`","is","the","number","of","timestamps","in","the","series","and","`","n_features","`","is","the","number","of","features","recorded","at","each","timestamp",".","Returns","--","--","--","-","array-like","of","shape","(","n_series",",","n_classes",")","Probability","of","the","sample","for","each","class","in","the","model",",","where","classes","are","ordered","as","they","are","in","``","self.classes_","``",".","array-like","of","shape","(","n_series",",",")","Prediction","timestamps","."]
code: def predict_proba_and_earliness(self, X):
      """
      Provide probability estimates as well as prediction timestamps.
  
      Prediction timestamps are timestamps at which a prediction is made in
      early classification setting.
      The returned estimates for all classes are ordered by the
      label of classes.
  
      Parameters
      ----------
      X : array-like of shape (n_series, n_timestamps, n_features)
          Vector to be scored, where `n_series` is the number of time series,
          `n_timestamps` is the number of timestamps in the series
          and `n_features` is the number of features recorded at each
          timestamp.
  
      Returns
      -------
      array-like of shape (n_series, n_classes)
          Probability of the sample for each class in the model,
          where classes are ordered as they are in ``self.classes_``.
      array-like of shape (n_series, )
          Prediction timestamps.
      """
  
      X = check_array(X, allow_nd=True)
      check_is_fitted(self, "_X_fit_dims")
      X = check_dims(
          X, X_fit_dims=self._X_fit_dims, check_n_features_only=True
      )
      y_pred = []
      time_prediction = []
      for i in range(0, X.shape[0]):
          probas, t = self._predict_single_series_proba(X[i])
          y_pred.append(probas)
          time_prediction.append(t)
      return np.array(y_pred), np.array(time_prediction)
  
imports: from sklearn.metrics import confusion_matrix, accuracy_score
  from sklearn.base import ClassifierMixin, clone
  from sklearn.model_selection import train_test_split
  import numpy
  from scipy.sparse import coo_matrix
  from sklearn.utils import check_array
  from sklearn.utils.validation import check_is_fitted
  from ..utils import to_time_series_dataset, check_dims
  from ..neighbors import KNeighborsTimeSeriesClassifier
  from ..clustering import TimeSeriesKMeans
  from ..bases import TimeSeriesBaseEstimator
label_desc: Use image node_id 11 for calling the NonMyopicEarlyClassifier obj's underlying member method code with example usage: obj.predict_proba_and_earliness(X) and returns: np,  np