I have input data X_train with dimension (477 x 200) and y_train with length 477. I want to use a support vector machine regressor and I am doing grid search. param_grid = {‘kernel’: [‘poly’, ‘rbf’, ‘linear’,’sigmoid’], ‘degree’: [2,3,4,5], ‘C’:[0.01,0.1,0.3,0.5,0.7,1,1.5,2,5,10]} grid = GridSearchCV(estimator=regressor_2, param_grid=param_grid, scoring=’neg_root_mean_squared_error’, n_jobs=1, cv=3, verbose = 1) grid_result = grid.fit(X_train, y_train)) I get ..

#### Category : regression

I have 2 tables. Table A has 105 rows: bbgid dt weekly_price_per_stock weekly_pct_change 0 BBG000J9HHN8 2018-12-31 13562.328 0.000000 1 BBG000J9HHN8 2019-01-07 34717.536 1.559851 2 BBG000J9HHN8 2019-01-14 28300.218 -0.184844 3 BBG000J9HHN8 2019-01-21 35370.134 0.249818 4 BBG000J9HHN8 2019-01-28 36104.512 0.020763 … … … … … 100 BBG000J9HHN8 2020-11-30 62065.827 0.278765 101 BBG000J9HHN8 2020-12-07 62145.445 0.001283 102 BBG000J9HHN8 ..

I’m trying to usde rolling OLS to make a trend on a moving windows frame. it seems theat it’s doing someting but it’s out of scale so I’m missing something. the data is a dataframe of float value (‘Close’) over datetime. any idea what’s the problem? here’s the code: import datetime import matplotlib.pyplot as plt ..

Let’s assume that I have defined a regressor like that tree = MultiOutputRegressor(DecisionTreeRegressor(random_state=0)) tree.fit(X_train, y_train) And now I want to do a grid cross validation to optimize the parameter ccp_alpha (I don’t know if it is the best parameter to optimize but I take it as example). Thus I do it like that: alphas = ..

i need to calculate correlation coefficent between dependent and independent variables, these variables are in two different files but same format, the problem the problem is that these two variables do not have the same length , and i don’t know how can i solve this problem can some one help me #scatter plot: data1=pd.read_csv(‘b1.txt’, ..

I am trying to create a loop for regression over several dependent variables. For example, import statsmodels.api as sm import statsmodels.formula.api as smf list = [‘A’, ‘B’, ‘C’] for i in list: result = smf.glm(formula = ‘i ~ x1+ x2 + x3′, data=data) This code doesn’t work and I want to save the results for ..

Hello I am trying to fit a regression model with my target variable as count data with lots of zeros. I am using xgboost regression with an objective count:poisson My rmse is really big (240) compared to my target values and also im not getting any predictions with 0 value as I have in my ..

I watned to predict the income using text data(description) as a predictor. This is how my dataframe looks like: c_description 641 fierce roman commander marcus vinicius become … 645 melancholy poet reflect three woman love lose … 644 disturb blanche dubois move sister new orleans… 643 lonely woman recall first love thirteen year p… 642 ..

I am new to machine learning and regression analysis. I obtained some 3D data and plotted them as follows. It can be seen from the graph that there seems to be an S-like function that can fit the data. What is the best technique to follow so that given inputs (x1, x2) I can predict ..

GRNN (after Wikipedia) represents an improved technique in the neural networks based on the nonparametric regression. The idea is that every training sample will represent a mean to a radial basis neuron. I have problems with pyGRNN, which is a python implementation of anisotropic GRNN. Basically what GRNN does is assigns a neuron to every ..

## Recent Comments