test-data

How can I fit the test data using min max scaler when I am loading the model?

走远了吗. 提交于 2020-02-22 22:43:45
问题 I am doing auto encoder model.I have saved the model before which I scaled the data using min max scaler. X_train = df.values scaler = MinMaxScaler() X_train_scaled = scaler.fit_transform(X_train) After doing this I fitted the model and saved it as 'h5' file.Now when I give test data, after loading the saved model naturally it should be scaled as well. So when I load the model and scale it by using X_test_scaled = scaler.transform(X_test) It gives the error NotFittedError: This MinMaxScaler

How can I fit the test data using min max scaler when I am loading the model?

China☆狼群 提交于 2020-02-22 22:43:35
问题 I am doing auto encoder model.I have saved the model before which I scaled the data using min max scaler. X_train = df.values scaler = MinMaxScaler() X_train_scaled = scaler.fit_transform(X_train) After doing this I fitted the model and saved it as 'h5' file.Now when I give test data, after loading the saved model naturally it should be scaled as well. So when I load the model and scale it by using X_test_scaled = scaler.transform(X_test) It gives the error NotFittedError: This MinMaxScaler

PHP Script to populate MySQL tables

烈酒焚心 提交于 2020-01-10 18:16:25
问题 Is anyone aware of a script/class (preferably in PHP) that would parse a given MySQL table's structure and then fill it with x number of rows of random test data based on the field types? I have never seen or heard of something like this and thought I would check before writing one myself. 回答1: What you are after would be a data generator. There is one available here which i had bookmarked but i haven't got around to trying it yet. 来源: https://stackoverflow.com/questions/19162/php-script-to

Representative sample test XML file

扶醉桌前 提交于 2020-01-05 07:41:07
问题 I'm looking for a somewhat representative sample test XML file for a typical application. It should contain all typical XML features, such as Elements with and without attributes Text (both structured and unstructured) Namespaces CDATA DTD / Entity declarations Comments Processing instructions And some half-sensible data of around 50kb or more. Does anyone know such a sample document? It should have a license compatible with Apache 2.0 or similar 回答1: You can have a look at XSL examples like

Test User Data (Fake Data) [closed]

社会主义新天地 提交于 2019-12-29 10:07:40
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 6 years ago . Where can I get, or how can I generate a large formatted collection of fake user data (names, email address, locations, etc.) that can

Traveling salesman example with known global optimum

泪湿孤枕 提交于 2019-12-22 05:16:16
问题 I made a memetic algorithm in Python for traveling salesman problem. However, all the test data (list of distances between cities) I've encountered lack the information of the best solution, so I can't know how close to global optimum my algorithm gets. Does anyone know where I can find some tsp test data (preferably in matrix form, but anything's good) with known best solution? 回答1: Did you google? http://www.tsp.gatech.edu/data/index.html That page provides several test-cases of which 16

Spring/Hibernate testing: Inserting test data after DDL creation

本秂侑毒 提交于 2019-12-20 08:39:19
问题 I have a Spring/Hibernate webapp that has some integration tests that run on an in-memory HSQL database. Hibernate takes this blank database and creates all of my test tables and constraints thanks to hbm2ddl=create. However, I have a new bean that checks for a particular config value from the database during its afterPropertiesSet() method, and so when this bean is initialized, such a row needs to exist in the database. Is there any good way to set up a Java/Spring/Hibernate equivalent of

Generate test data using Oracle PL/SQL developer

笑着哭i 提交于 2019-12-18 17:04:45
问题 I want to test some schemas and indexes, and I was wondering if there is a functionality in PL/SQL Developer that can generate test data (so I won't have to create sequences and loops to insert data in the tables). 回答1: Loops and PL/SQL aren't always necessary; this trick might be helpful: insert into emp(id, name, salary) select rownum, 'Employee ' || to_char(rownum), dbms_random.value(2, 9) * 1000 from dual connect by level <= 100; will generate 100 records, named Employee 1 through

How to setup and teardown functional test data in Geb grails

情到浓时终转凉″ 提交于 2019-12-14 03:45:42
问题 I have many working/passing functional geb/spock tests (each extending GebReportingSpec) that are testing a web application with test data all created from the BootStrap.groovy at the beginning of the functional test suite. I want to move the test data creation into startup() / teardown() methods within each Spec, well actually I wanted to have them inherit it from a base class but apparently the StepWise has issues with inheritance. So, at present each of my test spec classes look something

R - factor examcard has new levels

只谈情不闲聊 提交于 2019-12-13 02:15:33
问题 I built a classification model in R using C5.0 given below: library(C50) library(caret) a = read.csv("All_SRN.csv") set.seed(123) inTrain <- createDataPartition(a$anatomy, p = .70, list = FALSE) training <- a[ inTrain,] test <- a[-inTrain,] Tree <- C5.0(anatomy ~ ., data = training, trControl = trainControl(method = "repeatedcv", repeats = 10, classProb = TRUE)) TreePred <- predict(Tree, test) The training set has features like - examcard, coil_used, anatomy_region, bodypart_anatomy and