Using Demo Data for Oracle Data Mining Tools

With the forthcoming (but already available) SQLDeveloper 4.1 edition, an improved version of the Oracle Data Miner tools is incorporated into the SQLDeveloper console.  However, I found that there were a number of steps needed to actually use this new data modeling product other than just responding ‘Yes’ to the “Do you wish to enable the Data Miner Repository on this database?” prompt.

Here’s what I ended up doing to get things up and running (so that I could play with data modeling and visualization using Excel and the new SQLDeveloper DM extensions.)

#In this case, I’m adding back the demonstration data (i.e. EMP, DEPTNO type tables; the SH, OE, HR, et.al. schemas) into an existing R12 e-Business Suite (12.1.3) instance.

# Installing the Oracle Demo data in an R12 instance.

# Use the runInstaller from the R12 $ORACLE_HOME
cd $ORACLE_HOME/oui/bin
export DISPLAY=<workstation IP>:0.0
./runInstaller

# Choose the source products.xml from the staging area – Download and stage the DB Examples CD from OTN
/mnt/nfs/database/11203/examples/stage/products.xml

# Complete the OUI installation through [Finish]

cd $ORACLE_HOME/demo/schema
mkdir -p $ORACLE_HOME/demo/schema/log
echo $ORACLE_HOME/demo/schema/log/     ## used to respond to the Log Directory prompt during mksample.sql

