@@ -41,8 +41,8 @@ Fit the model to the data given by X and Y.
4141- `X`: A dxn matrix where d is the number of features and n is the number of samples.
4242- `Y`: A 1xn matrix where n is the number of samples.
4343"""
44- function fit!(model:: MDN , X:: Matrix{<:Number } , Y:: Matrix{<:Number } )
45- fit!(model, Float32 .(X), Float32 .(Y))
44+ function fit!(model:: MDN , X:: Matrix{<:Real } , Y:: Matrix{<:Real } )
45+ fit!(model, Float64 .(X), Float64 .(Y))
4646end
4747
4848function fit!(model:: MDN , X:: Matrix{Float64} , Y:: Matrix{Float64} )
@@ -101,8 +101,8 @@ Predict the full conditional distribution P(Y|X).
101101# Returns
102102Returns a vector of Distributions.MixtureModel objects representing the conditional distribution for each sample.
103103"""
104- function predict(model:: MDN , X:: Matrix{<:Number } )
105- predict(model, Float32 .(X))
104+ function predict(model:: MDN , X:: Matrix{<:Real } )
105+ predict(model, Float64 .(X))
106106end
107107
108108function predict(model:: MDN , X:: Matrix{Float64} )
@@ -128,8 +128,8 @@ Predict the mean of the conditional distribution P(Y|X).
128128# Returns
129129Returns a vector of real numbers representing the mean of the conditional distribution P(Y|X) for each sample.
130130"""
131- function predict_mean(model:: MDN , X:: Matrix{<:Number } )
132- predict_mean(model, Float32 .(X))
131+ function predict_mean(model:: MDN , X:: Matrix{<:Real } )
132+ predict_mean(model, Float64 .(X))
133133end
134134
135135function predict_mean(model:: MDN , X:: Matrix{Float64} )
@@ -149,8 +149,8 @@ Predict the mean of the Gaussian with the largest prior in the conditional distr
149149# Returns
150150Returns a vector of real numbers representing the mean of the gaussian with the largest prior for each sample.
151151"""
152- function predict_mode(model:: MDN , X:: Matrix{<:Number } )
153- predict_mode(model, Float32 .(X))
152+ function predict_mode(model:: MDN , X:: Matrix{<:Real } )
153+ predict_mode(model, Float64 .(X))
154154end
155155
156156function predict_mode(model:: MDN , X:: Matrix{Float64} )
0 commit comments