Skip to content

fixing the DeprecationWarning#2

Open
mcburton wants to merge 1 commit intotedunderwood:masterfrom
mcburton:patch-1
Open

fixing the DeprecationWarning#2
mcburton wants to merge 1 commit intotedunderwood:masterfrom
mcburton:patch-1

Conversation

@mcburton
Copy link

Running newmodel.predict_proba() gives the following error:

DeprecationWarning: Passing 1d arrays as data is deprecated in 0.17 and willraise ValueError in 0.19. Reshape your data either using X.reshape(-1, 1) if your data has a single feature or X.reshape(1, -1) if it contains a single sample.

The testset variable is a 1D array with an ambiguous shape (3200,), this fixes the warning by explicitly defining the shape (1,3200) [# samples, # features].

Running `newmodel.predict_proba()` gives the following error:
```
DeprecationWarning: Passing 1d arrays as data is deprecated in 0.17 and willraise ValueError in 0.19. Reshape your data either using X.reshape(-1, 1) if your data has a single feature or X.reshape(1, -1) if it contains a single sample.
```
The testset variable is a 1D array with an ambiguous shape (3200,), this fixes the warning by explicitly defining the shape (1,3200) [# samples, # features].
@tedunderwood
Copy link
Owner

Thanks, Matt -- I think I encountered this when I upgraded to 3.5 on a
different repo.

T

Ted Underwood
Professor of English
Liberal Arts and Sciences Centennial Scholar
University of Illinois, Urbana-Champaign

On Fri, Apr 29, 2016 at 3:26 AM, mcburton [email protected] wrote:

Running newmodel.predict_proba() gives the following error:

DeprecationWarning: Passing 1d arrays as data is deprecated in 0.17 and willraise ValueError in 0.19. Reshape your data either using X.reshape(-1, 1) if your data has a single feature or X.reshape(1, -1) if it contains a single sample.

The testset variable is a 1D array with an ambiguous shape (3200,), this
fixes the warning by explicitly defining the shape (1,3200) [# samples, #

features].

You can view, comment on, or merge this pull request online at:

#2
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tedunderwood_paceofchange_pull_2&d=CwMCaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=6lC8AmPV6jYZtmEv_dzvYhB92HDhwCTUWoO_RzIU3zk&m=JjmpEf4C7TWVGJ3f640u3inMSSeGESns4BhYBdJWnIE&s=6bpzLhal5N5_CDwOMOfFHZDxL9Oz1po9eNT60xWL_gk&e=
Commit Summary

  • fixing the DeprecationWarning

File Changes

Patch Links:


You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_tedunderwood_paceofchange_pull_2&d=CwMCaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=6lC8AmPV6jYZtmEv_dzvYhB92HDhwCTUWoO_RzIU3zk&m=JjmpEf4C7TWVGJ3f640u3inMSSeGESns4BhYBdJWnIE&s=6bpzLhal5N5_CDwOMOfFHZDxL9Oz1po9eNT60xWL_gk&e=

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants