Read corpus from a csv file in Orange3

I have twitter text as an Excel file: every line is one one tweet. How do I view this corpus in Orange3? I don't understand why I can't simply see this corpus. As you can see in the image below, the channel is red and there's nothing in Corpus View, while Data Table shows some data
Category: Data Science

Poor neural net regressive fit to data that exhibit clear structure

I've been trying to use a simple NN to model data I've generated. The data lack a closed form expression, but exhibit clear structure. The MWE below emulates similar data. I find that any NN I create, including the one in the MWE below, seems to simultaneously over and under predict the values (in my actual data, the fishtail straddles the y=x line). I've tried tuning the hyperparameters of the model, adding inputs, adding training data, selectively pruning training data, …
Category: Data Science

Understanding 'scale_boxes' in YOLO Algorithm of CNN

I'm studying Andrew NG's Convolutional Neural Networks and am in Week 3 of the course which deals with object detection using YOLO algorithm . I don't understand one section in the programming assignment that uses a function called 'scale_boxes' . This is what is described about the function in the course materials. "*There're a few ways of representing boxes, such as via their corners or via their midpoint and height/width. YOLO converts between a few such formats at different times, …
Category: Data Science

current user's password check

I am developing my-account page. I set to edit user's info. But. I can't find the exact information about how to check the password before updating user's data. Maybe, wp_check_password() would works.. but I don't know hot to apply. My codes are below. But it doesn't works. Can you give me hand? $current_user = wp_get_current_user(); $user = get_user_by( 'login', $current_user->ID ); $pass_check = esc_attr($_POST['password']); if ( $user && wp_check_password( $pass_check, $user->data->user_pass, $user->ID) ) ) { wp_redirect( get_permalink() . '?validation=passwordincorrect' ); …
Category: Web

Individual P-values in Logistic Regression

I ran a logistic regression with like 10 variables (with R) and some of them have high P-values (>0.05). Should we follow the elimination techniques that we follow in multiple linear regression to remove insignificant variables? Or is the method different in logistic regression? I'm new to this field so please pardon me if this question sounds silly. Thank you.
Category: Data Science

What are the theoretical differences of multitask learning vs fine tuning based transfer learning?

