How can I create RLearner_regr_QRNN.R? - mlr

Original question
I would like to create a new learner for the quantile regression neural network. It is not in the lists for the learning methods already integrated with "mlr". Its format must be like this "RLearner_regr_QRNN.R"
Added after answer was accepted
I would like to define the "quantile regression neural network" as a new type of learner that has special properties and does not fit into one of the existing schemes. My code is below. Code is working but when I use it as a learner for my data, it gives an error that 'qrnn' is not an exported object from 'namespace:qrnn'. I do in advance thank you so much and look forward to hearing from you soon.
makeRLearner.regr.qrnn = function() {
makeRLearnerRegr(
cl = "regr.qrnn",
package = "qrnn",
par.set = makeParamSet(
makeIntegerLearnerParam(id = "n.hidden", default = 2L, lower = 1L),
makeUntypedLearnerParam(id = "n.hidden2", default = NULL),
makeUntypedLearnerParam(id = "w", default = NULL),
makeNumericVectorLearnerParam(id = "tau", default = c(0.1, 0.5, 0.9)),
makeIntegerLearnerParam(id = "iter.max", default = 5000L),
makeIntegerLearnerParam(id = "n.trials", default = 5L),
makeNumericLearnerParam(id = "lower", default = 0),
makeNumericVectorLearnerParam(id = "init.range", default = c(-0.5, 0.5, -0.5, 0.5, -0.5, 0.5)),
makeUntypedLearnerParam(id = "monotone", default = NULL),
makeNumericVectorLearnerParam(id = "eps.seq", default =c(2^(-8),2^(-12),2^(-16),2^(-20),2^(-24),2^(-28),2^(-32))),
makeDiscreteLearnerParam(id = "Th", values =c("sigmoid", "elu", "softplus"),default = "sigmoid"),
makeDiscreteLearnerParam(id = "Th.prime", values=c("sigmoid.prime", "elu.prime","softplus.prime", default = "sigmoid.prime")),
makeNumericLearnerParam(id = "penalty", default = 0),
makeIntegerLearnerParam(id = "n.errors.max", default = 10),
makeLogicalLearnerParam(id = "trace", default = TRUE),
makeDiscreteLearnerParam(id = "method", values =c("nlm","adam"), default = "nlm")
),
par.vals = list(n.hidden=5L, penalty=0),
properties = c("numerics", "factors", "ordered", "oobpreds", "featimp", "se", "weights"),
name = "QRNN",
short.name = "qrnn",
callees = "qrnn"
)
}
#' #export
trainLearner.regr.qrnn = function(.learner, .task, .subset, .weights = NULL, ...) {
if (is.null(.weights)) {
f = getTaskFormula(.task)
qrnn::qrnn(f, data = getTaskData(.task, .subset), linout = TRUE, ...)
} else {
f = getTaskFormula(.task)
qrnn::qrnn(f, data = getTaskData(.task, .subset), linout = TRUE, weights = .weights, ...)
}
}
#' #export
predictLearner.regr.qrnn = function(.learner, .model, .newdata, ...) {
predict(.model$learner.model, newdata = .newdata, ...)[, 1L]
}

You can find instructions on how to create a custom learner on our website.
Also, you might want to think over creating that learner for the new mlr3 package instead. Instructions are here.

Related

How to export DT table to html and preserve all functionality?

