Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cardea class predict functionality #90

Open
sarahmish opened this issue Apr 14, 2021 · 0 comments
Open

Cardea class predict functionality #90

sarahmish opened this issue Apr 14, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@sarahmish
Copy link
Collaborator

In reference to issue #85, we discover a new need of the predict function.

current support
The current version of the predict functionality only supports an intermediary input of a feature matrix cardea.predict(X) where X is a numpy array. However, there are many scenarios when this could not be the case.

new support
Assume new data is given to the user, how can they use the current API to get the predictions of this new data? We need to transform the new data into the intermediate representation used by the modeler. Sequence of transformations include:

  1. load the new data into an entityset
  2. use the same labeling function to generate a label per instance. When it comes to cutoff times, they will be decided based on the current real time.
  3. calculate the feature matrix for the new data using the previous features as seed

proposed changes

def predict(self, X: Union[str, np.ndarray, pd.DataFrame]) -> Union[np.ndarray, list]:
    """Get predictions from the cardea pipeline.

    Args:
        X (str, pandas.DataFrame or ndarray):
            Inputs to the pipeline. If string, it points to the data path.

    Returns:
        numpy.ndarray or list:
            Predictions to the input data.
    """
    if isinstance(X, str):
        pass # run the three steps
@sarahmish sarahmish added the enhancement New feature or request label Apr 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant