Filtering assoc rules using subset method.
Hello,
Am trying to filter the association rules using subset method of arules package.
I have a vector of items that are to be filtered from LHS/RHS.
Here is the sample code that i have used.
metalAssoc.mod <-ore.odmAssocRules(~.,NBAssocreqOF,case.id.column="TRANSACTION_VALUE",item.id.column = "PARAM_NAME",
item.value.column = "PARAM_VALUE_BIN",min.support = 0.05 ,min.confidence = 0.5,max.rule.length = 5)
rules <- rules(metalAssoc.mod)
arules <- ore.pull(rules)
1. Able to filter the rules using below condition.
arules.subset <- subset(arules, subset= rhs %pin% "Temperature" | rhs %pin% "Pressure" )
2. We get a string like "Temperature";"Pressure" to the function as input.
Tried forming a vector out of the string and
arules.subset <- subset(arules, subset= rhs %pin% c( "Temperature", "Pressure")
This command throws the below error.
Error in rhs %in% c("Pressure", "Temperature") :
table contains an unknown item label
3. Tried forming a string str with valuerhs %pin% "Temperature" | rhs %pin% "Pressure"
arules.subset <- subset(arules, subset= str )
Got the below error
Error in .translate_index(i, rownames(x), nrow(x)) :
subscript out of bounds
Our aim is to filter the rules based on the list of items from RHS/LHS that are passed as a function variable.
Any help is greatly appreciated.
Thanks,
Swathi.
Swathi,
If I understand correctly, the following example from the ore.odmAssocRules help file accomplishes what you want using the functions itemsets() along with subset():
set.seed(7654)
id <- 1:10
color <- sample(c("B", "Y", "W", "G"), 10, replace=TRUE)
shape <- sample(c("tri", "rect", "round"), 10, replace=TRUE)
state <- sample(c("MA", "CA", "NY"), 10, replace=TRUE)
data3.ore <- ore.frame(ID=id, COLOR=color, SHAPE=shape, STATE=state)
ar.mod3 <- ore.odmAssocRules(~., data3.ore, case.id.column = "ID",
min.support = 0.15, min.confidence = 0.05, max.rule.length = 2)
rules <- subset(rules(ar.mod3), min.confidence=0.5,
lhs=list(SHAPE="tri", COLOR="B"), orderby="lift")
itemsets <- subset(itemsets(ar.mod3), min.support=0.35)
To view the help file for ore.odmAssocRules, type at the R command prompt:
?ore.odmAssocRules
Sherry
Similar Messages
-
Sorting members using Load Rule Parent Child Method
Hi all,
I have a Product Dimension with around 7 gen's and wanted to sort Gen 3 members under parent (say CommProduct). All these members are initially loaded using Studio and i am trying sort Gen 3 members using a text file / Load Rule (Parent Child Method). I have "Allow Moves" ,"Allow Property Changes" and member sorting: None checked for the load rule. I tried updating the outline using the load rule, however the outline remains unchanged and members sorted by alphabets.
Essbase Version: 11.1.2.3
Current Hierarchy:
Product
CommProduct
A
B
C
D
E
Hierarchy Wanted:
Product
CommProduct
A
C
E
B
D
Dim Build Text File:
Parent,Child,Aggregation
CommProduct,A,+
CommProduct,C,+
CommProduct,E,+
CommProduct,B,~
CommProduct,D,+
Any help would be highly appreciated.
ThanksCan't you create a column where you can specify the desired order and build accordingly. I don't think you can achieve that using a load rule. Allow moves works only if the members are under a different parent. In your case it is the same parent.
Regards
Celvin
http://www.orahyplabs.com -
Using a method return in a taskflow router
I have a custom data control with following method:
public String getOutcome(){
String outcome;
//do stuff
if(something)
outcome = "o1";
else
outcome = "o2";
return outcome;
}This method is dropped on the taskflow as method call.
How can I use the return value of this method call to drive the decision of a router component of the taskflow?We can not used the method for decision the navigation rule.You have to use the router for resolving your issue.
Or if you want to navigate through the method then inside your method you have to programmatically navigate to pages on the basis of diffenent condition.
you can used following code for navigation .
FacesContext fc = FacesContext.getCurrentInstance();
Application application = fc.getApplication();
NavigationHandler navHandler = application.getNavigationHandler();
navHandler.handleNavigation(fc,null, "navigation case name"); Thanks
Prateek -
Hi All,
I would assume this is a common problem.
I am a having problems using filters on SharePoint 2013 Lists on a custom site page.
I am using the Filter (text, date, Choice) Web Parts, however due to the limitations of the filter web parts, I am also using Parameters and the Filters from within SharePoint designer. Using this method, I am able to search date ranges and partial
text on set columns. The problem is that I have to fill out all the filter fields in order to get any results. If a filter is left blank then the list should only filter on the other filters. Instead it no results are returned.
In addition, if I do set the filters, how do you reset the filters to show all records again?
ThanksThe only way I've figured out is to create a field that is always empty, e.g., a calculated text field, and use that field to "test" if the parameter is blank. Here's an example CAML query fragment:
<Or>
<Contains>
<FieldRef Name="WorkflowDocsDescription"/>
<Value Type="MultiLookup">{DocDescriptionTextFilterValue}</Value>
</Contains>
<Eq>
<FieldRef Name="Empty"/>
<Value Type="Text">{DocDescriptionTextFilterValue}</Value>
</Eq>
</Or>
This may not perform well in a large list, but perhaps an index on the Empty field would remedy.
GShore -
Dear all, I have just bought a MacBook pro with osx lion on 25th last month. I wanted to know if I can use the methods described above to update to osx mountain lion or I have to buy osx mountain lion from the app store?
Here are the rules to qualify for the free upgrade:
http://www.apple.com/osx/uptodate/
(has to be purchased from Apple or authorized reseller). -
Filters and rules for Data Synchronizer
Unfortunately or luckily our datasync server is positioned in the internal
network. The main reason is the archiving solution for groupwise mail which
uses a special connector on the datasync server to capture all email for
specific mailboxes. So the entire mailflow can remain in our internal
network and is not transferd out in the DMZ.
But for few devices (like iPhone, iPad or smartphones with Android) with active
sync protocol I want to sync the groupwise email, appointment and contacts
to that devices.
My problem, however is that the mobile devices want to use a secure connection on port 443 to get over 2 Bordermanager 3.9 SP2 servers.
I did́ t find any examples on filters and rules in the documentation to
do this.
My idea is to use a nated public ip adress on the outer BM-server and
acceleration on the inner BM-server.
Maybe I am wrong and there are or is a better solutions.
It would be great, if there is anyone who can help me with this problem
Best regardsjeep,
It appears that in the past few days you have not received a response to your
posting. That concerns us, and has triggered this automated reply.
Has your problem been resolved? If not, you might try one of the following options:
- Visit http://support.novell.com and search the knowledgebase and/or check all
the other self support options and support programs available.
- You could also try posting your message again. Make sure it is posted in the
correct newsgroup. (http://forums.novell.com)
Be sure to read the forum FAQ about what to expect in the way of responses:
http://forums.novell.com/faq.php
If this is a reply to a duplicate posting, please ignore and accept our apologies
and rest assured we will issue a stern reprimand to our posting bot.
Good luck!
Your Novell Product Support Forums Team
http://support.novell.com/forums/ -
Not able to reload the data from DB using finder methods
Hi all,
<p>
I am facing a weird problem while using finder methods.
I am using weblogic 8.1 SP3 and entity beans are CMP with DB concurrency.DB is oracle
</p>
<h4>Problem Description</h4>
<p>
I am having one session bean which internally interacts with my entity beans,
Now say my transaction is getting initiated in one of the session bean and I use some finder in it.
</p>
<p>
To make the problem more clear lets say my entity bean is loanBean with loanId as primary key.
Now say method A of session bean initiates the transaction and I use something like
<br>
LoanLocal loanLocal =loanLocalHome.findByLoanId(loanId);
<br>
<b>Note that I am not using findByPrimaryKey method</b>
<br>
now this method A calls some other method B on some session bean which is having Required as its transaction attribute.
<br>
But before the call of B some other thread or background process updates the DB for this loanId and commits,
<br>
now when I fire the same finder in method B I am still getting the old data, ie I am not getting the data which has been modified in DB and committed by some other thread, I still get the old data and when I tried to generate the SQL queries which weblogic is firing, I see
it fires the SQL for every finder other that findByPrimaryKey.
<br>
<b>
Now my problem is I am getting the old data only and I need the new updated data of DB. isolation-level of DB and beans is READCOMMITTED.
Note:: I cant use new transaction to read the data.
</b>
<br>
And I couldn't understand that when weblogic is firing query for every finder then why it should not refresh the data in its cache. Is there any way to disable this kind of caching and say that everytime when i use finder just go to DB and get me the last committed data.
</p>
<br>
Any help in this regard would be very helpful to me.
<br>
Thanks and Regards
<br>
Manish Garg.
</p>Hi,
In my understanding, cache is not involved in this scenario. As you
observed, the container fires sql every time when you invoke this finder.
So, it should just give the result that it got from the DB. Is there a
possibility that the DB is using repeatable_read or serializable for
isolation level?
You can debug further by doing couple of things -
1. Instrument the code in the generated RDBMS java file for the entity bean
(if you use -keepgenerated option for weblogic.ejbc, u can get the source of
this file). This class will have the implementation for ejbFindByLoanId. You
can just print the result set data after the query is fired.
2. Try the same scenario without the ejb container. Like, write a jsp which
will start a user tx and fire the query twice such that there is an update
between the two queries. Note that, you need to use a TxDataSource to get
the JDBC connection so that it will be tx aware.
--Sathish
<Manish Garg> wrote in message news:[email protected]...
Hi all,
<p>
I am facing a weird problem while using finder methods.
I am using weblogic 8.1 SP3 and entity beans are CMP with DB
concurrency.DB is oracle
</p>
<h4>Problem Description</h4>
<p>
I am having one session bean which internally interacts with my entity
beans,
Now say my transaction is getting initiated in one of the session bean and
I use some finder in it.
</p>
<p>
To make the problem more clear lets say my entity bean is loanBean with
loanId as primary key.
Now say method A of session bean initiates the transaction and I use
something like
<br>
LoanLocal loanLocal =loanLocalHome.findByLoanId(loanId);
<br>
<b>Note that I am not using findByPrimaryKey method</b>
<br>
now this method A calls some other method B on some session bean which is
having Required as its transaction attribute.
<br>
But before the call of B some other thread or background process updates
the DB for this loanId and commits,
<br>
now when I fire the same finder in method B I am still getting the old
data, ie I am not getting the data which has been modified in DB and
committed by some other thread, I still get the old data and when I tried
to generate the SQL queries which weblogic is firing, I see
it fires the SQL for every finder other that findByPrimaryKey.
<br>
<b>
Now my problem is I am getting the old data only and I need the new
updated data of DB. isolation-level of DB and beans is READCOMMITTED.
Note:: I cant use new transaction to read the data.
</b>
<br>
And I couldn't understand that when weblogic is firing query for every
finder then why it should not refresh the data in its cache. Is there any
way to disable this kind of caching and say that everytime when i use
finder just go to DB and get me the last committed data.
</p>
<br>
Any help in this regard would be very helpful to me.
<br>
Thanks and Regards
<br>
Manish Garg.
</p> -
Passing values from applet using POST method to PHP page
Hello there ;)
I realy need a help here.. I`ve been working all day on sending mail from applet. I didn`t succeed bcs of the security restrictions.
So I decided just to pass arguments into PHP page, which process them and send e-mail to me.
So here is the problem.. I need to send String variables througth POST into my php page. Now I`m using GET method, but I need more than 4000 characters.
My actual solution is:
URL url = new URL("http://127.0.0.1/index.php?name=" + name + "&message=" + message);
this.getAppletContext().showDocument(url,"_self");I really need to rewrite it into POST. Would you be so kind and write few lines example [applet + php code]? I`ve already searched, googled, etc.. Pls don`t copy links to other forums here, probably I`ve read it.
Thanx in advance to all :)hi!
i`ve got some news about my applet.. so take this applet code:
public class Apletik extends JApplet {
public void init() { }
public void start()
try
String aLine; // only if reading response
String parametersAsString = "msg=ahoj&to=world";
byte[] parameterAsBytes = parametersAsString.getBytes();
// send parameters to server
URL url = this.getCodeBase();
url = new URL(url + "spracuj.php");
URLConnection con = url.openConnection();
con.setDoOutput(true);
con.setDoInput(true); // only if reading response
con.setUseCaches(false);
con.setRequestProperty("Content=length", String.valueOf(parameterAsBytes.length));
OutputStream oStream = con.getOutputStream();
oStream.write(parameterAsBytes);
oStream.flush();
String line="";
BufferedReader in = new BufferedReader(new InputStreamReader(con.getInputStream()));
while ((aLine = in.readLine()) != null)
JOptionPane.showMessageDialog(null, aLine);
if(aLine.equals("")) break;
in.close();
oStream.close();
catch (Exception ex)
JOptionPane.showMessageDialog(null, ex.toString());
}here is code of spracuj.php which is on server:
<?php
if(isset($_POST['msg']))
echo('hurray!');
?>it has only 1 problem.. when i test it on my localhost, everything seems to be all right. but when i post it to my server, i got IOException HTTP 400 error code :( where is the problem? please help me, i`m so close :D thanx -
Print using ALV method-set_table_for_first_display
Hi ,
I have developed a report with ALV output , using the method -set_table_for_first_display.
But now I am asked to change it to print the output also in 8/11" sheet.
Please suggest how I can do it.
Thanks & Regards,
RamanaPrint function on the ALV toolbar? Is it there? Or, what I have done upon occasion is put a checkbox on selection panel to indicate printout desired. The loop through the table that is used for the ALV display and output a list report.
-
LOGO required in ALV top of page using factory method
Hi,
I am doing an ALV using factory method of class Cl_SALV_TABLE. Can any one help me about putting a LOGO on the top of page.
Thanks in advance.
AmitavaHi,
In START-OF-SELECTION.
put form to display header
like PERFORM build_header
gr_table->display( ).
then...
in FORM
FORM build_header.
lr_grid TYPE REF TO cl_salv_form_layout_grid,
lr_logo TYPE REF TO cl_salv_form_layout_logo,
create object lr_logo.
lr_logo->set_left_content( lr_grid ).
lr_logo->set_right_logo( 'LOGO_NAME' ).
* Set the element top_of_list
gr_table->set_top_of_list( lr_logo ).
ENDFORM.
thanx. -
Setting value for attribute 'PO_NUMBER_SOLD' using setter method
Hi Experts,
I need to set the value of a screen field according to some condition. I am using setter method of this attribute to set the value but it is not getting changed.
I have written following code in DO_PREPARE_OUTPUT method of implementation class ZL_ZZBT131I_ZCREDITCHECK_IMPL using setter method of attribute
Get Referral Authorization Code
lv_val1 = me->typed_context->crechkresph->get_po_number( attribute_path = 'PO_NUMBER' ).
me->typed_context->crechkresph->set_po_number( attribute_path = 'PO_NUMBER'
value = ' ' ).
while debugging I found that in method set_po_number set_property method has been used:--
current->set_property(
iv_attr_name = 'PO_NUMBER_SOLD' "#EC NOTEXT
iv_value = <nval> ).
In set_property method following code is getting executed
if ME->IS_CHANGEABLE( ) = ABAP_TRUE and
LV_PROPS_OBJ->GET_PROPERTY_BY_IDX( LV_IDX ) ne IF_GENIL_OBJ_ATTR_PROPERTIES=>READ_ONLY.
if <VALUE> ne IV_VALUE.
if ME->MY_MANAGER_ENTRY->DELTA_FLAG is initial.
first 'change' -> proof that entity is locked
if ME->MY_MANAGER_ENTRY->LOCKED = FALSE.
if ME->LOCK( ) = FALSE.
return.
endif.
endif.
flag entity as modified
ME->MY_MANAGER_ENTRY->DELTA_FLAG = IF_GENIL_CONTAINER_OBJECT=>DELTA_CHANGED.
endif.
ME->ACTIVATE_SENDING( ).
change value
<VALUE> = IV_VALUE.
log change
set bit LV_IDX of ME->CHANGE_LOG->* to INDICATOR_SET.
endif.
else.
check if it is a real read-only field or a display mode violation
assert id BOL_ASSERTS subkey 'READ-ONLY_VIOLATION'
fields ME->MY_INSTANCE_KEY->OBJECT_NAME
IV_ATTR_NAME
condition ME->CHANGEABLE = ABAP_TRUE.
endif.
and in debugging I found that if part ( ME->IS_CHANGEABLE( ) = ABAP_TRUE and
LV_PROPS_OBJ->GET_PROPERTY_BY_IDX( LV_IDX ) ne IF_GENIL_OBJ_ATTR_PROPERTIES=>READ_ONLY) fails and hence else part is getting executed and hence my field a real read-only field or a display mode violation is happening according to comments in code.
What shall I do so that I would be able to change the screen field value?
Any help would be highly appreciated.
Regards,
VimalHi,
Try this:
data: lr_entity type cl_crm_bol_entity.
lr_entity = me->typed_context->crechkresph->collection_wrapper->get_current( ).
lr_entity->set_property( iv_attr_name = 'PO_NUMBER' value = '').
Also, make sure the field is not read-only.
Regards
Prasenjit -
How use the method hasPermission in weblogic server 6.1
Hello everybody !
In my application web ,i restrict access to some ressources (some jsp)
to some specified groups .
So,i create permissions in the file web.xml , as indicated in the doc
6.0 .
For example only the user : system can access to all the jsp , and the
others users no .
Now ,in my code ,I would like to use the method hasPermission in order
to modify my application according to the differents groups of users .
But my problem is that i don't know the parameter aclName !
For the parameter permission I use the syntax "new
weblogic.security.acl.PermissionImpl(".../x.jsp") .
For the parameter sep (char),i use : '.' .
But i don't find the parameter aclName .
When i was in weblogic 5.1 ,i created permission in the file
weblogicURL.policy with the syntax : " Permission
weblogic.security.acl.URLAcl "weblogic.url",".../x.jsp" " and after
i gave "weblogic.url" as parameter for aclName .
But in version 6.0, I try web.xml, web ? but nothing is good .
Is there any person which have an idea or the solution ?
All the sugestions are welcome !
Thanks by advance !
Good bye .hi,
maybe a better approach could be to use roles instead of permissons.
Your menu.jsp could look like this:
<%
if(request.isUserInRole("super-user"))
%>
... code HTML where the button "Creation" is created
<%
%>
You can map the role 'super-user' to an individual principal or a
user group in weblogic.xml. In that case only users that are in
the mapped group/principal will see the 'creation' link. So simply
add user 'system' to a group 'super-user'.
regards,
przemek
Marc Alfonsi schrieb:
Hi Kirann and everybody!
Thanks for your message .
I'm going to explain better than the first time .
I set up security-constraints in my web.xml .
For example only "system" can access to the directory Creation and
all its .jsp , and the others users no .
Now ,in my code , there is a jsp : menu.jsp which displays some
possibilities : creation of an employee , visualisation ...with HTML
code : button "Creation" which call a .jsp of the directory Creation .
Actually , if a user different of "system" try to click on the button
"Creation" there is a dialog box of login . The user writes its loggin
but the access is prohibited ( because security-constraint in web.xml
).It's normal but not very well .I would like that a user who don't
have access to the functionality "Creation" don't see the button
"Creation" !
So in menu.jsp , i would like to use the method hasPermission at the
location of the button "Creation" is created with HTML code :
<%
if weblogic.security.acl.Security.hasPermission(.....,new
weblogic.security.acl.PermissionImpl("/Creation/x.jsp"),'.')
%>
code HTML where the button "Creation" is created
<%
%>
But my problem is that i don't know the first parameter which
correspond
to aclName .
Any suggestions are welcome .
Thanks for help . -
When I launched itunes on my new computer, I plugged my phone into it and turned on imatch. So now my library on my new computer is filled with music files. I am pretty sure that these files are not permanent and that they are only there because of icloud and imatch. I want the files to be permanent so I thought it would be best to use the method described above to transfer files with an external hard drive.
Should I erase all the music files on my new computer's itunes before I get started? My new computer is operating with Windows 8.Hey sunrise5656,
Great question. The current configuration you have can potentially be permanent as you want. You simply have to download all of the iTunes Match songs to the computer using the cloud download icon:
iTunes 11 for Windows: Access all your music anytime, anywhere with iTunes Match
http://support.apple.com/kb/PH12492
You can play songs directly from iCloud, or you can download songs so you can play them when you’re not connected to the Internet.
If a song is available in iCloud, it has a Download button next to it.
Thanks,
Matt M. -
Can i use 2 methods to deploy icon files in Oracle IDS?
Dear all,
I'm using Oracle 9IDS(Forms) and i'm trying to use 2 methods to deploy icon file:
-In development phase, i use defaul.icon.path and defaul.icon.extension in registry.dat file and imagebase=documentbase. My icon are well deploy when i run application from form builder.
-In deployment phase, on the same plateform, i use jar file following these steps:
1- I store jar file in same directory with all runtime files(fmx, mmx, etc.)
2- i create a virtual path(/forms90/Tel/) to map with this directory
3- in formsweb.cfg, i put the following line:
[myapp]
imagebase=codebase
archive_jini=f90all_jinit.jar,/forms90/Tel/images.jar
When i call my application directly (http://localhost:8889/forms90/f90servlet?config=myapp),
icons don't appear.
I would like to know, what's wrong?It's possible to use theses both methods for deploy icons on the same plateform?
Thank u for your helpHi Franck,
I thank that red correctly the document(how deploy icon on web).But that isn't the matter.I update my formsweb.cfg as you advise me
[myapp]
archive_jini=...,/forms90/images.jar
imagebase=codebase
Icon don't appear at runtine while other gif files(splashscreen,logo) appear.Notice these others gif files are compressed in the same jar file. Notice also, that when i use default.icon.path parameter in registry.dat file, icons are well deployed.
It's incomprehensible.
Thanks you for your help! -
How to add a new button in an ALV using factory method
im using factory method to creat an ALV
The reason why I'm doing this is because I want the ALV and the selection screen in the same screen like exemplified here http://help-abap.blogspot.com/2008/10/dispaly-alv-report-output-in-same.html
CALL METHOD cl_salv_table=>factory
EXPORTING
list_display = if_salv_c_bool_sap=>false
r_container = lo_cont
container_name = 'DOCK_CONT'
IMPORTING
r_salv_table = lo_alv
CHANGING
t_table = me->t_data.
The above code already uses every parameter that method as to offer.
Is it possible to add extra buttons to an ALV using that method?Hi Ann,
The reason you are not able to see any of the new columns as a option to select in your web service block is because when you have published that block, they were not present. Add these two new objects in your block and publish it again. You will be prompted for duplication content. Select the highlighted block for duplicate and now you can see the new added objects in the filter option. Update and this will overwrite your published block. Please note, web services do appear to behave weirdly when used with dashboards so I request you to please try it in a separate test report first.
Hope that helps.
Regards,
Tanisha
Maybe you are looking for
-
Mighty Mouse stopped working, help!
I have been using my corded Mighty Mouse since 2007 with no problems. I have encountered problems with the scroll ball getting clogged but have always been able to clean it. However recently the mouse just stopped working unless I put it on a texture
-
Bonjour à tous Hi everybody Sur Lr 5.3 sous windows 7 j'ai ce message d'erreur voir en pièce jointe que dois je faire s'il vous plaît... des informations de mon catalogue ont disparu paramétre de recherche par exemple) Merci à tous Lr5.3 with window
-
Middleware - No BDOCS created for Initial Download
Hi Middleware Gurus, I am facing a MW problem and don't have a clue as to why. So, can i please have your inputs. I am trying to download object - CUSTOMER_MAIN in R3AS in CRM after setting the necessary filters. In R3AM1 status is running and there
-
Hi All, Can we have a comma included in the csv generated file? Suppose query contains comma fieid1 field2 Pickle This pickle, must be sour. sweet More sweets, leads to diabetes. My csv should be of two fields not three. But i am getting the csv file
-
Why is the new calculator so horrible?
Is this the best that Mr. Ive could come up with? It looks like a toy.