I'm able to export a DT table generated in R/RStudio to HTML using the htmlWidget:saveWidget method. However, the FixedColumns feature is not preserved and becomes very narrow when a term is entered in the search bar.
xyz_search_dt <- datatable(
xyz_search_table_d,
rownames = FALSE, extensions = 'Buttons',
options = list(autoWidth = TRUE,
extensions = 'FixedColumns',
options = list(dom = 't',scrollX = TRUE,
fixedColumns = TRUE),
columnDefs = list(list(width= '200px',
targets = "feedback")),
dom=('Bfrtip'), buttons = c('excel'),
pageLength = table_rows,
searchHighlight = TRUE),
filter = list(position="top"))
htmlwidgets::saveWidget(xyz_search_dt, "xyz_search_dt.html")
The solution that I found and seems to work well is to address the widget sizing policy after the fact.
dow_search_dt[["sizingPolicy"]][["defaultWidth"]] <- "100%"
htmlwidgets::saveWidget(dow_search_dt, "dow_search_dt.html")
Reference:
How to resize HTML widget using saveWidget in htmlwidgets R (reopened question)?
You can try this. I use the mtcars dataset and everything works well.
xyz_search_dt <- DT::datatable((mtcars),
rownames = FALSE,
extensions = 'Buttons',
options = list(autoWidth = TRUE,
extensions = 'FixedColumns',
options = list(dom = 't',
scrollX = TRUE,
fixedColumns = TRUE),
columnDefs = list(list(width= '200px',
targets = "feedback")),
dom=('Bfrtip'),
buttons = c('excel'),
#pageLength = table_rows,
searchHighlight = TRUE),
filter=list(position="top"))
htmlwidgets::saveWidget(xyz_search_dt, "xyz_search_dt.html")
OUTPUT:

Get array item by 1-indexed value in another field

