Comments (3)
Hi guys,
I had the same error than @harryhancock
After I have changed the syntax from:
x_train, x_val, y_train, y_val = caer.train_val_split(featureSet, labels, val_ratio=.2)
to
x_train, x_val, y_train, y_val = sklearn.model_selection.train_test_split(featureSet, labels, test_size=.2)
It has worked.
Thank you!
from opencv-course.
Use sklearn.model_selection.train_test_split(featureSet, labels, val_ratio=.2)
instead of caer.train_val_split()
. The latter function is deprecated in caer
.
So instead of this syntax (which was used in the course):
x_train, x_val, y_train, y_val = caer.train_val_split(featureSet, labels, val_ratio=.2)
use
x_train, x_val, y_train, y_val = sklearn.model_selection.train_test_split(featureSet, labels, val_ratio=.2)
from opencv-course.
That's great to hear @locorez! How about you @harryhancock? Did changing the syntax work for you?
from opencv-course.
Related Issues (20)
- (-215:Assertion failed) s >= 0 in function 'cv::setSize' HOT 8
- module 'sklearn' has no attribute 'model_selection' HOT 3
- why confidence value for face recognition always 0.0 HOT 2
- Face Recognition, AttributeError: module 'cv2.cv2' has no attribute 'face_LBPHFaceRecognizer' HOT 2
- Program error HOT 2
- Contribute HOT 1
- Underestimate the number of faces HOT 1
- your scipt is not working sinse the standards all changed and im stuck! HOT 3
- Can't obtain more than 30% accuracy in the training model
- VSCode suggestions from capture variable HOT 2
- module 'caer' has no attribute 'reshape'
- Execution of the simpsons script breaks HOT 12
- Error in Capstone Project Code
- Can't find file Boston.jpg HOT 4
- ValueError: Traceback (most recent call last) HOT 2
- ValueError: decay is deprecated in the new Keras optimizer, pleasecheck the docstring for valid arguments, or use the legacy optimizer, e.g., tf.keras.optimizers.legacy.SGD.
- Unable to create model HOT 4
- produces sequential model and error using model.fit method HOT 1
- execution of line 63 produces error HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from opencv-course.