prediction

Time Series Ahead Prediction in Neural Network (N Point Ahead Prediction) Large Scale Iterative Training

拈花ヽ惹草 提交于 2019-12-04 18:16:28
问题 (N=90) Point ahead Prediction using Neural Network: I am trying to predict 3 minutes ahead i.e. 180 points ahead. Because I compressed my time series data as taking the mean of every 2 points as one, I have to predict (N=90) step-ahead prediction. My time series data is given in seconds. The values are in between 30-90. They usually move from 30 to 90 and 90 to 30, as seen in the example below. My data could be reach from: https://www.dropbox.com/s/uq4uix8067ti4i3/17HourTrace.mat I am having

Does anyone know how to generate AUC/Roc Area based on the predition?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 17:21:33
I know the AUC/ROC area ( http://weka.wikispaces.com/Area+under+the+curve ) in weka is based on the e Mann Whitney statistic ( http://en.wikipedia.org/wiki/Mann-Whitney_U ) But my doubt is, if I've got 10 labeled instances (Y or N, binary target attribute), by applying an algorithm (i.e. J48) onto the dataset, then there are 10 predicted labels on these 10 instances. Then what exactly should I use to calculate the AUC_Y, AUC_N, and AUC_Avg? Use the prediction's ranked label Y and N or the actual label (Y' and N')? Or I need to calculate the TP rate and FP rate? Can anyone give me a small

Vector representation in multidimentional time-series prediction in Tensorflow

瘦欲@ 提交于 2019-12-04 16:47:07
I have a large data set (~30 million data-points with 5 features) that I have reduced using K-means down to 200,000 clusters. The data is a time-series with ~150,000 time-steps. The data on which I would like to train the model is the presence of particular clusters at each time-step. The purpose of the predictive model is generate a generalized sequence similar to generating syntactically correct sentences from a model trained on word sequences. The easiest way to think about this data is that I'm trying to predict the pixels in the next video frame from pixels in the current video frame in

Predict.glm not predicting missing values in response

核能气质少年 提交于 2019-12-04 11:23:03
问题 For some reason, when I specify glms (and lm's too, it turns out), R is not predicting missing values of the data. Here is an example: y = round(runif(50)) y = c(y,rep(NA,50)) x = rnorm(100) m = glm(y~x, family=binomial(link="logit")) p = predict(m,na.action=na.pass) length(p) y = round(runif(50)) y = c(y,rep(NA,50)) x = rnorm(100) m = lm(y~x) p = predict(m) length(p) The length of p should be 100, but its 50. The weird thing is that I have other predicts in the same script that do predict

Polynomial Regression nonsense Predictions

寵の児 提交于 2019-12-04 09:45:24
This question was migrated from Cross Validated because it can be answered on Stack Overflow. Migrated 6 years ago . Learn more . Suppose I want to fit a linear regression model with degree two (orthogonal) polynomial and then predict the response. Here are the codes for the first model (m1) x=1:100 y=-2+3*x-5*x^2+rnorm(100) m1=lm(y~poly(x,2)) prd.1=predict(m1,newdata=data.frame(x=105:110)) Now let's try the same model but instead of using $poly(x,2)$, I will use its columns like: m2=lm(y~poly(x,2)[,1]+poly(x,2)[,2]) prd.2=predict(m2,newdata=data.frame(x=105:110)) Let's look at the summaries

Hidden Markov Model predicting next observation

我怕爱的太早我们不能终老 提交于 2019-12-04 08:37:39
问题 I have a sequence of 500 observations of the movements of a bird. I want to predict what the 501st movement of the bird would be. I searched the web and I guess this can be done by using HMM, however I do not have any experience on that subject. Can anyone explain the steps of an algorithm used to solve this problem? 回答1: x1-x2-x3-x4-x5......x500-x501 | | | | | | y1 y2 y3 y4 y5 y500 x - actual state y - observations P(y_i|x_i) - how you think the observation depends on the actual state P(x_i

What does negative %IncMSE in RandomForest package mean?

无人久伴 提交于 2019-12-04 08:36:36
问题 I used RandomForest for a regression problem. I used importance(rf,type=1) to get the %IncMSE for the variables and one of them has a negative %IncMSE. Does this mean that this variable is bad for the model? I searched the Internet to get some answers but I didn't find a clear one. I also found something strange in the model's summary ( attached below), It seems that only one tree was used although I defined ntrees as 800. model: rf<-randomForest(var1~va2+var3+..+var35,data=d7depo,ntree=800

Simple Regression Prediction Algorithm in JavaScript

夙愿已清 提交于 2019-12-04 05:56:40
问题 I am trying to do a simple forecast of future profit of an organization based on the past records by using regression. I am following this link. For testing purpose, I have changed the sample data and it produced these results: My actual data will be date and profit, and they will be going up and down rather than in a contiguous increment way. I realized that the method above works for sample data which keep on increasing as the prediction is quite accurate. However, when I changed the data

warning in lm prediction for r [duplicate]

自作多情 提交于 2019-12-04 05:31:30
问题 This question already has answers here : Getting Warning: “ 'newdata' had 1 row but variables found have 32 rows” on predict.lm (4 answers) Closed 3 years ago . collection <- data.frame(col1=X1,col2=X2,col3=X3,col4=X4) k <- 5 ind <- sample(seq(1,k), length(X1), replace=TRUE) test_ind = which(ind==1) train<-collection[-test_ind,] fit<-lm(X1~poly(X2,2,raw=T)+X3+X4+X2:X3,data=train) model1_resid<-predict(fit,collection[test_ind,2:4]) Warning message: 'newdata' had 105 rows but variables found

Linear regression with tensorflow

ε祈祈猫儿з 提交于 2019-12-04 05:17:34
I trying to understand linear regression... here is script that I tried to understand: ''' A linear regression learning algorithm example using TensorFlow library. Author: Aymeric Damien Project: https://github.com/aymericdamien/TensorFlow-Examples/ ''' from __future__ import print_function import tensorflow as tf from numpy import * import numpy import matplotlib.pyplot as plt rng = numpy.random # Parameters learning_rate = 0.0001 training_epochs = 1000 display_step = 50 # Training Data train_X = numpy.asarray([3.3,4.4,5.5,6.71,6.93,4.168,9.779,6.182,7.59,2.167, 7.042,10.791,5.313,7.997,5.654