The Firefox file sessionstore-backups/recovery.jsonlz4 contains information about the current Firefox windows in (compressed) JSON format. This is a simplified format representative of that file:
{
"index": 2,
"entries": [
{
"title": "Foo bar 0",
"url": "https://example.com/bar"
},
{
"title": "Foo bar 1",
"url": "https://example.com/bar"
},
{
"title": "Foo bar 2",
"url": "https://example.com/bar"
}
]
}
The index field represents the currently-displayed history item per tab. Being 1-indexed, in the example above it represents the "Foo bar 1" entry.
How can I use that value in jq to get that tab?
For testing on your own system, the following bash line will get you to this point on most modern Linux systems:
lz4jsoncat ~/.mozilla/firefox/t6e99qbe.default-release/sessionstore-backups/recovery.jsonlz4 | jq '.windows[0].tabs' | jq 'sort_by(.lastAccessed)[-1]'
This returns the most recent tab, but with all history items in the entries array. As the user could have navigated back in the history, we need the index value to determine which entry to return. Piped through gron, it looks like this:
json = {};
json.attributes = {};
json.entries = [];
json.entries[0] = {};
json.entries[0].ID = 504;
json.entries[0].cacheKey = 0;
json.entries[0].docIdentifier = 586;
json.entries[0].docshellUUID = "{b6c1e18a-d0f5-4ba2-996e-ddd9fc28322a}";
json.entries[0].hasUserInteraction = true;
json.entries[0].persist = true;
json.entries[0].principalToInherit_base64 = "eyIxIjp7IjAiOiJtb3otZXh0ZW5zaW9uOi8vOTAzYWU2NDgtMzRlNi00NGQ3LTg0NjYtYzgxMWQyMTg2YjBkLyJ9fQ==";
json.entries[0].resultPrincipalURI = null;
json.entries[0].title = "Tridactyl Top Tips & New Tab Page";
json.entries[0].triggeringPrincipal_base64 = "eyIxIjp7IjAiOiJtb3otZXh0ZW5zaW9uOi8vOTAzYWU2NDgtMzRlNi00NGQ3LTg0NjYtYzgxMWQyMTg2YjBkLyJ9fQ==";
json.entries[0].url = "moz-extension://7ba85bcd-8d63-4e74-a723-e627a31d6274/static/newtab.html";
json.entries[1] = {};
json.entries[1].ID = 506;
json.entries[1].cacheKey = 0;
json.entries[1].docIdentifier = 588;
json.entries[1].docshellUUID = "{b6c1e18a-d0f5-4ba2-996e-ddd9fc28322a}";
json.entries[1].hasUserInteraction = true;
json.entries[1].persist = true;
json.entries[1].referrerInfo = "BBoSnxDOS9qmDeAnom1e0AAAAAAAAAAAwAAAAAAAAEYAAAAAAAEBAAAAAAEA";
json.entries[1].resultPrincipalURI = null;
json.entries[1].title = "Stack Overflow - Where Developers Learn, Share, & Build Careers";
json.entries[1].triggeringPrincipal_base64 = "eyIzIjp7fX0=";
json.entries[1].url = "https://stackoverflow.com/";
json.entries[2] = {};
json.entries[2].ID = 508;
json.entries[2].cacheKey = 0;
json.entries[2].csp = "CdntGuXUQAS/4CfOuSPZrAAAAAAAAAAAwAAAAAAAAEYB3pRy0IA0EdOTmQAQS6D9QJIHOlRteE8wkTq4cYEyCMYAAAAC/////wAAAbsBAAAAGmh0dHBzOi8vc3RhY2tvdmVyZmxvdy5jb20vAAAAAAAAAAUAAAAIAAAAEQAAAAj/////AAAACP////8AAAAIAAAAEQAAABkAAAABAAAAGQAAAAEAAAAZAAAAAQAAABoAAAAAAAAAGv////8AAAAA/////wAAABn/////AAAAGf////8BAAAAAAAAAAAAKHsiMSI6eyIwIjoiaHR0cHM6Ly9zdGFja292ZXJmbG93LmNvbS8ifX0AAAABAAAASwB1AHAAZwByAGEAZABlAC0AaQBuAHMAZQBjAHUAcgBlAC0AcgBlAHEAdQBlAHMAdABzADsAIABmAHIAYQBtAGUALQBhAG4AYwBlAHMAdABvAHIAcwAgACcAcwBlAGwAZgAnACAAaAB0AHQAcABzADoALwAvAHMAdABhAGMAawBlAHgAYwBoAGEAbgBnAGUALgBjAG8AbQAA";
json.entries[2].docIdentifier = 590;
json.entries[2].docshellUUID = "{b6c1e18a-d0f5-4ba2-996e-ddd9fc28322a}";
json.entries[2].hasUserInteraction = true;
json.entries[2].persist = true;
json.entries[2].principalToInherit_base64 = "eyIxIjp7IjAiOiJodHRwczovL3N0YWNrb3ZlcmZsb3cuY29tLyJ9fQ==";
json.entries[2].referrerInfo = "BBoSnxDOS9qmDeAnom1e0AAAAAAAAAAAwAAAAAAAAEYBAAAAGmh0dHBzOi8vc3RhY2tvdmVyZmxvdy5jb20vAAAACAEBAAAAGmh0dHBzOi8vc3RhY2tvdmVyZmxvdy5jb20vAQE=";
json.entries[2].resultPrincipalURI = null;
json.entries[2].title = "Highest scored questions - Stack Overflow";
json.entries[2].triggeringPrincipal_base64 = "eyIxIjp7IjAiOiJodHRwczovL3N0YWNrb3ZlcmZsb3cuY29tLyJ9fQ==";
json.entries[2].url = "https://stackoverflow.com/questions";
json.entries[3] = {};
json.entries[3].ID = 510;
json.entries[3].cacheKey = 0;
json.entries[3].csp = "CdntGuXUQAS/4CfOuSPZrAAAAAAAAAAAwAAAAAAAAEYB3pRy0IA0EdOTmQAQS6D9QJIHOlRteE8wkTq4cYEyCMYAAAAC/////wAAAbsBAAAAI2h0dHBzOi8vc3RhY2tvdmVyZmxvdy5jb20vcXVlc3Rpb25zAAAAAAAAAAUAAAAIAAAAEQAAAAj/////AAAACP////8AAAAIAAAAEQAAABkAAAAKAAAAGQAAAAoAAAAZAAAAAQAAABoAAAAJAAAAGv////8AAAAA/////wAAABn/////AAAAGf////8BAAAAAAAAAAAAMXsiMSI6eyIwIjoiaHR0cHM6Ly9zdGFja292ZXJmbG93LmNvbS9xdWVzdGlvbnMifX0AAAABAAAASwB1AHAAZwByAGEAZABlAC0AaQBuAHMAZQBjAHUAcgBlAC0AcgBlAHEAdQBlAHMAdABzADsAIABmAHIAYQBtAGUALQBhAG4AYwBlAHMAdABvAHIAcwAgACcAcwBlAGwAZgAnACAAaAB0AHQAcABzADoALwAvAHMAdABhAGMAawBlAHgAYwBoAGEAbgBnAGUALgBjAG8AbQAA";
json.entries[3].docIdentifier = 592;
json.entries[3].docshellUUID = "{b6c1e18a-d0f5-4ba2-996e-ddd9fc28322a}";
json.entries[3].hasUserInteraction = true;
json.entries[3].persist = true;
json.entries[3].principalToInherit_base64 = "eyIxIjp7IjAiOiJodHRwczovL3N0YWNrb3ZlcmZsb3cuY29tL3F1ZXN0aW9ucyJ9fQ==";
json.entries[3].referrerInfo = "BBoSnxDOS9qmDeAnom1e0AAAAAAAAAAAwAAAAAAAAEYBAAAAI2h0dHBzOi8vc3RhY2tvdmVyZmxvdy5jb20vcXVlc3Rpb25zAAAACAEBAAAAI2h0dHBzOi8vc3RhY2tvdmVyZmxvdy5jb20vcXVlc3Rpb25zAQE=";
json.entries[3].resultPrincipalURI = null;
json.entries[3].title = "Tags - Stack Overflow";
json.entries[3].triggeringPrincipal_base64 = "eyIxIjp7IjAiOiJodHRwczovL3N0YWNrb3ZlcmZsb3cuY29tL3F1ZXN0aW9ucyJ9fQ==";
json.entries[3].url = "https://stackoverflow.com/tags";
json.entries[4] = {};
json.entries[4].ID = 512;
json.entries[4].cacheKey = 0;
json.entries[4].csp = "CdntGuXUQAS/4CfOuSPZrAAAAAAAAAAAwAAAAAAAAEYB3pRy0IA0EdOTmQAQS6D9QJIHOlRteE8wkTq4cYEyCMYAAAAC/////wAAAbsBAAAAHmh0dHBzOi8vc3RhY2tvdmVyZmxvdy5jb20vdGFncwAAAAAAAAAFAAAACAAAABEAAAAI/////wAAAAj/////AAAACAAAABEAAAAZAAAABQAAABkAAAAFAAAAGQAAAAEAAAAaAAAABAAAABr/////AAAAAP////8AAAAZ/////wAAABn/////AQAAAAAAAAAAACx7IjEiOnsiMCI6Imh0dHBzOi8vc3RhY2tvdmVyZmxvdy5jb20vdGFncyJ9fQAAAAEAAABLAHUAcABnAHIAYQBkAGUALQBpAG4AcwBlAGMAdQByAGUALQByAGUAcQB1AGUAcwB0AHMAOwAgAGYAcgBhAG0AZQAtAGEAbgBjAGUAcwB0AG8AcgBzACAAJwBzAGUAbABmACcAIABoAHQAdABwAHMAOgAvAC8AcwB0AGEAYwBrAGUAeABjAGgAYQBuAGcAZQAuAGMAbwBtAAA=";
json.entries[4].docIdentifier = 594;
json.entries[4].docshellUUID = "{b6c1e18a-d0f5-4ba2-996e-ddd9fc28322a}";
json.entries[4].hasUserInteraction = false;
json.entries[4].persist = true;
json.entries[4].principalToInherit_base64 = "eyIxIjp7IjAiOiJodHRwczovL3N0YWNrb3ZlcmZsb3cuY29tL3RhZ3MifX0=";
json.entries[4].referrerInfo = "BBoSnxDOS9qmDeAnom1e0AAAAAAAAAAAwAAAAAAAAEYBAAAAHmh0dHBzOi8vc3RhY2tvdmVyZmxvdy5jb20vdGFncwAAAAgBAQAAAB5odHRwczovL3N0YWNrb3ZlcmZsb3cuY29tL3RhZ3MBAQ==";
json.entries[4].resultPrincipalURI = null;
json.entries[4].title = "Users - Stack Overflow";
json.entries[4].triggeringPrincipal_base64 = "eyIxIjp7IjAiOiJodHRwczovL3N0YWNrb3ZlcmZsb3cuY29tL3RhZ3MifX0=";
json.entries[4].url = "https://stackoverflow.com/users";
json.hidden = false;
json.index = 3;
json.lastAccessed = 1651407567904;
json.requestedIndex = 0;
json.searchMode = null;
json.userContextId = 0
Just index entries by index minus one?
.entries[.index - 1]
Online demo
The last item in entries is not necessarily the tab that was opened. [.index - 1] only works if user_pref("browser.sessionstore.max_serialize_forward", 0); cf. https://wiki.mozilla.org/Firefox/session_restore#Browser_settings

