Evaluation of lung mechanics is the primary component for designing lung protective optimal ventilation strategies. This paper presents a machine learning approach for bedside assessment of respiratory resistance (R) and compliance (C). We develop machine learning algorithms to track flow rate and airway pressure and estimate R and C continuously and in real-time. An experimental study is conducted, by connecting a pressure control ventilator to a test lung that simulates various R and C values, to gather sensor data for validation of the devised algorithms. We develop supervised learning algorithms based on decision tree, decision table, and Support Vector Machine (SVM) techniques to predict R and C values. Our experimental results demonstrate that the proposed algorithms achieve 90.3%, 93.1%, and 63.9% accuracy in assessing respiratory R and C using decision table, decision tree, and SVM, respectively. These results along with our ability to estimate R and C with 99.4% accuracy using a linear regression model demonstrate the potential of the proposed approach for constructing a new generation of ventilation technologies that leverage novel computational models to control their underlying parameters for personalized healthcare and context-aware interventions.