How to perform preprocessing using Adaptive Scaler #690
-
Post the prediction task, one of the predictions turns out to be 'None'. Is this because of insufficient data or because of incorrect preprocessing. Note that this was just a small piece of reproducible code, as result of which the same preprocessing method has been used twice. One of the preprocessing methods shall later be modified to minmaxscaler or other similar methods. The following is the piece of code: students=pd.DataFrame() students['r_no']=[1,2,3,4,5] x_students=students.drop(['pass'],axis=1) strm_st1=iter_pandas(X=x_students,y=y_students) metric1 = metrics.Accuracy() y_preds_st1 = [] for ((xi1, yi1),(xi2, yi2)) in zip(strm_st1,strm_st2): c2.learn_one(trans_xi2, yi2) metric2.update(y_pred=pred_i2, y_true=yi2) y_preds_st2.append(pred_i2) print(f"Accuracy for c1: {metric1.get()}") print(f"Accuracy for c2: {metric2.get()}") Both y_preds_st1 and y_preds_st2 yield [None,1,1,1,1] |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
What do you mean by "Adaptive Scaler"? I'm not sure what you're asking for. We're not here to code stuff for you. We're here to help you with troubles in your code. Can you tell us what you have tried? Have you even taken a look at the documentation? Meta: please make an effort at formatting your code and making it executable. It's tiring to have to have to read through discussion posts where very little effort is put into formatting. |
Beta Was this translation helpful? Give feedback.
What do you mean by "Adaptive Scaler"?
preprocessing.AdaptiveStandardScaler
?I'm not sure what you're asking for. We're not here to code stuff for you. We're here to help you with troubles in your code. Can you tell us what you have tried? Have you even taken a look at the documentation?
Meta: please make an effort at formatting your code and making it executable. It's tiring to have to have to read through discussion posts where very little effort is put into formatting.