sqlplus “/ as sysdba”
— will need passwords for: SYS/SYSTEM and APPS (used for all of the demo schemas, some of which pre-exist such as, HR, OE (PM, IX, SH and BI were okay for 12.1.3).

— ## Be sure to comment out any DROP USER <HR, OE, etc.) commands in this script (or you will be restoring your EBS instance from a backup because it just dropped your Module schema tables…) ##
— They look like this:
/*
mksample.sql:– DROP USER hr CASCADE;
mksample.sql:– DROP USER oe CASCADE;
mksample.sql:DROP USER pm CASCADE;
mksample.sql:DROP USER ix CASCADE;
mksample.sql:DROP USER sh CASCADE;
mksample.sql:DROP USER bi CASCADE;
*/

–Similarly – if/when you decide you no longer need the data – do NOT just use the $ORACLE_HOME/demo/schema/drop_sch.sql script
–or you just dropped your HR/OE/BI EBS schemas; don’t do that.
/*
drop_sch.sql:PROMPT Dropping Sample Schemas
drop_sch.sql:– DROP USER hr CASCADE;
drop_sch.sql:– DROP USER oe CASCADE;
drop_sch.sql:DROP USER pm CASCADE;
drop_sch.sql:DROP USER ix CASCADE;
drop_sch.sql:DROP USER sh CASCADE;
drop_sch.sql:DROP USER bi CASCADE;

order_entry/oe_main.sql:– Dropping the user with all its objects
order_entry/oe_main.sql:– DROP USER oe CASCADE;
order_entry/oe_main.sql:– ALTER USER oe DEFAULT TABLESPACE &tbs QUOTA UNLIMITED ON &tbs;

*/
— in this instance the $APPS_PW is synchronized to all application module schemas (i.e. AR, HR, GL, etc.)
— log directory would be the actual path from echo $ORACLE_HOME/demo/schema/log/ (including the trailing slash)
SQL> @mksample.sql

# to additionally create the Data Mining user (DM in this case)

create user &&dmuser identified by &&dmuserpwd
default tablespace &&usertblspc
temporary tablespace &&temptblspc
quota unlimited on &&usertblspc;

GRANT CREATE JOB TO &&dmuser;
GRANT CREATE MINING MODEL TO &&dmuser;       — required for creating models
GRANT CREATE PROCEDURE TO &&dmuser;
GRANT CREATE SEQUENCE TO &&dmuser;
GRANT CREATE SESSION TO &&dmuser;
GRANT CREATE SYNONYM TO &&dmuser;
GRANT CREATE TABLE TO &&dmuser;
GRANT CREATE TYPE TO &&dmuser;
GRANT CREATE VIEW TO &&dmuser;
GRANT EXECUTE ON ctxsys.ctx_ddl TO &&dmuser;
GRANT CREATE ANY DIRECTORY TO &&dmuser;
— Grant the SH Demo table and package objects to the DM user
@?/rdbms/demo/dmshgrants.sql &&dmuser

connect &&dmuser/&&dmuserpwd
— Create the Data Mining Views against the  SH Demo table and package objects
@?/rdbms/demo/dmsh.sql

@?/rdbms/demo/dmabdemo.sql — Builds the Adaptive Baynes Model demo
@?/rdbms/demo/dmaidemo.sql — Builds the Attribute Importance demo
@?/rdbms/demo/dmardemo.sql — Builds the Association Rules demo
@?/rdbms/demo/dmdtdemo.sql — Builds the Decision Tree demo
@?/rdbms/demo/dmdtxvlddemo.sql — Builds the Cross Validation demo
@?/rdbms/demo/dmglcdem.sql — Builds the Generalized Linear model demo
@?/rdbms/demo/dmglrdem.sql — Builds the General Linear Regression model demo
@?/rdbms/demo/dmhpdemo.sql — not a Data Mining program – Hierarchical Profiler
@?/rdbms/demo/dmkmdemo.sql — Builds the K-Means Clustering model demo
@?/rdbms/demo/dmnbdemo.sql — Builds the Naive Baynes Model data
@?/rdbms/demo/dmnmdemo.sql — Builds the Non-negative Matrix Factorization model
@?/rdbms/demo/dmocdemo.sql — Builds the O-Cluster model Demo
@?/rdbms/demo/dmsvcdem.sql — Builds the Support Vector Machine model demo
@?/rdbms/demo/dmsvodem.sql — Builds the One-Class Support Vector Machine model demo
@?/rdbms/demo/dmsvrdem.sql — Builds the Support Vector Regression model demo
@?/rdbms/demo/dmtxtfe.sql — Builds the Oracle Text Term Feature Extractor demo
@?/rdbms/demo/dmtxtnmf.sql — Builds the Text Mining Non-Negative Matrix Factorization model demo
@?/rdbms/demo/dmtxtsvm.sql — Builds the Text Mining Support Vector Machine model demo

## End of Data Mining Demo user (DM) setup and configuration for use of Oracle Demo Data

Advertisement

2015-February Shinnyo Podcast – Taking A

2015-February Shinnyo Podcast – Taking Action – 2015-February Shinnyo Podcast – Taking Action         How Actions Lead to Perception         Consistent Form -> Consistent Results         The Rules of Engagement Require Actual Engagement         You Are What You Do         Taking the Next Step Subscribe to this Podcast (RSS) or iTunes or via Flipboard From an address by Her Holiness, Keishu Shinso at the commencement of this … Continue reading 2015-February Shinnyo Podca… http://ow.ly/2UokCB

2015-February Shinnyo Podcast – Taking Action

2015-February Shinnyo Podcast – Taking Action

  •         How Actions Lead to Perception
  •         Consistent Form -> Consistent Results
  •         The Rules of Engagement Require Actual Engagement
  •         You Are What You Do
  •         Taking the Next Step

Subscribe to this Podcast (RSS) or iTunes or via Flipboard

action_thFrom an address by Her Holiness, Keishu Shinso at the commencement of this year’s Annual Training period on January 25, 2015:

“Shinnyo refers to the qualities that we find exemplified in the lives of the Shinnyo Parents and the Two Dojis, most prominently in the way they demonstrated what it means to embody a spirit that is selfless, unbowed, and full of harmony. Shinnyo Ichinyo (oneness with truth) is about the effort that we make to express these qualities of shinnyo in our daily life, and by so doing, we are always connected with our spiritual masters”

Spirituality is often interpreted as being an internalized concept in that while various groups of people will have a common belief system, it is the beliefs and practices of the individual that comprise how the philosophy impacts the rest of the world.  We see that demonstrated in our contemporary life by the acts of a few individuals affecting the impressions that others form about a whole religion, or even simply the label of alliance with a philosophy. Whether or not the actions by those individuals are conscribed or taught by the actual philosophy are not part of the perception.

This is often illustrated in many idioms and proverbs:

  •         Do as I say, not as I do.
  •         Actions speak louder than words.
  •         It’s the thought that counts (implying, not the action, or lack thereof).

Effectively, these are saying, “Take my advice, even though I am acting contrary to it.” (Sometimes used as an apology for behaving hypocritically.) – McGraw-Hill Dictionary of American Idioms and Phrasal Verbs. © 2002 by The McGraw-Hill Companies, Inc.

What most philosophical schools teach is that individual actions should always strive to be in alignment with the principles of conduct, or the laws of commonly decent behavior. In Buddhism, these are illustrated as the Dharma, which comes in many different expressions:

Four Noble Truths

  •         There is suffering
  •         A source of suffering.
  •         The cessation of suffering
  •         Attainment of Nirvana

Five Cardinal Sins

  •         Killing one’s father,
  •         …mother,
  •         …a saint,
  •         Injuring a Buddha,
  •         Disturbing the Sangha

8-fold Noble Path

  •         Right views
  •         …thoughts,
  •         …speech,
  •         …acts,
  •         …livelihood,
  •         …efforts,
  •         …mindfulness,
  •         …meditation

And others.

Nonetheless, memorizing the guidelines becomes pointless if actions taken aren’t in alignment with what performance is expected. We know children pick up on this concept rather quickly at a young age. If parents always say to do something, but either don’t do it themselves, or don’t make efforts to correct or demonstrate desired behavior, kids figure out, “they say it, but they don’t really mean it.” And likewise, so do our pet dogs and cats, and even our co-workers.  We learn from the actions we observe, and much less so, the words we read or hear.

Similarly, we also learn more from our own actions (and mistakes) much more than from what we write, or say. Repeated actions reinforce memory. Learning how to golf takes practice, and that doesn’t mean watching videos or reading books about it. The “muscle memory” comes from repeated guidance in the correct form (or conversely, incorrect form repeated over and over leads to really lousy golf scores.)

Returning to our sales-related analogy, once you have assessed the needs of the customer and figured out a solution that would address them, you have to actually finish the transaction (“seal the deal”, follow-through, make it happen.)  In a nutshell, if you don’t take action to write the sale up, you go home with less pay, thus there’s a direct positively correlated relationship between taking action and personal gain.

In life, the relationship is not so clear to those who don’t take action. But as in physics, not taking action is in and of itself another action. And there are consequences for inaction, too. And every action should emanate from a compassionate source or it tends to have an opposite effect.

In Shinnyo Buddhism this belief in action has been distilled into three basic practices:

  •         Connecting to others (jpn. otasuke)
  •         Making voluntary effort (jpn. gohoshi)
  •         Contributing time or value (jpn. kangi)

Just as the symbolism of cleaning things and places is also referred to as “polishing our hearts”, it is the actions that when repeated and reinforced through positive guidance that lead to actual transition, and transformation.