Suppose, I have the following scenarios: I have a bunch of fruits, i.e., apple, orange, and banana. I simply made a multitask model, where my network first tell me which fruit it is, and then telling me the color of it. Suppose, if I give my network an apple, it tells me, (a) it is apple, (b) it is red. By doing some theoretical study, I have understood that it is one type of inductive transfer learning (TL) (correct me, …
Category: Data Science

Every time I use wp_get_current_user() my plugin breaks

I have been trying to make a sign-out plugin that allows users to sign out from military training activities that they should be at. After they fill out a form explaining why they are not going to be at an activity, they submit it, and it puts all the data into a mysql database. I am trying to save the user's id to their other data so we can tell who is signing out, but everything I have tried breaks …
Category: Web

SVM radial basis generate equation for hyperplane

I need to generate an equation for hyperplane, I have two independent variables and one binary dependent variable. Regarding this following equation for svm , $f(x)=sgn( sum_i alpha_i K(sv_i,x) + b )$ I have two independent variables (say P and Q) with 130 point values for each variable. I used svm radial basis function for binary classification (0 and 1) and I calculated for radial basis kernelized case, and now I have One column of 51 y (i) alpha (i) …
Category: Data Science

Change Dashboard menu position?

I am trying to put three menu items before the Dashboard menu item in admin dashboard. Problem is that Dashboard has menu position 2. I can manage to put in two menu items before with position 0 and 1, but 2 collides with Dashboard. So my thought was to move the Dashboard position. Is this possible? Can I change Dashboard menu position from 2 to something else (like 3, 4 or 5)? Is there a hook for this?
Category: Web

Use subdomain for certain urls

I have the following rules in my .htaccess file on a WordPress (single installation): # REWRITE FORUMS DOMAIN TO FOLDER RewriteCond %{HTTP_HOST} ^forums\.example\.com$ RewriteRule !^forums/? forums%{REQUEST_URI} [NC,L] # REWRITE FORUMS FOLDER TO SUBDOMAIN RewriteCond %{THE_REQUEST} \s/forums/([^\s]*) [NC] RewriteRule ^ http://forums.example.com/%1 [R=301,L] This is so that the forums that exist at http://example.com/forums are accessed at http://forums.example.com/ However the server just blows up with a 500 server error... Any ideas on how to do this? These rules work perfectly when used on …
Category: Web

Using PCA to cluster multidimensional data (RFM variables)

So i am performing k-means clustering on RFM variables (Recency, Frequency, Monetary). The RFM variables are in the form of quantiles (1-4). I used PCA and found the PCA components. I then used the elbow method to find the optimal number of clusters and then I use it in the k-means algorithm. Could anyone guide me if this is a correct method? Further, the clusters I get range on the graph, their axis ranges from -3 to 3 and I …
Category: Data Science

Backpropagation with log likelihood cost function and softmax activation

In the online book on neural networks by Michael Nielsen, in chapter 3, he introduces a new cost function called as log-likelihood function defined as below $$ C = -ln(a_y^L) $$ Suppose we have 10 output neurons, when back propagating the error, only the gradient w.r.t. $y^{th}$ output neuron is non-zero and all others are zero. Is that right? If so, how is the below equation (81) true? $$\frac{\partial C}{\partial b_j^L} = a_j^L - y_j $$ I'm getting the expression …
Category: Data Science

Active Directory and group permissions

I'm trying to modify WordPress to have the following features: Users are created in Active Directory and assigned to groups. Users can login to WordPress via Active Directory. Pages can be locked down to only be visible to members of certain Active Directory groups. A "Downloads" page can be seen by members of any of several groups but each group can only see downloads that they have been given permission to see (I'm flexible to how this could be represented …
Category: Web

Why infinite sampling is not realisitc assumpition in most real applications

I came across the below paragraphs, which I believe are the answers to the question Why infinite sampling is not realistic assumption in most real applications. Still i dont get the below explanation ?. When we draw more samples from the environment, MC brings the approximate value function close to the true value function isn't it ? Then why infinite sampling is not considered as a realistic assumption. We made two unlikely assumptions above in order to easily obtain this …
Category: Data Science

Any way to use a custom Parameter for vimeo embed without using an iframe?

I am trying to get some oembed parameters attached to my Vimeo clips. I tried to get it going using the following two instructions: Passing Parameters to a Vimeo link in a WordPress Custom Field - LimeCanvas.com Any way to use a custom parameter for YouTube embed without using an iframe - WordPress.SE.com Unfortunately what works for YouTube won't work for Vimeo, as the returning URL has no such string as ?feature=oembed that I can make str_replace work on. It …
Category: Web

How to implement very unusual wordpress routing structure?

Been trying the last two weeks to setup an unusual routing structure for a WordPress website but cannot manage to make it work. Basically there is a custom post type that will get the post url based on the post category(multiple categories) eg: site.com/movie-category/list/movie/ In this there are also news located at: Site.com/movie-category/news/ and for single news it will be site.com/moviecategory/thenews. Then another one called e.g. articles which are located at: Site.com/moviecategory/list/articles Site.com/moviecategory/list/articles/articlename A bunch of others too like /blog/post …
Category: Web

How can I fixed the filter and Kernel Size of a CNN?

I have created 4 x 4 2d images from a signal. Now, I want to feed this data to a Convolutional neural Network. How I can choose the nubmber of filter, Kernel Size for this small, shape and size of dataset (4 x 4, 320 images). Should I use maxpooling layer ? Note: I have already implemented a model for this dataset and accuracy is 78.125%. The model is,
Category: Data Science

How to loop specific Category menu from archive page?

I'm trying to loop a specific product category menu from the archive.php page and the category has 4 columns or as a 4th Tree How I can Loop it here in ul ? <ul><!-- 1--> <li><a> First tree</a> <ul><!-- 2--> <li><a>Second Tree</a> <ul><!-- 3--> <li><a>Third Tree</a> <ul><!-- 4--> <li><a>Fourth Tree</a></li> </ul> </li> </ul> </li> </ul> </li> </ul>
Category: Web

Score Columns in Azure ML Studio

So I have a data set I have successfully used to train a model, and have decent results. I am using a Two Class Boosted Decision tree for a Boolean output. So far so good. I now want to analyze each column of my data set and remove any column that is not a meaningful influence on the outcome. I see statistics on columns in my data set: But I don't see whether a column has a strong relationship with …
Category: Data Science

Is there a Woocommerce hook that fires when applying a coupon but before checking if it's valid?

I want to add an item to the cart (that same item gets discounted with the coupon) upon using a coupon code (with a hook). E.g. when using the coupon code SAMPLECODE, a product is added to the cart with a $2 discount. The coupon is set up to apply a $2 discount for that product only. The problem is, that my coupon code only applies to the item that is going to be added programmatically, so it fails the …
Category: Web

Changing a neural network to not overfit

I am trying to classify around 400K data with 13 attributes. I have used python sklearn's SVM package, but it didn't work, and then I learned that SVM's are not suitable for large dataset classification. Then I used the (sklearn) ANN using the following MLPClassifier: MLPClassifier(solver='adam', alpha=1e-5, random_state=1,activation='relu', max_iter=500) and trained the system using 200K samples, and tested the model on the remaining ones. The classification worked well. However, my concern is that the system is over trained or overfit. …
Category: Data Science

How do I change a plugin language of only one page?

My WordPress blog is set up as nl_NL. This means that my bookly plugin is also displayed in nl_NL. In the Plugin directory there is a folder languages with loads of other languages. I have one page in three different languages nl_NL, de_DE, en_EN, on this page I would like the booking plugin to be displayed in the correct language. I changed the page language via page id from nl_NL to de_DE Via the function.php, but this had no effect. …
Category: Web

Performance metrics for LSTM Autoencoder

I am building an LSTM Autoencoder (unsupervised model) to detect anomalies in a time series dataset. The input is telemetry data from routers and I want to detect anomalies in the throughout of router. The ground truth of whether the anomaly raised by the model is actually an anomaly or not, is unavailable at the time the anomaly is raised. I would like to know what would be the correct way to measure the model performance for my use case. …
Category: Data Science

Correcting for one of multiple strong batch effects in a dataset

I am wondering which statistical tools to use when analysing data that have multiple strong batch effects (distributions vary from one batch to another). I would like to correct batch effect when it originates from one variable, without taking off the potential batch effect from other variables. If this is unclear, taking a short example is probably the best way to go to explain my problem: Imagine that we have 10 persons taking part in an experiment. The experiment is …
Category: Data Science

Choosing a right algorithm for template-based text generation

I am doing a text generation project -- the task is to basically represent the statistical data in a readable way. The way I decided to go about this is template-based: each data type has a template for how sentence should be formed and what synonyms can be used. I'm torn about whether some kind of ML techinque can bolster this template-based approach. Text should be unique -- so I need an algorithm that optimises for uniqueness. Now, there are …
Category: Data Science

Retrieving JSON data in ajax request from media uploader

I'm having some problems getting my JSON data that's being passed via an ajax request. I'm trying to implement the media uploader into a plugins settings page. I've got it functioning properly using this method as far as the media uploader functionality is concerned. I'd like to be able to retrieve the 'attachment' data in PHP, decode it and then process it once the media uploader is closed and the images have been selected. The ajax request is working because …
Category: Web

Import JSON feed into Wordpress Post (wp_insert_post) every 24 hours

I am importing a JSON feed using a php file I am then looping through the JSON data and creating/updating a post using the wp_insert_post function. I want to query the JSON feed every 24 hours to sync any new information to Wordpress. I thought having something like zapier hit the page every 24 hours to run the php could work but it seemed there must be a better way to do that in wordpress/php?
Category: Web

Find the method which AJAX GET calls

I need to find bug in a Wordpress site. But I can't find the method (function) that the AJAX GET call runs on backend. That's not admin part of website, but front end part of website. important I found the url where AJAX call is sent, but don't know how to find the method/function. code for sending AJAX call looks like this I have code for sending XMLHttpRequest something like this: var xhr = new XMLHttpRequest(); xhr.open("GET", "http://themes.qnimate.com/qplog/wp-admin/admin-ajax.php?action=logged_in_check"); xhr.setRequestHeader("X_REQUESTED_WITH","xmlhttprequest"); xhr.onload …
Category: Web

Create new rows based on a value in a column

My dateset is generated like the example df = {'event':['A','B','C','D'], 'budget':['123','433','1000','1299'], 'duration_days':['6','3','4','2']} I need to create rows for each event based on the column 'duration_days', if I have duration = 6 the event may have 6 rows: event budget duration_days A 123 6 A 123 6 A 123 6 A 123 6 A 123 6 A 123 6 B 123 3 B 123 3 B 123 3
Category: Data Science

Can we extract data types of features/variables from pickled model for Logistic Regression, Decision Tree, Random Forest?

I am trying to extract data types of variables/features from a pickled ML model file. I could see there is no information of the data types of variables in pickle file except for XG Boost. Is there any way to extract the data type information from pickle model file for other ML algorithms?
Category: Data Science

Classifying transactions as malicious

I have a big data set of fake transactions for a company. Each row contains the username, credit card number, time, device used, and amount of money in the transaction. I need to classify each transaction as either malicious or not malicious and I am lost for ideas on where to start. Doing it by hand would be silly. I was thinking possibly checking for how often a credit card is used, if it is consistently used at a certain …
Category: Data Science

Replacing rows of dataframe with rows of another dataframe that have the same index

I have a dataframe that has rows with indices 0 to 128 and a smaller dataframe with indices 4, 8, 105, and 107. I made edits to the rows in the smaller dataframe and am now trying to replace rows indexed 4, 8, 105, and 107 in the large dataframe with rows indexed 4, 8, 105, and 107 in the smaller dataframe. Why can I not just do: bigDF[smallDF.index] = smallDF How would I accomplish this replacement? Thank you!
Category: Data Science

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.