machine learning - problems using GLM -


I have some difficulties to understand how to use GLM model with Possins.

  Import SP Datacats = N.P. Import Skikits as DDFRAFM.State MODEL = ('A': N.P.Rem.Rend (100) * 1000, 'B': NP. Ramand.rand (100) * 100, 'c': np random.rand (100) * 10, 'target': np.random.rand (100)}) x = dataset.x [:, ['a' , 'B', 'C']]. Value y = dataset .x [:, ['target']]. Value size = 1e5 nb eta = 3 fam = sm.families.Poisson () glm = sm.GLM (y, X, family = fam) res = glm.fit ()  Use the "target" column as the target form I am doing, should I label the goal for O or 1?  
  • Can someone tell me what information I get about predictions? Price is another function as Poisson

    Sources are down right now when it is back up, then you should read through more. There are lots of usage notes for prediction and GLM.

    How to label your goal is up to you and maybe there is a question for cross-validation. Poisson count is counted but it can be used on continuous data, but you should know what you are doing.

    If you have 0/1 then you want a logite or probate model. Something like this. You do not have to convert panda objects into numpy. Import

      np import statsmodels.api sm dataset = pd.DataFrame ({'A': np.random.rand (100) * 1000, 'B': np.random (* 100) * 100, 'C': np.random.rand (100) * 10, 'target': np.random.randint (0, 5, 100)} X = dataset [['A', ' B ',' C ']] X [' continuous'] = 1 y = dataset ['target'] size = 1e5 nb eta = 3 fam = sm.families.Poisson () glm = sm.GLM (y, X, family) = Fam) res = glm.fit () estimate = res.predict ()   

    Or you can use the maximum probability estimator directly for Poisson. res = sm.Poisson (y, x) .fit () estimated = res.predict ()

  • Comments

    Popular posts from this blog

    Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

    multithreading - PhantomJS-Node in a for Loop -

    c++ - MATLAB .m file to .mex file using Matlab Compiler -