I have a dataset (350k data points) with data of employees across different regions over the last 10 years. The dataset consists of their skills, the region they are in, the industry, their current role, their salary in the respective currency. After doing some analysis, I have found 60% of the salaries are in SGD, 30% in INR, and the rest are divided across 15 other currencies. Is it recommended that I have a model for each currency or is …
I would like to ask a question about the random population generation gin splitting the dataset in machine learning classification models. For example, I used seed = 1 and got accuracy of 0.7 and seed = 5 and got accuracy of 0.8 and seed= 2000 and got accuracy of 0.89 using Adaboost. I found a research paper using the same dataset i used and accuracy achieved is 0.94 using xgboost model without specifying the seed used in developing the model. …
I'm using ajax to post the form data. In the end I want to redirect to homepage. I'm trying following code, it does not work. It returns error 302. How can I redirect in the following function? Thanks. add_action('wp_ajax_nopriv_custom_register', 'custom_register'); add_action('wp_ajax_custom_register', 'custom_register'); function custom_register(){ //process wp_redirect( home_url() ); exit; }
I am trying to add h1,h2 .. in the TinyMCE Styles Dropdown with my other html elements. I have tried the following code, but the problem is it only adds styles if I use span as 'block' value. If I use div, h3, h4, the code doesn't add anything I have searched a lot for the solution but haven't found anything helpful. Could you please tell me how to fix this problem? FYI: I am using wordpress 3.5.1 function my_mce_buttons_2( …
i have training data from 2015-2017 and testing data of 2018. i have multiple variables my data is multivariate time series data.i want to predict 2019 data by using test data of 2018.is it possible? i am confused about Long short term memory neural networks working what is actually it will do.does my problem come under multivariate multi step forecasting? or multivariate single step forecasting?
We have a set of things (physical entities): ($A_1$, $A_2$, $A_3$, $A_4$,...). Each of those has certain attributes that we can measure at time $t = 0$. Let $B_i$ represent those attributes, so each of $A_j$ has its own set of attributes ($B_1$, $B_2$, $B_3$,...). With time, the $A_j$ tend to affect a certain property of their surrounding environment. Let $C$ represent that property. Change in $C$ with respect to time can be measured. What we have: Identity (name) of …
Is there any way to speed this query? Noob here. SELECT wp_posts.ID FROM wp_posts LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id) WHERE 1=1 AND ( wp_posts.ID NOT IN ( SELECT object_id FROM wp_term_relationships WHERE term_taxonomy_id IN (9,11) ) AND wp_term_relationships.term_taxonomy_id IN (18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,151,152,169,170,171,172,173,174,175,177,178,179,181,182,183,184,185,187,191,192,195,677,678,679,680,681,682,683,684,685,686,687,688,689,690,691,692,693,694,695,696,697,698,699,701,702,703,704,705,706,707,708,709,710,711,712,713,714,715,716,717,718,719,721,724,726,728,729,742,743,744,747,750,758,759,760,781) ) AND wp_posts.post_type = 'product' AND ((wp_posts.post_status = 'publish')) GROUP BY wp_posts.ID ORDER BY RAND() LIMIT 0, 6 I'm using query monitor and this is from homepage of site. I think this is reading from Menu, because there …
I have created code to add custom user rules. It works. However when I try to tie in the code for redirecting an already logged in user based on one test role, then it doesn't work. What am I missing in this in order to have it redirect, based on a user's role. Here is the code: add_action('init', 'cloneRoleCompany'); function cloneRoleCompany(){ global $wp_roles; if ( ! isset( $wp_roles ) ) $wp_roles = new WP_Roles(); $adm = $wp_roles->get_role('subscriber'); //Adding a 'new_role' …
I have made two dropdown list which is a custom fields. Custom Field 1 :- industry Values of Custom Field 1 :- financial_services,ecommerce,insurances, etc. Custom Field 2 :- primary_functionality Values of Custom Field 2 :- platform_decision_engine,user_authentication,data_provider_verification etc. And My Post Type Name is :- providers. Now, I want to fetch posts with multiple custom fields. So, I have tried this query. But it's not working. $args = array( 'numberposts' => -1, 'post_type' => 'providers', 'meta_query' => array( 'relation' => 'AND', …
I just read paper about cnn + rnn for text recognition. The labels of dataset is tensor of char index (e.g [0, 1, 2 ] for image with label "abc"). Since the label of each input has different length do I need to convert the label to sparse tensor value ? since the paper does not mention about it.
My home is a static page, but Wordpress create enumeration "home/page/2/.../3/" and the only solution found that disable pages generation, also redirecting, is the instruction below, but I would like it to have effect only the home page and not the whole site. Thank you in advance for any suggestions. global $posts, $numpages; $request_uri = $_SERVER['REQUEST_URI']; $result = preg_match('%\/(\d)+(\/)?$%', $request_uri, $matches); $ordinal = $result ? intval($matches[1]) : FALSE; if(is_numeric($ordinal)) { setup_postdata($posts[0]); $redirect_to = ($ordinal < 2) ? '/': (($ordinal > …
First of all: I don't understand the meaning or the action that http://myurl/page/2 does? I checked the Net tab in Firebug and saw that my page takes more than 3 seconds to load /page/2... but I don't need pagination at my front page at all. I don't get where it comes from either. My question: how do I disable / remove this and show it only when pagination is needed? This is the query I am using to get posts: …
I have a dataset of different sentences from news articles which I need to classify by their sentiment. For that goal I'm planning to use a fine-tuned model which was fine-tuned on different datasets, for example various comments from forums, reviews, tweets. However, news articles are supposedly quite different from that dataset as they are usually more neutral. I understand that a correct way to approach this issue would be by training a model on my own labeled dataset, however …
I am re-training a pretrained model VGG16. In the last layers, im using two FC layers of size 2048 each, with dropout=0.5. When I saved the model, the size of the model was found to be 2 GB (which is so huge). I have trained this model for 9 classes (900 images). Is there any way I could reduce the size of the model without affecting its performance? The reason is I have to use this model in AWS cloud, …
I’m trying to pass a variable from the template to js, but with no luck. I’ve tried using wp_localize_script, and it seems to be working fine when attached to wp_enqueue_scripts action, but it doesn’t work when called from within template. Do my only resort is to use HTML & data- for handling this? It would be that great though, since I’m passing the whole wp_query there. My function is basically a wrapper on a custom WP_Query that allows load more …
I have a custom post type called "products". My goal is to make my custom query that I have on homepage and also the search query show first the posts that have a custom field called "id_number" not empty and then the other posts that have the "id_number" empty. All should be ordered by title. This is my code so far only for my custom query. I also need it for search page query but I didn't get that far. …
Let me preface this post with I am incredibly new to machine learning/neural networks. I am currently working on a classification neural network using TensorFlow whose input is multiple features of continuous data and whose output is an array of confidence levels for a group number (softmax). In some instances, the data passed into the model could have some undefined values in various rows. I understand from research and testing that input tensors' elements must all be of the same …
I'm trying to achieve a two level portfolio structure, and it works fine in the breadcrumbs but not in the URL. The idea is to show the portfolio slug (destinations) followed by the portfolio category (if exist) and last the portfolio name. This is the file (portfolio-post.php) that needs to be altered, but i have no clue on how to do that, any help would be appreciated: <?php /******************************************************************************************************************* * Create and register Portfolio post type */ if ( !function_exists('ishyoboy_portfolio_post_type') …
I'm developing an anomaly detection program in Python. Main idea is to create a new LSTM model every day, training it with the previous 7 days and predict the next day. Then, using thresholds, find anomalies day by day. I've already implemented that and these thresholds are working well: upper threshold is equals to trimmed_mean + (K * interquartile_range) lower threshold is equals to trimmed_mean - (K * interquartile_range) where trimmed_mean and interquartile_range are calculated on prediction error (real curve …
I was wondering if anyone has encountered the same. The thing is, when I run a catboost boosting model, delete non important variables (feature importance by prediction importance = 0, in fact these variables arenot in the boosting trees), rerun the model again without the zero-importance variables and see that the results changes. Has anyone encountered the same issue with this or know why is this happening? How to fix this? This does not happens in lightgbm or xgboost. I …
I'm trying to fake data for the coffee shop. I've two features age and menu. Menu includes various type of drinks such as coffee [latte, espresso, mocca, etc], tea [milktea, lemontea], milk [freshmilk, matchamilk, etc]. What I'm trying to do is to fake menu based on the age like if the age is higher than 15, 80% of people who has the age higher than 15 will mostly order coffee randomly from the list of coffee [latte, espresso, mocca, etc], …
In the Titanic dataset, I performed two methods to fill Age NA. The first one is regression using Lasso: from sklearn.linear_model import Lasso AgefillnaModel=Lasso(copy_X=False) AgefillnaModel_X.dropna(inplace=True) y=DF.Age.dropna(inplace=False) AgefillnaModel.fit(AgefillnaModel_X,y) DF.loc[ageNaIn,'Age']=AgefillnaModel.predict(DF.loc[ageNaIn,AgefillnaModel_X.columns]) and the second method is using IterativeImputer() from scikit-learn.impute. from sklearn.experimental import enable_iterative_imputer from sklearn.impute import IterativeImputer # Setting the random_state argument for reproducibility imputer = IterativeImputer(random_state=42) imputed = imputer.fit_transform(DF) df_imputed = pd.DataFrame(imputed, columns=DF.columns) round(df_imputed, 2) Now, how can I decide which one is better? Here is the result of scattered Age …
I got this strange behavior when deploying my logistic regression trained in scikit-learn into production. I trained the model on my own machine and stored it in form of .pickle. I use the same set of data for both locally and on server side (with docker) generating four columns for each sample in this binary classification problem: probability_of_class_0, probability_of_class_1, y_true, y_predict; where y_true and y_hat refer to the true label and the predicted label respectively for that sample row/record. And …
I have a machine learning model that I fitted with xgboost and linear regression. My dataset has thirteen features and has price as the target. Is there any way to make the model predict values in the future? I have date time as one of the variables. From searching on internet, I learned about fb prophet, and that this is a time series problem. But if my xgboost is doing well, is there a way to make it predict future …
LDA has two hyperparameters, tuning them changes the induced topics. What does the alpha and beta hyperparameters contribute to LDA? How does the topic change if one or the other hyperparameters increase or decrease? Why are they hyperparamters and not just parameters?
Suppose I'm training a linear regression model using k-fold cross-validation. I'm training K times each time with a different training and test data set. So each time I train, I get different parameters (feature coefficients in the linear regression case). So I will have K parameters at the end of cross-validation. How do I arrive at the final parameters for my model? If I'm using it to tune hyperparameters as well, do I have to do another cross-validation after fixing …
Brand new site. Not MU. No matter what I do, I cannot get a file uploaded that exceeds 2MB. I'm running a localhost server with WordPress 4.3.1 I've modified both relevant settings in the the site's php.ini as: upload_max_filesize = 64M post_max_size = 64M However, I'm still getting the message when trying to upload a plugin that's 2.5M The uploaded file exceeds the upload_max_filesize directive in php.ini. Also, when I go to "Media > Add New", I get the message: …
I constructed and trained a convolutional neural network using Keras in R with the TensorFlow backend. I feed the network with multispectral images for a simple image classification. Is there some way to calculate which of the input bands were most important for the classification task? Ideally, I would like to have a plot with some measure of importance, grouped by bands and image classes. How can I obtain this information? Would it be necessary / possible to calculate saliency …
By default, the product quantity is always "1" when viewing a product page. There doesn't seem an out-of-the-box option to set a different quantity value upon visit, and I don't know what hook or function to look for. Your help is appreciated.
Whether correct or not, I'm not able to judge being myself in the early days of the Data Science. However, I have applied a Kmeans on a corpus where some random documents (very short sentences) have been added. These have been vectiorized so to be suitable. With clusterization results at hands, I was somehow expecting the vectors (keyword) to fall only in one cluster at a time (and no more than that). This is not the case. In some circumstances, …
I'm wondering if it's possible to logout all users 2 times a day using the function wp_logout() ? I see loads of plugins who can logout idled users but we want to log out every single users twice a day at 2PM and 10PM Hope someone can help me with this.
How can I redirect all posts permalinks from .html to / in WordPress? To be more clear, for example, a post URL like this: http://example.com/%category%/%postname%.html To be redirected to: http://example.com/news/%postname%/.html It's simple to redirect them one by one, but I need a rule to redirect all posts. My current .htaccess setup is: # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress
I have a script which scrapes articles from the web and saves the url to a .txt file. I've created a custom plugin which on activation, loops through the urls and creates a draft post with the content being an embedded article. I'm using the following code in my plugin <?php register_activation_hook(__FILE__, 'my_plugin_activate'); function my_plugin_activate(){ my_plugin_install_site(); } function my_plugin_install_site(){ global $user_ID; $handle = fopen("listOfURLs.txt", "r"); if ($handle) { $count = 0; while (($line = fgets($handle)) !== false) { // process …
I am currently working with woocommerce for wordpress and making a custom plugin. I would like to update the product categories manually through my own admin panel, here is what I have so far: $catTerms = get_terms('product_cat', array('hide_empty' => 0, 'orderby' => 'ASC')); This gets all product categories when looped. I then add checkboxs to the items in the loop like this: <label><input name="" type="checkbox" value="" id="cat_term_<?php echo $catTerm->name;?>" name="cat_term[]" /><?php echo $catTerm->name; ?></label> I then save the terms like …