prediction

pytorch学习-莫烦

。_饼干妹妹 提交于 2019-12-05 09:34:07
PyTorch 官网 https://www.bilibili.com/video/av15997678/?p=14 https://morvanzhou.github.io/tutorials/machine-learning/torch/3-04-save-reload/ 要点 训练好了一个模型, 我们当然想要保存它, 留到下次要用的时候直接提取直接用, 这就是这节的内容啦. 我们用回归的神经网络举例实现保存提取. 保存 我们快速地建造数据, 搭建网络: torch.manual_seed(1) # reproducible # 假数据 x = torch.unsqueeze(torch.linspace(-1, 1, 100), dim=1) # x data (tensor), shape=(100, 1) y = x.pow(2) + 0.2*torch.rand(x.size()) # noisy y data (tensor), shape=(100, 1) def save(): # 建网络 net1 = torch.nn.Sequential( torch.nn.Linear(1, 10), torch.nn.ReLU(), torch.nn.Linear(10, 1) ) optimizer = torch.optim.SGD(net1.parameters()

Predicting from previous date:value data

对着背影说爱祢 提交于 2019-12-05 05:25:51
I have a few data sets from similar periods of time. It's a presentation of people at that day, the period being about a year. The data hasn't been gathered in regular intervals, it is rather quite random: 15-30 entries for each year, from 5 different years. The graph drawn from the data for each year looks roughly like this: Graph made with matplotlib. I have the data in datetime.datetime, int format. Is it possible to predict, in any sensible way, how things will turn out in the future? My original thought was to count the average from all previous occurrences and predict it will be this.

Using LIBSVM to predict authenticity of the user

余生颓废 提交于 2019-12-05 04:47:16
I am planning on using LibSVM to predict user authenticity in web applications. (1) Collect Data on particular user behavior(eg. LogIn time, IP Address, Country etc.) (2) Use Collected Data to train an SVM (3) Use real time data to compare and generate an output on level of authenticity Can some one tell me how can I do such a thing with LibSVM? Can Weka be helpful in these types of problems? The three steps you mention are an outline of the solution. In some more detail: Make sure you get plenty of labeled data, i.e. behavior logs annotated with authentic/non-authentic. (Without labeled data,

Test single instance in weka which has no class label

…衆ロ難τιáo~ 提交于 2019-12-05 02:23:22
问题 This question is being already asked but i didn't understand the answer so I am again posting the question please do reply. I have a weka model eg: j48 I have trained that model for my dataset and now I have to test the model with a single instance in which it should return the class label. How to do it? I have tried these ways: 1)When I am giving my test instance a,b,c,class for class as ?. It is showing problem evaluating classifier .train and test are not compatible 2)When I list all the

Any simple way to get regression prediction intervals in R?

柔情痞子 提交于 2019-12-04 22:06:18
I am working on a big data set having over 300K elements, and running some regression analysis trying to estimate a parameter called Rate using the predictor variable Distance. I have the regression equation. Now I want to get the confidence and prediction intervals. I can easily get the confidence intervals for the coefficients by the command: > confint(W1500.LR1, level = 0.95) 2.5 % 97.5 % (Intercept) 666.2817393 668.0216072 Distance 0.3934499 0.3946572 which gives me the upper and lower bounds for the CI of the coefficients. Now I want to get the same upper and lower bounds for the

Prediction with lme4 on new levels

﹥>﹥吖頭↗ 提交于 2019-12-04 21:09:05
问题 I'm trying to fit a mixed effects model and then use that model to generate estimates on a new dataset that may have different levels. I expected that the estimates on a new dataset would use the mean value of the estimated parameters, but that doesn't seem to be the case. Here's a minimum working example: library(lme4) d = data.frame(x = rep(1:10, times = 3), y = NA, grp = rep(1:3, each = 10)) d$y[d$grp == 1] = 1:10 + rnorm(10) d$y[d$grp == 2] = 1:10 * 1.5 + rnorm(10) d$y[d$grp == 3] = 1:10

Which computer vision library & algorithm(s), for human behaviour analysis?

只谈情不闲聊 提交于 2019-12-04 20:51:42
Objective: Detect / determine human actions, s.a. picking / lifting items to read label and keeping it back on rack (in a store), sitting-on, mounting/climbing-atom objects s.a. chair, bench, ladder etc. Environment: Store / shop, which is mostly well lit. Cameras (VGA -> 1MP), fixed (i.e. not PTZ). Constraints: Presence of known and unknown human beings. Possible rearrangement of objects (items for sale) in the store, over a period of time. Possible changes in lighting over time. For example: Frontal areas of store might get ample sunlight during day, which changes to artificial light at

Predictional Logic in Programming?

跟風遠走 提交于 2019-12-04 19:41:58
I was thinking about how in the probably distant future many people think that we wont rely on physical input (i.e. keyboard) as much because the technology that reads brain waves (which already exists to some extent) will be available. Kinda scares me....anyway, I while I was daydreaming about this, the idea came to me that: what if a programmer could implement logic in their code to accurately predict the users intentions and then carry out the intended operation with no need for human interaction. I am not looking for anything specific, I'm just a little curious as to what anyone's thoughts

How to predict multiple images in Keras at a time using multiple-processing (e.g. with different CPUs)?

非 Y 不嫁゛ 提交于 2019-12-04 19:20:17
I have a lot of PNG images that I want to classify, using a trained CNN model. To speed up the process, I would like to use multiple-processing with CPUs (I have 72 available, here I'm just using 4). I don't have a GPU available at the moment, but if necessary, I could get one. My workflow: read a figure with openCV adapt shape and format use mymodel.predict(img) to get the probability for each class When it comes to the prediction step, it never finishes the mymodel.predict(img) step. When I use the code without the multiprocessing module, it works fine. For the model, I'm using keras with a

How to generate a prediction interval from a regression tree rpart object?

我的梦境 提交于 2019-12-04 19:09:29
问题 How do you generate a prediction interval from a regression tree that is fit using rpart? It is my understanding that a regression tree models the response conditional on the mean of the leaf nodes. I don't know how to get the variance for a leaf node from the model, but what I would like to do is simulate using the mean and variance for a leaf node to obtain a prediction interval. Predict.rpart() doesn't give an option for interval. Example: I fit a tree with iris data, but predict doesn't