Does SPSS perform cox regression analysis for time-dependent repeated observations? - spss

I could not see a source of cox regression for time-dependent REPEAT observations on the Internet. Does spss do this analysis?
Any source suggestions?

You can find Cox Regression in SPSS under the following menu entry:
Analyze -> Survival -> Cox Regression.

Related

Begining to code Logistic regression in java

I want to code the logistic regression(classification problem) algorithm using java -
Hypothesis is -
Can anyone please tell me what −(−θ to the power T) is?
I was able to code linear regression its hypothesis is which is relatively easy but can not start off with logistic regression.
ΘT is the transpose of parameters vector Θ and ΘTx is the linear combination of input features.If you know linear regression then you can think ΘTx as a output of linear regression. Look at the figure below.
The first part is the linear regression. The output of the linear regression is
. Since logistic regression is not a regression but a classification problem, your output shouldn't be continuous. Instead you require a binary output for any inputs. For this you need a function that maps the range of input to the value between 0 and 1 so that you can apply some threshold to the output to get the classification. And the suitable function for this would be sigmoid function as you mentioned.
Regrading your question, the output of linear regression can be written as
The term = ΘTx is the vectorized implementation of output of linear regression. So ΘT is nothing but a transpose of parameter vector. This can be understood by following mathematical operations.
For details in logistic regression and coding check this link.
The ΘT represenets transponse of theta matrix. Where theta matrix is matrix of features. When writing code for those algorthms, I strongly advice yout to use first MATLAB or OCTAVE software first for calculating matrices. Then, when you are sure that your algorithm is working correctly implement it in JAVA.
Cheers,
Emil

How do I update a trained model (weka.classifiers.functions.MultilayerPerceptron) with new training data in Weka?

I would like to load a model I trained before and then update this model with new training data. But I found this task hard to accomplish.
I have learnt from Weka Wiki that
Classifiers implementing the weka.classifiers.UpdateableClassifier interface can be trained incrementally.
However, the regression model I trained is using weka.classifiers.functions.MultilayerPerceptron classifier which does not implement UpdateableClassifier.
Then I checked the Weka API and it turns out that no regression classifier implements UpdateableClassifier.
How can I train a regression model in Weka, and then update the model later with new training data after loading the model?
I have some data mining experience in Weka as well as in scikit-learn and r and updateble regression models do not exist in weka and scikit-learn as far as I know. Some R libraries however do support updating regression models (take a look at this linear regression model for example: http://stat.ethz.ch/R-manual/R-devel/library/stats/html/update.html), so if you are free to switching data mining tool this might help you out.
If you need to stick to Weka than I'm afraid that you would probably need to implement such a model yourself, but since I'm not a complete Weka expert please check with the guys at weka list (http://weka.wikispaces.com/Weka+Mailing+List).
The SGD classifier implementation in Weka supports multiple loss functions. Among them are two loss functions that are meant for linear regression, viz. Epsilon insensitive, and Huber loss functions.
Therefore one can use a linear regression trained with SGD as long as either of these two loss functions are used to minimize training error.

Which Regression methods are suitable for binary valued features and continuous output?

I want to build a machine learning model to regression on continuous output given binary valued features(0,1). the dimension of my problem is around 200.
which of the flowing methods seems suitable for this kind of problem ?
SVR with different Kernels
Regression random forest
MARS
Gradient boosting with regression tree
Kernel regression (Nadya-Watson Kernel regression)
LSR and LARS
Stochastic gradient boosting
Intuitively speaking, anything requiring the calculation of a gradient is going to struggle on binary values. From your list, SVR and Forests would be the first place I'd look for a benchmark solution.
You can also look at expectation maximization for Bernoully mixture models.
It deals with binary input sets. You can find theory in book:
Christopher M. Bishop. "Pattern Recognition and Machine Learning".

Comparison of binary vs tfidf Ngram features in sentiment analysis / classification tasks?

Simple question again: Is it better to use Ngrams (unigram/ bigrams etc) as simple binary features or rather use their Tfidf scores in ML models such as Support Vectory Machines for performing NLP tasks such as sentiment analysis or text categorization/classification?
As Steve mentioned in the comment, the best answer (and the ML-style way) is to try !
That being said, I'd start with binary features. The goal of your ML model like SVM is to determine the "weight" of these features, so if it is efficient, you don't have to try to set this weight in advance (with TFIDF or other).

Multinomial logistic regression steps in SPSS

I have data suited to multinomial logistic regression but I don't know how to formulate the model in predicting my Y.
How do I perform Multinomial Logistic Regression using SPSS?
How does stepwise method work?
There are plenty of examples of annotated output for SPSS multinomial logistic regression:
UCLA example
My own list of links and resources
Stepwise method provides a data driven approach to selection of your predictor variables. In general the decision to use data-driven or direct entry or hierarchical approaches is related to whether you want to test theory (i.e., direct entry or hierarchical) or you want to simply optimise prediction (i.e., stepwise and related methods).

Resources