Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Cardea class `predict` functionality

Open
#90 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
numpy, pandas, python

Research direction

Start by reading the Cardea.predict entry point and the referenced issue #85 to understand the existing prediction flow. Done means accepting a data path as well as array or DataFrame input and performing the three listed transformations before returning predictions.

Written by the indexing model from the issue text.

Description

enhancement

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
Dominant language
Python
Stars
124
Forks
22
PR merge metrics
No merged PRs in 30d

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from MLBazaar/Cardea

All issues in MLBazaar/Cardea

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.