dummy-data

Automatically generate sql insert statement with dummy data [duplicate]

泄露秘密 提交于 2019-12-05 20:24:04
Possible Duplicate: Quickest way to fill SQL Table with Dummy Data I'm looking for a tool that will generate insert statement for an existing database filled with dummy data. This is meant to allow testing of the system. I'm thinking about something that reads the type of each field and generates data accordingly. If the field name is "username" for example, it's best if it actually knows to take common user names. It should obviously also keep database relations with foreign key constraints. This doesn't seem too difficult to write this. Is there anything ready which I can use? Thanks, Omri i

scikit learn: how to check coefficients significance

我的未来我决定 提交于 2019-12-04 19:27:15
问题 i tried to do a LR with SKLearn for a rather large dataset with ~600 dummy and only few interval variables (and 300 K lines in my dataset) and the resulting confusion matrix looks suspicious. I wanted to check the significance of the returned coefficients and ANOVA but I cannot find how to access it. Is it possible at all? And what is the best strategy for data that contains lots of dummy variables? Thanks a lot! 回答1: Scikit-learn deliberately does not support statistical inference. If you

Generate dummy files in bash

吃可爱长大的小学妹 提交于 2019-12-03 05:40:48
问题 I'd like to generate dummy files in bash. The content doesn't matter, if it was random it would be nice, but all the same byte is also acceptable. My first attempt was the following command: rm dummy.zip; touch dummy.zip; x=0; while [ $x -lt 100000 ]; do echo a >> dummy.zip; x=`expr $x + 1`; done; The problem was its poor performance. I'm using GitBash on Windows, so it might be much faster under Linux but the script is obviously not optimal. Could you suggest me a quicker and nice way to

Convert multiple binary columns to single categorical column [duplicate]

痴心易碎 提交于 2019-12-02 11:38:56
问题 This question already has answers here : For each row return the column name of the largest value (7 answers) Closed last year . I have a table full of binary variables that I would like to condense down to categorical variables. Very simplistically, I have is a data frame like this: data <- data.frame(id=c(1,2,3,4,5,6,7,8,9), red=c("1","0","0","0","1","0","0","0","0"),blue=c("0","1","1","1","0","1","1","1","0"),yellow=c("0","0","0","0","0","0","0","0","1")) data id red blue yellow 1 1 1 0 0

Convert multiple binary columns to single categorical column [duplicate]

╄→гoц情女王★ 提交于 2019-12-02 04:12:21
This question already has an answer here: For each row return the column name of the largest value 7 answers I have a table full of binary variables that I would like to condense down to categorical variables. Very simplistically, I have is a data frame like this: data <- data.frame(id=c(1,2,3,4,5,6,7,8,9), red=c("1","0","0","0","1","0","0","0","0"),blue=c("0","1","1","1","0","1","1","1","0"),yellow=c("0","0","0","0","0","0","0","0","1")) data id red blue yellow 1 1 1 0 0 2 2 0 1 0 3 3 0 1 0 4 4 0 1 0 5 5 1 0 0 6 6 0 1 0 7 7 0 1 0 8 8 0 1 0 9 9 0 0 1 And what I would like to get back would be:

R: Expanding an R factor into dummy columns for every factor level

拥有回忆 提交于 2019-12-02 01:55:48
I have a quite big data frame in R with two columns. I am trying to make out of the Code column ( factor type with 858 levels) the dummy variables. The problem is that the R Studio always crashed when I am trying to do that. > str(d) 'data.frame': 649226 obs. of 2 variables: $ User: int 210 210 210 210 269 317 317 317 317 326 ... $ Code : Factor w/ 858 levels "AA02","AA03",..: 164 494 538 626 464 496 435 464 475 163 ... The User column is not unique, meaning that there can be several rows with the same User . Doesn't matter if in the end the amount of rows remains the same or the rows with the

Create a binary indicator matrix (Boolean matrix) in R

烂漫一生 提交于 2019-12-01 22:43:31
I have a list of data indicating attendance to conferences like this: Event Participant ConferenceA John ConferenceA Joe ConferenceA Mary ConferenceB John ConferenceB Ted ConferenceC Jessica I would like to create a binary indicator attendance matrix of the following format: Event John Joe Mary Ted Jessica ConferenceA 1 1 1 0 0 ConferenceB 1 0 0 1 0 ConferenceC 0 0 0 0 1 Is there a way to do this in R? Assuming your data.frame is called "mydf", simply use table : > table(mydf) Participant Event Jessica Joe John Mary Ted ConferenceA 0 1 1 1 0 ConferenceB 0 0 1 0 1 ConferenceC 1 0 0 0 0 If there

How to use dummy variable to represent categorical data in python scikit-learn random forest

情到浓时终转凉″ 提交于 2019-11-29 08:22:36
I'm generating feature vector for random forest classifier of scikit-learn . The feature vector represents the name of 9 protein amino acid residues. There are 20 possible residue names. So, I use 20 dummy variables to represent one residue name, for 9 residue, I have 180 dummy variables. For example, if the 9 residues in the sliding window are: ARNDCQEGH (every one letter represent a name of a protein residue),my feature vector will be: "True\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\tFalse\t False\tTrue

Quickest way to fill SQL Table with Dummy Data

穿精又带淫゛_ 提交于 2019-11-28 19:10:43
What is the quickest way to fill a SQL table with dummy data? I have a wide table with about 40 fields of different kinds (int, bit, varchar, etc.) and need to do some performance testing. I'm using SQL Server 2008. Thank you! SQL Data Generator by RedGate Data generation in one click Realistic data based on column and table name Data can be customized if desired Eliminates hours of tedious work Full support for SQL Server 2008 Recommend the free, GNU-licensed, random custom data generator http://www.generatedata.com/ Late answer but can be useful to other readers of this thread. Beside other

What is an easy way to stub / dummy a restful web service?

痴心易碎 提交于 2019-11-28 17:52:52
I want to create an android application, this application will make RESTful calls to a web service to obtain some data. I know what the RESTful interface will be, but I don't want the hassle of creating my own implementation. Is there an easy way to create a stub RESTful web service that will return some static data without having to write a full blown WS application to do this? Probably the best thing to do is create a mock for the REST web service service while you're developing your application code and then replace it with code to call the actual web service returning "real" data, once