Good day. Please I have some issues with applying ML algorithmes in Julia. I am trying to apply Logistic reg algo on a Diabetes dataset. I believe i have to make sure the prédictif variables are in a table and thé target variable on another. After doing so, i tried fitting the model, and I got that error. Please what is the cause. And how do I résolve it?
using Pkg
Pkg.add("ScikitLearn")
using ScikitLearn, CSV
diabetes=CSV.read("diabetes.csv", DataFrame)
diabetes_x=(Array, diabetes[:,[1,2,3,4,5,6,7,8]]
diabetes_y=(Array, diabetes[:, 9])
@sk_import linear_model: LogisticRegression
log_reg_model= LogisticRegression()
fit!(log_reg_model, diabetes_x,diabetes_y)
After running the last line, I get the error shown on the image below
I am not familiar with scikit, but I can help you with some minor syntax issues. These two lines aren’t doing what you think they are doing. You probably want
Thank you very much. I have applied your recommandations. It seem to executes without any error. The only problem now is that i don’t get the results. The accuracy, scores etc.
Open up a new thread with that question since we seem to have addressed this one. If possible, use @Albert_Zevelev 's code so it is something we can copy and paste.
Thank you very much @pdeffebach . I I’ll first check out @Albert_Zevelev recommendations and try using MLJ instead. It will be an opportunity for me to learn something New.