regression

How to calculated the adjusted R2 value using scikit

三世轮回 提交于 2020-05-25 07:34:10
问题 I have a dataset for which I have to develop various models and compute the adjusted R2 value of all models. cv = KFold(n_splits=5,shuffle=True,random_state=45) r2 = make_scorer(r2_score) r2_val_score = cross_val_score(clf, x, y, cv=cv,scoring=r2) scores=[r2_val_score.mean()] return scores I have used the above code to calculate the R2 value of every model. But I am more interested to know the adjusted R2 value of every models Is there any package in python which can do the job? I will

How to improve my CNN ? high and constant validation error

不打扰是莪最后的温柔 提交于 2020-05-23 09:32:07
问题 I am working on a problem for predicting a score of how fat cows are, based on images of cows. I applied a CNN to estimate the value which is between 0-5 ( the dataset i have, contains only values between 2.25 and 4 ) I am using 4 CNN layers and 3 Hidden layers. I actualy have 2 problems : 1/ I got 0.05 training error, but after 3-5 epochs the validation error remains at about 0.33. 2/ The value predicted by my NN are between 2.9 and 3.3 which is too narrow compared with the dataset range. Is

Running iterated regressions for data divided into N chunks in R

半世苍凉 提交于 2020-05-17 05:54:07
问题 I have a dataframe structured like the following: birthwt tobacco01 pscore pscoreblocks 3425 0 0.18 (0.177, 0.187] 3527 1 0.15 (0.158, 0.168] 1638 1 0.34 (0.335, 0.345] The birthwt column is a continuous variable measuring birth weight in grams. The tobacco01 column contains values of 0 or 1. The pscore column contains probability values between 0 and 1. The pscoreblocks takes the pscore column and breaks it down into 100 equally sized blocks. I am trying to find an efficient way to do the

How to get between and overall R2 from plm FE regression?

南笙酒味 提交于 2020-05-16 05:45:25
问题 Is there a way to get plm() to calculate between R2 and overall R2 for me and include them in the summary() output? To clarify what I mean with between, overall, and within R2 see this answer on StackExchange. My understanding is that plm only calculates within R2. I am running a Twoways effects Within Model. A random example (adapted from here): library(plm) # Create some random data set.seed(1) x=rnorm(100); fe=rep(rnorm(10),each=10); id=rep(1:10,each=10); ti=rep(1:10,10); e=rnorm(100) y=x

Machine learning regression model predicts same value for every image

天大地大妈咪最大 提交于 2020-05-14 19:50:57
问题 I am currently working on a project involving training a regression model, saving it and then loading it to make further predictions using that model. However I'm having a problem. Each time that I model.predict on images it gives out the same predictions. I am not entirely sure what the problem is, maybe it's in the training stage or i'm just doing something wrong. I was following this tutorial All of the files are in this github repo Here are some bits from the code: (This part is training

Nonlinear regression with python - what's a simple method to fit this data better?

自古美人都是妖i 提交于 2020-05-13 07:06:33
问题 I have some data that I want to fit so I can make some estimations for the value of a physical parameter given a certain temperature. I used numpy.polyfit for a quadratic model, but the fit isn't quite as nice as I'd like it to be and I don't have much experience with regression. I have included the scatter plot and the model provided by numpy: S vs Temperature; blue dots are experimental data, black line is the model The x axis is temperature (in C) and the y axis is the parameter, which we

Nonlinear regression with python - what's a simple method to fit this data better?

本秂侑毒 提交于 2020-05-13 07:06:09
问题 I have some data that I want to fit so I can make some estimations for the value of a physical parameter given a certain temperature. I used numpy.polyfit for a quadratic model, but the fit isn't quite as nice as I'd like it to be and I don't have much experience with regression. I have included the scatter plot and the model provided by numpy: S vs Temperature; blue dots are experimental data, black line is the model The x axis is temperature (in C) and the y axis is the parameter, which we

Use broom and tidyverse to run regressions on different dependent variables

筅森魡賤 提交于 2020-05-11 04:43:00
问题 I'm looking for a Tidyverse / broom solution that can solve this puzzle: Let's say I have different DVs and a specific set of IVS and I want to perform a regression that considers every DV and this specific set of IVs. I know I can use something like for i in or apply family, but I really want to run that using tidyverse . The following code works as an example ds <- data.frame(income = rnorm(100, mean=1000,sd=200), happiness = rnorm(100, mean = 6, sd=1), health = rnorm(100, mean=20, sd = 3),

Use broom and tidyverse to run regressions on different dependent variables

吃可爱长大的小学妹 提交于 2020-05-11 04:41:44
问题 I'm looking for a Tidyverse / broom solution that can solve this puzzle: Let's say I have different DVs and a specific set of IVS and I want to perform a regression that considers every DV and this specific set of IVs. I know I can use something like for i in or apply family, but I really want to run that using tidyverse . The following code works as an example ds <- data.frame(income = rnorm(100, mean=1000,sd=200), happiness = rnorm(100, mean = 6, sd=1), health = rnorm(100, mean=20, sd = 3),

RetinaFace笔记

青春壹個敷衍的年華 提交于 2020-05-09 14:49:25
Insight Face在2019年提出的最新人脸检测模型,原模型使用了deformable convolution和dense regression loss, 在 WiderFace 数据集上达到SOTA。截止2019年8月,原始模型尚未全部开源,目前开源的简化版是基于传统物体检测网络RetinaNet的改进版,添加了SSH网络的检测模块,提升检测精度,作者提供了三种基础网络,基于ResNet的ResNet50和ResNet152版本能提供更好的精度,以及基于mobilenet(0.25)的轻量版本mnet,检测速度更快。 比较突出的工作是加入了 extra-supervised 和 self-supervised ; 来源: oschina 链接: https://my.oschina.net/u/4365362/blog/4271895