Apply machine learning to predict discharging and risk of readmission based on medical data I am new to machine learning. I have a problem where I have to predict patients to be/not to be discharged using hospital data and depending on that prediction (i.e. if the patient is successfully discharged), I have to predict the risk of those patients being readmitted. I have created the feature set but the target class is missing from original dataset. I have provided a snapshot of the feature set. How to apply machine learning solution to this problem as one output will be used in the prediction of another output? Please help.

If you do the discharge decision based on human insights, you can add a column for the decision which is filled using an apply function which evaluates a hard-coded decision function.
import pandas as pd
patients = pd.DataFrame(...)

def categorize_discharge_patients(row):
  if row['max_temperature'] > 38: # or some other criterion
    return False
  else:
    return True

patients['discharge'] = patients.apply(categorize_discharge_patients, axis=1)

From this data frame, you can separate the discharged patients as follows
patients_discharge = patients.loc[patients['discharge']]

However, as @gunes already stated you can than cluster than your data, but the cluster do not necessarily differentiate between readmission or not, but they can find any relation in the data which allows a clustering, so you probably need more information for predicting the readmission. (Supervised learning on wikipedia)
