GithubHelp home page GithubHelp logo

adimajo / glmdisc_python Goto Github PK

View Code? Open in Web Editor NEW
6.0 2.0 1.0 6.06 MB

glmdisc Python package: discretization, factor level grouping, interaction discovery for logistic regression

License: GNU General Public License v3.0

Python 100.00%
logistic-regression discretization gibbs-sampler categorical-features interactions

glmdisc_python's People

Contributors

adimajo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

grzboc

glmdisc_python's Issues

inconsistent number of samples in fit for training test split

ValueError Traceback (most recent call last)
in
1 import numpy as np
----> 2 fit(disc,predictors_cont=X.values,labels=Y.values,predictors_qual=None)

in fit(self, predictors_cont, predictors_qual, labels)
190 X=current_encoder_emap.transform(
191 emap[train, :].astype(str))),
--> 192 normalize=False)
193 set_trace()
194 if self.validation:

c:\python37\lib\site-packages\sklearn\metrics\classification.py in log_loss(y_true, y_pred, eps, normalize, sample_weight, labels)
2119 """
2120 y_pred = check_array(y_pred, ensure_2d=False)
-> 2121 check_consistent_length(y_pred, y_true, sample_weight)
2122
2123 lb = LabelBinarizer()

c:\python37\lib\site-packages\sklearn\utils\validation.py in check_consistent_length(*arrays)
203 if len(uniques) > 1:
204 raise ValueError("Found input variables with inconsistent numbers of"
--> 205 " samples: %r" % [int(l) for l in lengths])
206
207

ValueError: Found input variables with inconsistent numbers of samples: [45, 75]

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.