In this paper we present a novel algorithm to identify LPV systems with affine parameter dependence operating under open and closed-loop conditions. A factorization is introduced which makes it possible to form predictors which are based on past inputs, outputs, and scheduling data. The predictors contain the LPV equivalent of the Markov parameters. Using the predictors, ideas from Predictor Based Subspace IDentification (PBSID) are developed to estimate the state sequence from which the LPV system matrices can be constructed. A numerically efficient implementation is presented.