orange

get Classification accuracy on test data using previous saved model

大城市里の小女人 提交于 2019-12-25 00:13:51
问题 I am using Orange data mining tool to write a python script to get classification accuracy on test data using a previous saved model(pickle file). dataFile = "training.csv" data = Orange.data.Table(dataFile); learner = Orange.classification.RandomForestLearner() cf = learner(data) #save the pickle file with open("1.pkcls", "wb") as f: pickle.dump(cf, f) #load the pickle file with open("1.pkcls", "rb") as f: loadCF = pickle.load(f) testFile = "testing.csv" test = Orange.data.Table(testFile);

Orange Python data load error: “example of invalid length”

ぐ巨炮叔叔 提交于 2019-12-24 01:45:39
问题 I am trying to load a .csv file using python & Orange (machine learning package) and getting an error. I have 208 columns but in the error I only see few columns and after that nothing. What does the error mean? example of invalid length: (0 REAL P 16 0 1 0 112.11.119.78 Mozilla/5.0 (Linux; U; Android 4.0.3; zh-cn; HTC Sensation Z710e Build/IML74K) AppleWebKit/534.30 (KHTML like Gecko) Ve android_android23 Droid Smartphone Android 4.0.3 0 1 1 0 0 0 1 Android_Phones Null Null Null Null Null

PHP数组教程

孤街浪徒 提交于 2019-12-23 05:02:43
定义数组   PHP数组array是一组有序的变量,其中每个变量被叫做一个元素。 一、定义数组   可以用 array() 语言结构来新建一个数组。它接受一定数量用逗号分隔的 key => value 参数对。 array( [key =>] value , ... ) // key 可以是 数字 或者 字符串 // value 可以是任何值 例子1: <? php $phpjc = array ( 0 => ' word ' , 3 => ' excel ' , ' outlook ' , ' access ' ); print_r ( $phpjc ); ?> 输出结果如下 : Array ( [ 0 ] => word [ 3 ] => excel [ 4 ] => outlook [ 5 ] => access )   例子1定义了一个数组,名字叫phpjc,第一个元素的值是:word,(说明:数组是从0开始计数的),第二个元素为空,第三个元素是:excel,后面自动生成第四和第五个元素   可以通过给变量赋予一个没有参数的array()来创建空数组, 然后可以通过使用方括号[]语法来添加值。(注:另外也可用 array_push() 函数向数组中添加值!!!) 例子2: <? php $phpjc = array (); $phpjc [] = " one " ;

PHP中array数组教程

一世执手 提交于 2019-12-23 05:01:21
本文来自 http://www.cnblogs.com/qiantuwuliang/archive/2010/02/26/1674504.html 定义数组   数组array是一组有序的变量,其中每个变量被叫做一个元素。 一、定义数组   可以用 array() 语言结构来新建一个数组。它接受一定数量用逗号分隔的 key => value 参数对。 array( [key =>] value , ... ) // key 可以是 数字 或者 字符串 // value 可以是任何值 例子1: <? php $phpjc = array ( 0 => ' word ' , 3 => ' excel ' , ' outlook ' , ' access ' ); print_r ( $phpjc ); ?> 输出结果如下 : Array ( [ 0 ] => word [ 3 ] => excel [ 4 ] => outlook [ 5 ] => access )   例子1定义了一个数组,名字叫phpjc,第一个元素的值是:word,(说明:数组是从0开始计数的),第二个元素为空,第三个元素是:excel,后面自动生成第四和第五个元素   可以通过给变量赋予一个没有参数的array()来创建空数组, 然后可以通过使用方括号[]语法来添加值。(注:另外也可用 array_push()

Can't install Orange: “error: command 'clang' failed with exit status 1”

半腔热情 提交于 2019-12-18 02:47:37
问题 I am trying to install Orange on my Mac OS X 10.7.3 (Lion) and I keep getting an error when using either pip or building from source. First, I was getting an error that read: error: command 'gcc-4.0' failed with exit status 1 I have Xcode 4, which comes bundled with gcc 4.2.1. So I installed 64-bit/32-bit Python 2.7.3, which has gcc 4.2 built in. I also tried to override the compiler choice using: export CC=gcc-4.2 But this produced a different error: gcc-4.2 not found, using clang instead ..

字典(dict)

倖福魔咒の 提交于 2019-12-17 05:57:53
字典是无序的 value可以是任意的数据对象,key必须是唯一的,必须是可hash的,大多数情况以数字和字符串的方式构成 --常见方法 查询/访问 get,[] 初始化/赋值 =,setdefault,fromkeys,zip,dict(),copy() 修改/更新 =,update 排序 sorted,sort() 删除 pop,popitem,clear,del 遍历 for key in d/d.iterkeys()/d.keys()/iter(d): for key,val in d.items()/d.viewitems(): for val in d.values()/d.viewvalues(): --初始化 >>> a={} >>> a=dict() >>> b=dict(zip(['name','age'],['qiz',20])) >>> b {'age': 20, 'name': 'qiz'} >>> b=dict(name='qiz',age=20) >>> b=dict((['name','qiz'],['age',20])) >>> bb=b.fromkeys(['first_name','last_name'],'chen') {'first_name': 'chen', 'last_name': 'chen'} >>> bb=b.fromkeys([

Anaconda/Orange3 produces OSError: [WinError 193] %1 is not a valid Win32 application

夙愿已清 提交于 2019-12-13 02:45:08
问题 When I try to launch Orange 3 under Windows 10 in Anaconda I get the following error: Traceback (most recent call last): File "C:\Users\i7\Anaconda3\Scripts\orange-canvas-script.py", line 6, in from Orange.canvas.__main__ import main File "C:\Users\i7\Anaconda3\lib\site-packages\Orange\__init__.py", line 5, in from Orange.data import _variable File "C:\Users\i7\Anaconda3\lib\site-packages\Orange\data\__init__.py", line 4, in from .variable import * File "C:\Users\i7\Anaconda3\lib\site

Cannot install Orange 3 ImportError: PyQt4, PyQt5 or PySide are not available for import

早过忘川 提交于 2019-12-13 00:13:24
问题 I am using Ubuntu 14.04. I have created a virtual environment and installed Orange using pip install orange3 I also installed PyQt4 using sudo apt-get install python3-pyqt4 But when I launch orange3 from terminal I got the following error. Traceback (most recent call last): File "/home/arun/.virtualenvs/orange3env/bin/orange-canvas", line 11, in <module> load_entry_point('Orange3', 'gui_scripts', 'orange-canvas')() File "/home/arun/.virtualenvs/orange3env/lib/python3.4/site-packages/pkg

Most Visualization Tools are Missing from Orange.Canvas (2015/06/15 source)

有些话、适合烂在心里 提交于 2019-12-12 12:37:43
问题 My orange-canvas is installed on Mint14 under Anaconda python2 environment. Tools appears in "Visualize" section are: Attribute Statistics, Mosaic Display, Sieve Diagram and Venn Diagram. The X-Y Scatter plot module, in particular, is the one I will need. The source is acquired from github, compiled by the instruction: python setup.py build python setup.py install The following error appears multiple times when compiling source: warning: command line option ‘-Wstrict-prototypes’ is valid for

How do I create a new data table in Orange?

点点圈 提交于 2019-12-12 08:12:43
问题 I am using Orange (in Python) for some data mining tasks. More specifically, for clustering. Although I have gone through the tutorial and read most of the documentation, I still have a problem. All the examples in docs and tutorials assume that I have a tab delimited table with data in it. However, there is nothing saying how one can go about creating a new table from scratch. For example, I want to create a table for word frequencies across different documents. Maybe I am missing something