How to Create Parametric Survival Learner for MLR in R

I am following the instructions (https://mlr.mlr-org.com/articles/tutorial/create_learner.html) to create a parametric survival learner to use with MLR. My code is below.
When I try to make the MakeLearner(id = "AFT", "surv.parametric"), I get an error
dist is missing and no default is set even though I already specified the dist default in my code to be "weibull".
makeRLearner.surv.parametric = function() {
makeRLearnerSurv(
cl = "surv.parametric",
package = "survival",
par.set = makeParamSet(
makeDiscreteLearnerParam(id = "dist", default = "weibull",
values = c("weibull", "exponential", "lognormal", "loglogistic")),
),
properties = c("numerics", "factors", "weights", "prob", "rcens"),
name = "Parametric Survival Model",
short.name = "Parametric",
note = "This is created based on MLR3 surv.parametric learner"
)
}
trainLearner.surv.parametric = function (.learner, .task, .subset, .weights = NULL, ...)
{
f = getTaskFormula(.task)
data = getTaskData(.task, subset = .subset)
if (is.null(.weights)) {
mod = survival::survreg(formula = f, data = data, ...)
}
else {
mod = survival::survreg(formula = f, data = data, weights = .weights, ...)
}
mod
}
predictLearner.surv.parametric = function (.learner, .model, .newdata, ...)
{
survival::predict.survreg(.model$learner.model, newdata = .newdata, type = "response", ...)
}
Based on here, the prediction function needs to return linear predictors and that would be lp not response. Also, the cindex function of MLR does not seem to be consistent with the output of SurvReg. Based on this discussion, adding a minus seems to resolve the issue. So the prediction function would be as below.
predictLearner.surv.reg = function(.learner, .model, .newdata, ...) {
-predict(.model$learner.model, newdata = .newdata, type = "lp", ...)
}

Search box in network Plot

I have created a Network of protein mutations using the forceNetwork() function of the networkD3 package. It get's rendered on the RStudio's "Viewer" pane.
I can then save this as an HTML file, for sharing, with the dynamic nature (like clicking nodes, highlighting connections etc) preserved.
A png version of my network plot looks like below:
This is a representation of a top 20% in my original data, and the complete data looks even more huge and complex.
I need to be able to add a search to this forceNetwork, so that then specific nodes can be located in a complex network. The javascript or jquery part of this can be easily achieved by editing the copy of package networkD3 and repackaging. But my main challenge is adding the html code for including a search box.
My main R code looks like this:
library(networkD3)
library(XLConnect)
wb <- loadWorkbook("input.xlsx")
nodes <- readWorksheet(wb, sheet="Node", startRow = 1, startCol = 1, header = TRUE)
links <- readWorksheet(wb, sheet="Edges", startRow = 1, startCol = 1, header = TRUE)
fn <- forceNetwork(Links = links, Nodes = nodes,
Source = "Source", Target = "ID", Value = "Combo",
NodeID = "Mutation", linkDistance = JS('function(d){return d.value * 50;}'),
Nodesize = "IF", Group = "Combo", radiusCalculation = JS("d.nodesize+6"),
zoom = T, bounded = F, legend = T,
opacity = 0.8,
fontSize = 16 )
fn
My inspiration has come from the jsfiddle by Simon Raper.
What would be the best way to include a search in this situation? The option I have thought of is to first save the rendering as an html. Then read and edit the html and insert the piece of code for the search.
I tried to use Rhtml for this, but it doesn't seem trivial. Any pointers would be greatly appreciated.
Although I'm not crazy about this interactivity, I thought it would be a good opportunity for demonstrating how to use htmltools with htmlwidgets. Later, I will recreate with crosstalk, but for now, here is how I would replicate the example provided.
direct replication
library(htmltools)
library(networkD3)
data(MisLinks)
data(MisNodes)
# make a forceNetwork as shown in ?forceNetwork
fn <- forceNetwork(
Links = MisLinks, Nodes = MisNodes, Source = "source",
Target = "target", Value = "value", NodeID = "name",
Group = "group", opacity = 0.4, zoom = TRUE
)
fn <- htmlwidgets::onRender(
fn,
'
function(el,x){
debugger;
var optArray = [];
for (var i = 0; i < x.nodes.name.length - 1; i++) {
optArray.push(x.nodes.name[i]);
}
optArray = optArray.sort();
$(function () {
$("#search").autocomplete({
source: optArray
});
});
d3.select(".ui-widget button").node().onclick=searchNode;
function searchNode() {
debugger;
//find the node
var selectedVal = document.getElementById("search").value;
var svg = d3.select(el).select("svg");
var node = d3.select(el).selectAll(".node");
if (selectedVal == "none") {
node.style("stroke", "white").style("stroke-width", "1");
} else {
var selected = node.filter(function (d, i) {
return d.name != selectedVal;
});
selected.style("opacity", "0");
var link = svg.selectAll(".link")
link.style("opacity", "0");
d3.selectAll(".node, .link").transition()
.duration(5000)
.style("opacity", 1);
}
}
}
'
)
browsable(
attachDependencies(
tagList(
tags$head(
tags$link(
href="http://code.jquery.com/ui/1.11.0/themes/smoothness/jquery-ui.css",
rel="stylesheet"
)
),
HTML(
'
<div class="ui-widget">
<input id="search">
<button type="button">Search</button>
</div>
'
),
fn
),
list(
rmarkdown::html_dependency_jquery(),
rmarkdown::html_dependency_jqueryui()
)
)
)
crosstalk version
note: crosstalk is experimental, so this might change
I did not spend time to optimize and perfect, but here is a version that sort-of does the same thing as the example but using crosstalk instead of custom code and a jquery-ui autocomplete.
library(htmltools)
library(networkD3)
# demonstrate with experimental crosstalk
# this will get much easier once we start converting
# htmlwidgets to work natively with crosstalk
#devtoools::install_github("rstudio/crosstalk")
library(crosstalk)
data(MisLinks)
data(MisNodes)
# make a forceNetwork as shown in ?forceNetwork
fn <- forceNetwork(
Links = MisLinks, Nodes = MisNodes, Source = "source",
Target = "target", Value = "value", NodeID = "name",
Group = "group", opacity = 0.4, zoom = TRUE
)
sd <- SharedData$new(MisNodes, key=~name, group="grp1" )
# no autocomplete so not the same
# but will use this instead of writing something new
fs <- filter_select(
id = "filter-node",
label = "Search Nodes",
sharedData = sd,
group = ~name
)
fn <- htmlwidgets::onRender(
fn,
'
function(el,x){
// get the crosstalk group
// we used grp1 in the SharedData from R
var ct_grp = crosstalk.group("grp1");
debugger;
ct_grp
.var("filter")
.on("change", function(val){searchNode(val.value)});
function searchNode(filter_nodes) {
debugger;
//find the node
var selectedVal = filter_nodes? filter_nodes : [];
var svg = d3.select(el).select("svg");
var node = d3.select(el).selectAll(".node");
if (selectedVal.length===0) {
node.style("opacity", "1");
svg.selectAll(".link").style("opacity","1");
} else {
var selected = node.filter(function (d, i) {
return selectedVal.indexOf(d.name) >= 0;
});
node.style("opacity","0");
selected.style("opacity", "1");
var link = svg.selectAll(".link").style("opacity", "0");
/*
svg.selectAll(".node, .link").transition()
.duration(5000)
.style("opacity", 1);
*/
}
}
}
'
)
browsable(
tagList(
fs,
fn
)
)

Disable text font aliasing with embedded fonts in flash cs5

Is there a way to turn off anti aliasing with embedded fonts? I'm using the following code, but sadly I don't see any options in the Actionscript 3 reference, where I can achieve the same results when using a dynamic text field with the Bitmap text [no anti-alias] option selected under Aliasing.
TF = new TextField();
TF.embedFonts = true;
TF.selectable = false;
TF.defaultTextFormat = new TextFormat(_font, _fontSize, _fontColor);
TF.autoSize = TextFieldAutoSize.LEFT;
TF.height = _maskHeight;
TF.x = _maskWidth;
TF.text = getNextMessage();
TF.antiAliasType = AntiAliasType.ADVANCED;
addChild(TF);
Any ideas?
Based on the document provided by Adobe, you can't turn off anti-aliasing for embedded font: "Embedded fonts are anti-aliased, which means that their edges are smoothed for easier readability. This is especially apparent when the text size is large." You can see it in more detailed here: http://livedocs.adobe.com/flex/3/html/help.html?content=fonts_04.html
I've been looking to do this too as I have a weird problem with Japanese text not rendering in Myriad Pro unless the 'anti-alias' drop down is set to 'Bitmap text [no anti-alias]' in the CS6 TextField property inspector - but there doesn't seem any way to choose this setting via ActionScript...!
Interestingly tried creating two TextFields on the stage that were identical other than the instance name and this setting, then did test movie > debug > list variables and got the following output:
For the TextField with 'Bitmap text' as the anti-alias setting:
Edit Text: Target="_level0.bitmaptext_txt"
textColor = 0, multiline = true, scroll = 1,
antiAliasType = "normal",
mouseWheelEnabled = true, variable = null, restrict = null,
gridFitType = "pixel",
selectable = false, bottomScroll = 1, filters = [object #1, class 'Array'] [], background = false,
maxhscroll = 0, styleSheet = undefined,
type = "dynamic",
autoSize = "none",
textWidth = 98, wordWrap = true, maxChars = null, hscroll = 0,
thickness = 0, borderColor = 0, html = false, backgroundColor = 16777215,
condenseWhite = false,
text = "hello world",
htmlText = "hello world",
sharpness = 0, textHeight = 26, border = false, password = false,
embedFonts = true, length = 11, tabIndex = undefined, maxscroll = 1
For the TextField with 'Anti-alias for animation' as the anti-alias setting:
Edit Text: Target="_level0.antialiasanimation_txt"
textColor = 0, multiline = true, scroll = 1,
antiAliasType = "normal",
mouseWheelEnabled = true, variable = null, restrict = null,
gridFitType = "pixel",
selectable = false, bottomScroll = 1, filters = [object #2, class 'Array'] [], background = false,
maxhscroll = 0, styleSheet = undefined,
type = "dynamic",
autoSize = "none",
textWidth = 93, wordWrap = true, maxChars = null, hscroll = 0,
thickness = 0, borderColor = 0, html = false, backgroundColor = 16777215,
condenseWhite = false,
text = "hello world",
htmlText = "hello world",
sharpness = 0, textHeight = 26, border = false, password = false,
embedFonts = true, length = 11, tabIndex = undefined, maxscroll = 1
As you can see, there's no tangible difference between the two other than the 'object #1', 'object #2' properties - I can't believe that's really doing anything?