create a function to reads the file and separate it into training data and evaluation data based
Fantastic news! We've Found the answer you've been seeking!
Question:
create a function to reads the file and separate it into training data and evaluation data based on the split indicator. The function should return four lists:
- x_data, containing all reviews of the x set.
- x_label, containing all associated sentiment labels for the x_data.
- y_data, containing all reviews of the y set.
- y_lanbel, containing all associated sentiment lebels for the test data.
function should print on the console:
- positive reviews's number in the x set.
- negative reviews's number in the x set.
- positive reviews 's number in the evaluation set.
- negative reviews's in the evaluation set.
Related Book For
Holt McDougal Larson Geometry
ISBN: 9780547315171
1st Edition
Authors: Ron Larson, Laurie Boswell, Timothy D. Kanold, Lee Stiff
Posted Date: